From 43e56c306caeceea2fa750791d5af2d17d9a7685 Mon Sep 17 00:00:00 2001 From: Emil Miler Date: Sun, 2 May 2021 11:04:50 +0200 Subject: [PATCH] =?UTF-8?q?=C5=A0ablona=20a=20makro=20pro=20v=C3=BDpis=20s?= =?UTF-8?q?enzamu=20galeri=C3=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- content/katedra/galerie/_index.md | 1 + sass/main.scss | 23 +++++++++++++++++++++++ templates/gallery-list.html | 27 +++++++++++++++++++++++++++ templates/macros.html | 29 +++++++++++++++++++++++++++++ 4 files changed, 80 insertions(+) create mode 100644 templates/gallery-list.html diff --git a/content/katedra/galerie/_index.md b/content/katedra/galerie/_index.md index 2b73840..08bbe2a 100644 --- a/content/katedra/galerie/_index.md +++ b/content/katedra/galerie/_index.md @@ -2,6 +2,7 @@ title = "Galerie" weight = 4 +template = "gallery-list.html" page_template = "gallery.html" [extra] diff --git a/sass/main.scss b/sass/main.scss index f23f248..d8a997b 100644 --- a/sass/main.scss +++ b/sass/main.scss @@ -374,6 +374,29 @@ main { img:hover { box-shadow: 0px 1px 9px #00000088 } } + .gallery.index { + a { + position: relative; + color: #fff; + } + .description { + position: absolute; + left: 0; + bottom: 0; + width: 100%; + padding: .7rem; + background-color: rgba(46, 52, 64, 0.85); + text-align: left; + font-weight: normal; + font-size: .85rem; + + .date { + margin-top: .5em; + text-align: right; + color: #ccc; + } + } + } .button { border: 0; diff --git a/templates/gallery-list.html b/templates/gallery-list.html new file mode 100644 index 0000000..34946f0 --- /dev/null +++ b/templates/gallery-list.html @@ -0,0 +1,27 @@ +{% extends "base.html" %} + +{% block styles %} + +{% endblock styles %} + +{% block extra %} + {{ macro::breadcrumbs(page=section) }} +{% endblock %} + +{% block content %} +
+
+

{% if section.extra.heading %} + {{ section.extra.heading }} + {% else %} + {{ section.title }} + {% endif %}

+ {{ macro::gallery_list() }} +
+
+{% endblock content %} + +{% block javascript %} + + +{% endblock %} diff --git a/templates/macros.html b/templates/macros.html index 1f0a48e..d4238e0 100644 --- a/templates/macros.html +++ b/templates/macros.html @@ -216,3 +216,32 @@ {% endfor %} {% endmacro %} + +{% macro gallery_list() %} + +{% endmacro %}