diff --git a/content/galerie/_index.md b/content/galerie/_index.md index 617947f..a80a2b0 100644 --- a/content/galerie/_index.md +++ b/content/galerie/_index.md @@ -1,4 +1,7 @@ +++ template = "gallery-list.html" page_template = "gallery.html" +sort_by = "date" +++ + +Výběr těch nejlepších fotek k zavzpomínání. diff --git a/sass/_gallery.scss b/sass/_gallery.scss index 016efad..f404f9f 100644 --- a/sass/_gallery.scss +++ b/sass/_gallery.scss @@ -2,16 +2,63 @@ h1 { margin-bottom: 0; } + .subtitle { font-weight: bold; font-size: 1.2em; margin-bottom: 1em; } -} -.gallery.grid { img { display: block; border-radius: .5em; + box-shadow: 0 0 10px rgba(0,0,0,0.3); + } +} + +.gallery-list { + a { + display: block; + border-radius: 1rem; + overflow: hidden; + position: relative; + box-shadow: 0 0 10px rgba(0,0,0,0.3); + } + + img { + display: block; + width: 100%; + } + + div { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + padding: .5em; + color: $col-fg-0-dark; + + background: rgba(0 ,0, 0, .5); + transition: background .2s ease-out; + + &:hover { + background: rgba(0, 0, 0, 0); + } + + .title { + font-weight: bold; + font-size: 1.5em; + line-height: 1.5; + text-align: center; + } + + .title, .year { + filter: drop-shadow(0 0 3px #000); + } } } diff --git a/templates/gallery-list.html b/templates/gallery-list.html index c2f115e..97724dc 100644 --- a/templates/gallery-list.html +++ b/templates/gallery-list.html @@ -1,7 +1,31 @@ {% extends "base.html" %} {% block content %} - {% for gallery in section.pages %} - {{ gallery.title }} - {% endfor %} +
+

Galerie

+ {{ section.content | safe }} +
+ {% endblock %}