From e2b66c1c0ec7b45dcac69f1a1273f83507392df1 Mon Sep 17 00:00:00 2001 From: Emil Miler Date: Sun, 14 Mar 2021 11:10:47 +0100 Subject: [PATCH] =?UTF-8?q?Zobrazen=C3=AD=20sub-polo=C5=BEek=20hlavn=C3=AD?= =?UTF-8?q?=20navigace=20do=20sloupc=C5=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Položky v každé sekci jsou řazeny do dvou sloupců, implicitně do levého. Pokud má položka atribut `nav_right = true`, bude vyrenderována v pravém sloupci. Řazení položek se vyhodnocuje vahou. Sloupcům je možné nastavit názvy, a to v hlavičce hlavní sekce pomocí atributů `nav_title_left` a `nav_title_right`. Closes: #11 --- content/katedra/_index.md | 2 + content/katedra/bezpecnost-prace/_index.md | 7 +++ content/katedra/galerie/_index.md | 4 ++ content/katedra/pracovnici/_index.md | 1 + content/katedra/pravidla-site/_index.md | 7 +++ content/katedra/sidlo-pracoviste/_index.md | 4 ++ content/katedra/studijni-rad/_index.md | 7 +++ content/katedra/ucebny/_index.md | 4 ++ sass/main.scss | 30 +++++++++---- templates/base.html | 2 +- templates/index.html | 2 +- templates/macros.html | 51 ++++++++++++++++------ 12 files changed, 96 insertions(+), 25 deletions(-) create mode 100644 content/katedra/bezpecnost-prace/_index.md create mode 100644 content/katedra/pravidla-site/_index.md create mode 100644 content/katedra/studijni-rad/_index.md diff --git a/content/katedra/_index.md b/content/katedra/_index.md index 767a0ec..d71e580 100644 --- a/content/katedra/_index.md +++ b/content/katedra/_index.md @@ -3,6 +3,8 @@ title = "Katedra" [extra] color = "#B48EAD" +nav_title_left = "Informace o katedře" +nav_title_right = "Pravidla a předpisy" heading = "Katedra informačních technologií a technické výchovy" +++ diff --git a/content/katedra/bezpecnost-prace/_index.md b/content/katedra/bezpecnost-prace/_index.md new file mode 100644 index 0000000..3c8eb50 --- /dev/null +++ b/content/katedra/bezpecnost-prace/_index.md @@ -0,0 +1,7 @@ ++++ +title = "Bezpečnost práce" + +[extra] +nav_right = true +icon = "icon-skull-line" ++++ diff --git a/content/katedra/galerie/_index.md b/content/katedra/galerie/_index.md index 71ef129..f48004b 100644 --- a/content/katedra/galerie/_index.md +++ b/content/katedra/galerie/_index.md @@ -1,4 +1,8 @@ +++ title = "Galerie" +weight = 4 + +[extra] +icon = "icon-book-3-line" +++ diff --git a/content/katedra/pracovnici/_index.md b/content/katedra/pracovnici/_index.md index c279313..ddc7595 100644 --- a/content/katedra/pracovnici/_index.md +++ b/content/katedra/pracovnici/_index.md @@ -1,5 +1,6 @@ +++ title = "Pracovníci" +weight = 1 template = "people-list.html" page_template = "people-profile.html" diff --git a/content/katedra/pravidla-site/_index.md b/content/katedra/pravidla-site/_index.md new file mode 100644 index 0000000..24495c4 --- /dev/null +++ b/content/katedra/pravidla-site/_index.md @@ -0,0 +1,7 @@ ++++ +title = "Pravidla pro práci v síti" + +[extra] +nav_right = true +icon = "icon-node-tree" ++++ diff --git a/content/katedra/sidlo-pracoviste/_index.md b/content/katedra/sidlo-pracoviste/_index.md index a83885d..0f00df0 100644 --- a/content/katedra/sidlo-pracoviste/_index.md +++ b/content/katedra/sidlo-pracoviste/_index.md @@ -1,4 +1,8 @@ +++ title = "Sídlo pracoviště" +weight = 2 + +[extra] +icon = "icon-map-pin-line" +++ diff --git a/content/katedra/studijni-rad/_index.md b/content/katedra/studijni-rad/_index.md new file mode 100644 index 0000000..64b33db --- /dev/null +++ b/content/katedra/studijni-rad/_index.md @@ -0,0 +1,7 @@ ++++ +title = "Studijní řád" + +[extra] +nav_right = true +icon = "icon-file-paper-2-line" ++++ diff --git a/content/katedra/ucebny/_index.md b/content/katedra/ucebny/_index.md index 0c3b0f3..c2915a9 100644 --- a/content/katedra/ucebny/_index.md +++ b/content/katedra/ucebny/_index.md @@ -1,4 +1,8 @@ +++ title = "Učebny" +weight = 3 + +[extra] +icon = "icon-artboard-line" +++ diff --git a/sass/main.scss b/sass/main.scss index ae42a4c..16d1da4 100644 --- a/sass/main.scss +++ b/sass/main.scss @@ -57,12 +57,13 @@ header { a { padding: .9rem } li:hover { color: var(--color) } - li:hover ul { display: grid } + li:hover div { display: grid } - ul { - grid-template-columns: auto auto; + li>div { display: none; position: absolute; + grid-template-columns: 1fr 1fr; + column-gap: 1em; left: 0; top: 100%; width: 100%; @@ -75,14 +76,25 @@ header { font-weight: normal; color: #2E3440; - a { - display: flex; - align-items: center; + .title { + margin-bottom: 1em; padding: .5em; + font-weight: bold; + color: var(--color); + } + + ul { + flex-direction: column; + + a { + display: flex; + align-items: center; + padding: .5em; - [class^="icon-"], [class*=" icon-"] { - color: var(--color); - margin-right: .4em; + [class^="icon-"], [class*=" icon-"] { + color: var(--color); + margin-right: .5em; + } } } } diff --git a/templates/base.html b/templates/base.html index caf8692..8fd6768 100644 --- a/templates/base.html +++ b/templates/base.html @@ -20,7 +20,7 @@
diff --git a/templates/macros.html b/templates/macros.html index 4a2248e..15d4f7a 100644 --- a/templates/macros.html +++ b/templates/macros.html @@ -8,7 +8,7 @@ {% endif %} {% endmacro %} -{% macro nav_list_items_recursive(items) %} +{% macro nav_list_items_main(items) %} {% if items %}