Update theme
This commit is contained in:
parent
118e7a7113
commit
b344dad7bf
|
|
@ -26,28 +26,23 @@ description = "Bildergallerie von Badezimmern"
|
||||||
alt = "Ein Rahmen mit Ablagefläche aus Himalaya Granit um einen Spiegel. Die Wände sind aus Paradieso Granit."
|
alt = "Ein Rahmen mit Ablagefläche aus Himalaya Granit um einen Spiegel. Die Wände sind aus Paradieso Granit."
|
||||||
|
|
||||||
[[resources]]
|
[[resources]]
|
||||||
title = "Eckwaschtisch aus MATERIAL"
|
title = "Eckwaschtisch aus Azul Bahia"
|
||||||
src = "bilder/bad-4.jpg"
|
src = "bilder/bad-4.jpg"
|
||||||
[resources.params]
|
[resources.params]
|
||||||
alt = "Ein Waschtisch in einer Ecke in der auf beiden Seiten entlang des Waschtisches Spielgel angebracht sind. Das Waschbecken ist eine Glasschale die auf den Tisch aufgesetzt ist."
|
alt = "Ein Waschtisch in einer Ecke bei dem auf beiden Seiten entlang des Waschtisches Spielgel angebracht sind. Das Waschbecken ist eine Glasschale die auf den Tisch aufgesetzt ist."
|
||||||
|
|
||||||
[[resources]]
|
[[resources]]
|
||||||
title = "Waschbecken aus Findling"
|
title = "Waschbecken aus Flussfindling"
|
||||||
src = "bilder/bad-5.jpg"
|
src = "bilder/bad-5.jpg"
|
||||||
[resources.params]
|
[resources.params]
|
||||||
alt = "Ein Waschbecken ausgehölt aus einem Findling. Das Becken selber ist vertieft in den Findling eingearbeitet und fein geschliffen."
|
alt = "Ein Waschbecken ausgehölt aus einem Findling. Das Becken selber ist vertieft in den Findling eingearbeitet und fein geschliffen."
|
||||||
|
description = "Ein Waschbecken ausgehölt aus einem Findling. Das Becken selber ist vertieft in den Findling eingearbeitet und fein geschliffen. [link](link)"
|
||||||
|
|
||||||
[[resources]]
|
[[resources]]
|
||||||
title = "Waschtisch mit Waschbecken aus Findling"
|
title = "Waschtisch mit Waschbecken aus Findling"
|
||||||
src = "bilder/bad-6.jpg"
|
src = "bilder/bad-6.jpg"
|
||||||
[resources.params]
|
[resources.params]
|
||||||
alt = "Ein Waschtisch mit aufgesetzem Waschbecken in Form eines Findlings. Das Becken selber ist fein geschliffen."
|
alt = "Ein Waschtisch mit aufgesetzem Waschbecken in Form eines Findlings. Das Becken selber ist fein geschliffen."
|
||||||
|
|
||||||
[[resources]]
|
|
||||||
title = "Bad #:counter"
|
|
||||||
src = "bilder/**.jpg"
|
|
||||||
[resources.params]
|
|
||||||
alt = "Bild eines Badezimmers"
|
|
||||||
+++
|
+++
|
||||||
|
|
||||||
{{<gallery "bilder/**.jpg">}}
|
{{<gallery "bilder/**.jpg">}}
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -12,7 +12,7 @@ body {
|
||||||
padding: 155px 0 0 0;
|
padding: 155px 0 0 0;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
background-color: $background-color;
|
background-color: $background-color;
|
||||||
background-image: url(/img/background.jpg);
|
background-image: url(#{$background-image});
|
||||||
background-size: 100%;
|
background-size: 100%;
|
||||||
background-position: center;
|
background-position: center;
|
||||||
background-attachment: fixed;
|
background-attachment: fixed;
|
||||||
|
|
|
||||||
|
|
@ -40,14 +40,19 @@
|
||||||
text-align: center;
|
text-align: center;
|
||||||
vertical-align: center;
|
vertical-align: center;
|
||||||
|
|
||||||
|
.image-container {
|
||||||
|
position: relative;
|
||||||
|
|
||||||
img {
|
img {
|
||||||
max-height: calc(90vh - calc(8 * #{$gutter-width}));
|
max-height: calc(90vh - calc(8 * #{$gutter-width}));
|
||||||
max-width: calc(90vw - calc(6 * #{$gutter-width}));
|
max-width: calc(90vw - calc(6 * #{$gutter-width}));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.lightbox-footer {
|
.lightbox-footer {
|
||||||
flex: 1 0 0;
|
flex: 1 0 0;
|
||||||
|
z-index: 100000;
|
||||||
}
|
}
|
||||||
|
|
||||||
.lightbox-controls {
|
.lightbox-controls {
|
||||||
|
|
@ -58,7 +63,8 @@
|
||||||
position: absolute;
|
position: absolute;
|
||||||
right: 0;
|
right: 0;
|
||||||
top: 0;
|
top: 0;
|
||||||
margin: $gutter-width
|
margin: $gutter-width;
|
||||||
|
z-index: 100000;
|
||||||
}
|
}
|
||||||
|
|
||||||
.lightbox-nav-prev,
|
.lightbox-nav-prev,
|
||||||
|
|
@ -67,8 +73,8 @@
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0;
|
top: 0;
|
||||||
width: 40%;
|
width: 40%;
|
||||||
height: 90%;
|
height: 100%;
|
||||||
margin: 5% 0;
|
margin: 0;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
|
||||||
|
|
@ -14,4 +14,6 @@ $primary-color: #2d763a;
|
||||||
|
|
||||||
$border-radius: 5px;
|
$border-radius: 5px;
|
||||||
|
|
||||||
$fa-font-path: "/fonts"
|
$fa-font-path: "/fonts";
|
||||||
|
|
||||||
|
$background-image: "/img/background.webp";
|
||||||
|
|
@ -1,22 +1,25 @@
|
||||||
{{- $title := .ctx.Title -}}
|
{{- $title := .ctx.Title -}}
|
||||||
{{- $alt := .ctx.Params.alt -}}
|
{{- $alt := .ctx.Params.alt -}}
|
||||||
|
{{- $description := .ctx.Params.description | markdownify -}}
|
||||||
|
|
||||||
<a href="{{ .ctx.Permalink }}"{{- with .lightbox -}} data-lightbox data-title="{{ $title }}" data-alt="{{ $alt }}"{{- end -}}>
|
|
||||||
<figure {{- with .class }} class="{{ . }}"{{- end -}}>
|
<figure {{- with .class }} class="{{ . }}"{{- end -}}>
|
||||||
|
<a href="{{ .ctx.Permalink }}"{{- with .lightbox }} data-lightbox{{- end -}}>
|
||||||
{{- partial "img.html" (dict "image" .image "ctx" .ctx) -}}
|
{{- partial "img.html" (dict "image" .image "ctx" .ctx) -}}
|
||||||
|
</a>
|
||||||
{{ if (or .ShowDescription .showTitle ) }}
|
{{ if (or .ShowDescription .showTitle ) }}
|
||||||
<figcaption class="description">
|
<figcaption class="description">
|
||||||
{{- if .showTitle -}}
|
{{- if .showTitle -}}
|
||||||
<h3>{{ $title }}</h3>
|
<h3>{{ $title }}</h3>
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- if .showDescription -}}
|
{{- if .showDescription -}}
|
||||||
{{- with .ctx.Params.description -}}
|
<p>
|
||||||
|
{{- with $description -}}
|
||||||
{{- . -}}
|
{{- . -}}
|
||||||
{{- else -}}
|
{{- else -}}
|
||||||
{{- $alt -}}
|
{{- $alt -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
</p>
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
</figcaption>
|
</figcaption>
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
</figure>
|
</figure>
|
||||||
</a>
|
|
||||||
|
|
|
||||||
|
|
@ -6,11 +6,10 @@
|
||||||
{{- with .ctx.Params.alt -}}
|
{{- with .ctx.Params.alt -}}
|
||||||
{{- $alt = . -}}
|
{{- $alt = . -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- $imageSm := .image.Fill "301x301 Top" -}}
|
{{- $imageSm := .image.Fill "225x225 Top" -}}
|
||||||
{{- $imageMd := .image.Fill "450x450 Top" -}}
|
{{- $imageMd := .image.Fill "400x400 Top" -}}
|
||||||
{{- $imageLg := .image.Fill "900x900 Top" -}}
|
|
||||||
<img alt="{{ $alt }}"
|
<img alt="{{ $alt }}"
|
||||||
title="{{ $title }}"
|
title="{{ $title }}"
|
||||||
srcset="{{ $imageSm.RelPermalink }} 300w, {{ $imageMd.RelPermalink }} 450w, {{ $imageLg.RelPermalink }} 900w"
|
srcset="{{ $imageSm.RelPermalink }} 225w, {{ $imageMd.RelPermalink }} 400w"
|
||||||
sizes="(max-width: 40em) 50vw, 25vw"
|
sizes="(max-width: 350px) 225w, 400w"
|
||||||
src="{{ $imageMd.RelPermalink }}" />
|
src="{{ $imageMd.RelPermalink }}" />
|
||||||
|
|
|
||||||
|
|
@ -4,14 +4,16 @@
|
||||||
<div class="lightbox-header">
|
<div class="lightbox-header">
|
||||||
<h1 class="lightbox-title">Title</h1>
|
<h1 class="lightbox-title">Title</h1>
|
||||||
<div class="lightbox-controls">
|
<div class="lightbox-controls">
|
||||||
<a class="lightbox-prev"><div class="lightbox-nav-prev"><div><i class="fa fa-chevron-left"></div></i></div></a>
|
|
||||||
<a class="lightbox-next"><div class="lightbox-nav-next"><div><i class="fa fa-chevron-right"></div></div></i></a>
|
|
||||||
<a class="lightbox-close"><i class="fa fa-times"></i></a>
|
<a class="lightbox-close"><i class="fa fa-times"></i></a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="lightbox-image">
|
<div class="lightbox-image">
|
||||||
|
<div class="image-container">
|
||||||
|
<a class="lightbox-prev"><div class="lightbox-nav-prev"><div><i class="fa fa-chevron-left"></div></i></div></a>
|
||||||
|
<a class="lightbox-next"><div class="lightbox-nav-next"><div><i class="fa fa-chevron-right"></div></div></i></a>
|
||||||
<img src="#" alt="image">
|
<img src="#" alt="image">
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
<div class="lightbox-footer">
|
<div class="lightbox-footer">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -9,10 +9,13 @@ class Lightbox {
|
||||||
constructor(idx) {
|
constructor(idx) {
|
||||||
this.idx = idx
|
this.idx = idx
|
||||||
this.element = images[idx];
|
this.element = images[idx];
|
||||||
|
this.figure = this.element.parentElement;
|
||||||
|
this.image = this.element.firstChild;
|
||||||
|
this.title = this.figure.querySelector('h3').innerHTML
|
||||||
|
this.description = this.figure.querySelector('.description p').innerHTML
|
||||||
|
|
||||||
this.href = this.element.getAttribute('href')
|
this.href = this.element.getAttribute('href')
|
||||||
this.alt = this.element.getAttribute('data-alt')
|
this.alt = this.image.getAttribute('alt')
|
||||||
this.title = this.element.getAttribute('data-title')
|
|
||||||
this.template = template.cloneNode(true);
|
this.template = template.cloneNode(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -45,8 +48,13 @@ class Lightbox {
|
||||||
let title = lightbox.querySelector('.lightbox-title');
|
let title = lightbox.querySelector('.lightbox-title');
|
||||||
let description = lightbox.querySelector('.lightbox-footer');
|
let description = lightbox.querySelector('.lightbox-footer');
|
||||||
title.innerHTML = this.title;
|
title.innerHTML = this.title;
|
||||||
|
if (this.description !== null) {
|
||||||
|
description.innerHTML = this.description;
|
||||||
|
}
|
||||||
|
else {
|
||||||
description.innerHTML = this.alt;
|
description.innerHTML = this.alt;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
addEventListeners() {
|
addEventListeners() {
|
||||||
// Close with click outside of .lightbox-container
|
// Close with click outside of .lightbox-container
|
||||||
|
|
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 516 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 374 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 1.1 MiB After Width: | Height: | Size: 530 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 6.8 MiB |
Binary file not shown.
|
After Width: | Height: | Size: 324 KiB |
Loading…
Reference in New Issue