finish photo gallery

This commit is contained in:
Jakub 2024-03-01 22:53:26 -05:00
parent 1db3d7cf24
commit 2c71573c97
5 changed files with 49 additions and 43 deletions

View File

@ -9,3 +9,6 @@ sat = "Sa"
[dates]
far = "Further Events"
[gallery]
download = "lol"

View File

@ -9,3 +9,6 @@ sat = "S"
[dates]
far = "Dalsze wydarzenia"
[gallery]
download = "temp"

View File

@ -1,22 +0,0 @@
{{ partial "header.html" . }}
{{ partial "nav.html" . }}
<div class="content">
<h1>{{ .Title }}</h1>
{{ .Content }}
{{ range.Data.Pages }}
<article class="post-snippet">
<h3>
<a href="{{ .RelPermalink }}">{{ .Title }}</a>
</h3>
<time datetime="{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}">
{{ .Date.Format "January 2, 2006" }}
</time>
</article>
{{ end }}
</div>
{{ partial "footer.html" . }}

View File

@ -4,6 +4,7 @@
<h1>{{ .Title }}</h1>
{{ .Content }}
{{ $path := .Page.File.Path | strings.TrimSuffix (path.Ext .Page.File.Path) }}
{{ $path := printf "%s/*" $path }}
@ -17,6 +18,20 @@
</div>
{{ end }}
</div>
</div>
{{ $file:= .Page.Params.archive }}
{{ with $file }}
{{ if not (resources.Get $file) }}
{{ errorf "Error: 'file' is a required parameter." }}
{{ end }}
<p>{{ i18n "gallery.download" }}</p>
{{- with resources.Get $file -}}
<a class="button" href="{{ .RelPermalink }}" download>Download {{ path.Ext $file }}</a>
{{- end -}}
{{ end }}
</div>
{{ partial "footer.html" . }}

View File

@ -8,10 +8,6 @@ html, body {
padding: 0;
}
h1,h2,h3,h4,h5,h6 {
margin: 0;
}
body{
/* font-size: 100%; */
line-height: 1.5;
@ -204,6 +200,7 @@ a.home-link { display: none; }
footer {
width: calc(85% - 40px);
margin-left: 15%;
padding-top: 0;
}
footer.fixed { left: 15%; }
@ -233,16 +230,12 @@ blockquote {
border-left-color: var(--alt-bg);
border-left-width: 5px;
border-left-style: solid;
margin: 0;
margin: 20px 0;
padding: 20px 0 20px 20px;
}
blockquote blockquote { margin-left: 20px }
blockquote p {
padding: 20px;
margin-left: 5px;
}
/* Maps Shortcode */
blockquote.location {
background-color: var(--alt-bg);
@ -250,8 +243,12 @@ blockquote.location {
padding: 20px;
}
blockquote p { margin: 0; }
blockquote.location p { padding: inherit; }
.map-txt-grid .child-element a.button { margin: 0; }
/* =========================================== Still Needs cleaning */
/* Maps shortcode styling */
@ -272,7 +269,9 @@ blockquote.location p { padding: inherit; }
padding: 5px;
border: solid 3px var(--acc-1);
border-radius: 8px;
margin-top: 20px;
margin-top: 10px;
margin-bottom: 10px;
display: inline-block;
}
.map {
@ -617,6 +616,20 @@ blockquote.location p { padding: inherit; }
height: 25vh;
}
.gallery-item img {
object-fit: cover;
width: 100%;
height: 100%;
transition: 140ms;
border-radius: 8px;
}
.gallery-item img:hover {
transform: scale(1.2);
transition: 400ms;
}
@media screen and (max-width: 755px) {
.gallery-item {
@ -624,13 +637,7 @@ blockquote.location p { padding: inherit; }
height: auto;
}
.gallery-item img:hover {
transform: none;
}
}
.gallery-item img {
object-fit: cover;
width: 100%;
height: 100%;
}