From 2c71573c97cceed0106e8ffb41246f495de70fa6 Mon Sep 17 00:00:00 2001 From: Jakub Date: Fri, 1 Mar 2024 22:53:26 -0500 Subject: [PATCH] finish photo gallery --- i18n/en.toml | 3 +++ i18n/pl.toml | 3 +++ layouts/photos/list.html | 22 ------------------ layouts/photos/single.html | 17 +++++++++++++- static/css/style.css | 47 ++++++++++++++++++++++---------------- 5 files changed, 49 insertions(+), 43 deletions(-) delete mode 100644 layouts/photos/list.html diff --git a/i18n/en.toml b/i18n/en.toml index 0178389..a37665b 100644 --- a/i18n/en.toml +++ b/i18n/en.toml @@ -9,3 +9,6 @@ sat = "Sa" [dates] far = "Further Events" + +[gallery] +download = "lol" diff --git a/i18n/pl.toml b/i18n/pl.toml index ee8271c..0a86bce 100644 --- a/i18n/pl.toml +++ b/i18n/pl.toml @@ -9,3 +9,6 @@ sat = "S" [dates] far = "Dalsze wydarzenia" + +[gallery] +download = "temp" diff --git a/layouts/photos/list.html b/layouts/photos/list.html deleted file mode 100644 index 395ad66..0000000 --- a/layouts/photos/list.html +++ /dev/null @@ -1,22 +0,0 @@ -{{ partial "header.html" . }} - {{ partial "nav.html" . }} -
- -

{{ .Title }}

- -{{ .Content }} - -{{ range.Data.Pages }} -
-

- {{ .Title }} -

- -
-{{ end }} - -
- -{{ partial "footer.html" . }} diff --git a/layouts/photos/single.html b/layouts/photos/single.html index ee4bf8b..ebfe4ca 100644 --- a/layouts/photos/single.html +++ b/layouts/photos/single.html @@ -4,6 +4,7 @@

{{ .Title }}

{{ .Content }} + {{ $path := .Page.File.Path | strings.TrimSuffix (path.Ext .Page.File.Path) }} {{ $path := printf "%s/*" $path }} @@ -17,6 +18,20 @@ {{ end }} - +{{ $file:= .Page.Params.archive }} +{{ with $file }} + +{{ if not (resources.Get $file) }} + {{ errorf "Error: 'file' is a required parameter." }} +{{ end }} + +

{{ i18n "gallery.download" }}

+ {{- with resources.Get $file -}} + Download {{ path.Ext $file }} + {{- end -}} +{{ end }} + + + {{ partial "footer.html" . }} diff --git a/static/css/style.css b/static/css/style.css index 26d7dde..0f9739b 100644 --- a/static/css/style.css +++ b/static/css/style.css @@ -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%; -} - -