Added image viewer
This commit is contained in:
@@ -0,0 +1,72 @@
|
||||
{{ $style := resources.Get "simplelightbox/simple-lightbox.min.css" }}
|
||||
|
||||
<link rel="stylesheet" href="{{ $style.Permalink }}">
|
||||
|
||||
<style>
|
||||
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.container .gallery a img {
|
||||
float: left;
|
||||
width: 10%;
|
||||
height: auto;
|
||||
border: 2px solid #fff;
|
||||
-webkit-transition: -webkit-transform .15s ease;
|
||||
-moz-transition: -moz-transform .15s ease;
|
||||
-o-transition: -o-transform .15s ease;
|
||||
-ms-transition: -ms-transform .15s ease;
|
||||
transition: transform .15s ease;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.clear {
|
||||
clear: both;
|
||||
}
|
||||
|
||||
a {
|
||||
color: #009688;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
color: #01695f;
|
||||
text-decoration: none;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="container">
|
||||
<h1 class="f2">
|
||||
Bilder des Tages
|
||||
</h1>
|
||||
<div class="gallery">
|
||||
{{ $page := . }}
|
||||
{{ with .Resources.Match "images/*" }}
|
||||
{{ range . }}
|
||||
{{ $gallary_img := .Fill "300x300" }}
|
||||
{{ $text := "" }}
|
||||
{{ if isset $page.Params "captions" }}
|
||||
{{ range first 1 (where $page.Params.captions "name" .Name) }}
|
||||
{{ $text = .text }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
<a href="{{.Permalink}}">
|
||||
<img style="max-width: 100%; width: auto; height: auto;" src="{{ $gallary_img.RelPermalink }}"
|
||||
width="{{ .Width }}" height="{{ .Height }}" alt="{{ .Title }}" title={{ $text }}>
|
||||
</a>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{ $js := resources.Get "simplelightbox/simple-lightbox.min.js" }}
|
||||
|
||||
<script src="{{ $js.Permalink }}"></script>
|
||||
|
||||
<script>
|
||||
(function() {
|
||||
var $gallery = new SimpleLightbox('.gallery a', {});
|
||||
})();
|
||||
</script>
|
||||
@@ -3,7 +3,6 @@
|
||||
<a class="f4 fw4 hover-white no-underline white-70 dn dib-ns pv2 ph3" href="{{ .Site.BaseURL }}" >
|
||||
© {{ with .Site.Copyright | default .Site.Title }} {{ . | safeHTML }} {{ now.Format "2006"}} {{ end }}
|
||||
</a>
|
||||
<div class="white-40 pv2">Generiert am {{ .PublishDate.Format "2.1.2006 15:04:05" }}</div>
|
||||
<div>{{ partial "social-follow.html" . }}</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
|
||||
{{ define "header" }}{{ partial "page-header.html" . }}{{ end }}
|
||||
|
||||
{{ define "main" }}
|
||||
|
||||
{{ partial "navigation-bar.html" ( dict "context" . "items" (slice "/" ) )}}
|
||||
|
||||
<div class="flex-l mt2 mw8 center">
|
||||
<article class="center cf pv5 ph3 ph4-ns mw7">
|
||||
<article class="center cf pv5 ph3 ph4-ns">
|
||||
<header>
|
||||
<div class="flex justify-between">
|
||||
<div class=" w-50 ">
|
||||
@@ -16,7 +15,7 @@
|
||||
{{ partial "formatted-date.html" . }}
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
</header>
|
||||
|
||||
{{/* Show facts, if available */}}
|
||||
<div class="nested-copy-line-height lh-copy f4 nested-links nested-img mid-gray">
|
||||
@@ -72,34 +71,13 @@
|
||||
{{ .Content }}
|
||||
</div>
|
||||
|
||||
{{ partial "gallary.html" . }}
|
||||
|
||||
<h1 class="f2">
|
||||
Bilder des Tages
|
||||
</h1>
|
||||
{{ $page := .}}
|
||||
{{ with .Resources.Match "images/*" }}
|
||||
{{ range . }}
|
||||
{{ $gallary_img := .Resize "600x" }}
|
||||
<div class="pv4 b--black-10 ph3 ph0-l">
|
||||
<a href="{{.Permalink}}" class="db ">
|
||||
<img style="max-width: 100%; width: auto; height: auto;" src="{{ $gallary_img.RelPermalink }}"
|
||||
width="{{ .Width }}" height="{{ .Height }}" alt="{{ .Title }}" >
|
||||
</a>
|
||||
{{ if isset $page.Params "captions" }}
|
||||
{{ range first 1 (where $page.Params.captions "name" .Name) }}
|
||||
{{ .text }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
|
||||
</div>
|
||||
<hr>
|
||||
{{ partial "social-activity.html" . }}
|
||||
|
||||
</article>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user