Update 13.09.2020

This commit is contained in:
2020-09-13 09:59:08 +02:00
parent 495dc06d00
commit ad00176500
65 changed files with 396 additions and 962 deletions

View File

@ -1,8 +1,6 @@
<div class="container">
<div class="card border-primary rounded-0 hover-shadow mb-5">
<div class="card-body">
<h4 class="card-title"><a href='{{ .Get "link" }}'>{{ .Get "title" }}</a></h4>
<a href='{{ .Get "link" }}' class="btn btn-primary btn-sm">{{ i18n "show_more"}}</a>
</div>
<div class="card border-primary rounded-0 hover-shadow mb-5 col-lg-4">
<div class="card-body">
<h4 class="card-title"><a href='{{ .Get "link" }}'>{{ .Get "title" }}</a></h4>
<a href='{{ .Get "link" }}' class="btn btn-primary btn-sm">{{ i18n "show_more"}}</a>
</div>
</div>

View File

@ -8,10 +8,10 @@ Documentation and licence at https://github.com/liwenyip/hugo-easy-gallery/
{{ $baseURL := .Site.BaseURL }}
<div class="gallery caption-position-{{ with .Get "caption-position" | default "bottom" }}{{.}}{{end}} caption-effect-{{ with .Get "caption-effect" | default "slide" }}{{.}}{{end}} hover-effect-{{ with .Get "hover-effect" | default "zoom" }}{{.}}{{end}} {{ if ne (.Get "hover-transition") "none" }}hover-transition{{end}}" itemscope itemtype="http://schema.org/ImageGallery">
{{- with (.Get "dir") -}}
<!-- If a directory was specified, generate figures for all of the media in the directory -->
<!-- If a directory was specified, generate figures for all of the images in the directory -->
{{- $files := readDir (print "/static/" .) }}
{{- range $files -}}
<!-- skip files that aren't media, or that inlcude the thumb suffix in their name -->
<!-- skip files that aren't images, or that inlcude the thumb suffix in their name -->
{{- $thumbext := $.Get "thumb" | default "-thumb" }}
{{- $isthumb := .Name | findRE ($thumbext | printf "%s\\.") }}<!-- is the current file a thumbnail image? -->
{{- $isimg := lower .Name | findRE "\\.(gif|jpg|jpeg|tiff|png|bmp)" }}<!-- is the current file an image? -->
@ -19,7 +19,7 @@ Documentation and licence at https://github.com/liwenyip/hugo-easy-gallery/
{{- $caption := .Name | replaceRE "\\..*" "" | humanize }}<!-- humanized filename without extension -->
{{- $linkURL := print $baseURL ($.Get "dir") "/" .Name | absURL }}<!-- absolute URL to hi-res image -->
{{- $thumb := .Name | replaceRE "(\\.)" ($thumbext | printf "%s.") }}<!-- filename of thumbnail image -->
{{- $thumbexists := where $files "Name" $thumb }}<!-- does a thumbnail image exist? -->
{{- $thumbexists := where $files "Name" $thumb }}<!-- does a thumbnail image exist? -->
{{- $thumbURL := print $baseURL ($.Get "dir") "/" $thumb | absURL }}<!-- absolute URL to thumbnail image -->
<div class="box">
<figure itemprop="associatedMedia" itemscope itemtype="http://schema.org/ImageObject">

View File

@ -20,6 +20,7 @@ Documentation and licence at https://github.com/liwenyip/hugo-easy-gallery/
<!-- Photoswipe css/js libraries -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/photoswipe/4.1.1/photoswipe.min.css" integrity="sha256-sCl5PUOGMLfFYctzDW3MtRib0ctyUvI9Qsmq2wXOeBY=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/photoswipe/4.1.1/default-skin/default-skin.min.css" integrity="sha256-BFeI1V+Vh1Rk37wswuOYn5lsTcaU96hGaI7OUVCLjPc=" crossorigin="anonymous" />
<!-- these files are loaded in the theme footer
<script src="https://cdnjs.cloudflare.com/ajax/libs/photoswipe/4.1.1/photoswipe.min.js" integrity="sha256-UplRCs9v4KXVJvVY+p+RSo5Q4ilAUXh7kpjyIP5odyc=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/photoswipe/4.1.1/photoswipe-ui-default.min.js" integrity="sha256-PWHOlUzc96pMc8ThwRIXPn8yH4NOLu42RQ0b9SpnpFk=" crossorigin="anonymous"></script>
@ -72,4 +73,4 @@ Documentation and licence at https://github.com/liwenyip/hugo-easy-gallery/
</div>
</div>
</div>
{{ end }}
{{ end }}

View File

@ -0,0 +1,4 @@
<details>
<summary>{{ .Get "title" }}</summary>
<div class="content"><p class="content">{{ .Inner }}</p></div>
</details>

View File

@ -0,0 +1,10 @@
<div class="container">
<div class="card border-primary rounded-0 hover-shadow mb-5">
<div class="card-body">
<details>
<summary>{{ .Get "title" }}</summary>
<div class="content"><p class="content">{{ .Inner }}</p></div>
</details>
</div>
</div>
</div>