From a7564f0f846b2065099e62010e42419bf8f4bf1a Mon Sep 17 00:00:00 2001 From: Veikka Kähkönen Date: Tue, 29 Aug 2017 20:53:49 +0300 Subject: Add configurable navigation --- _data/navi.yaml | 36 ++++++++++++++++++++++++++++++++++++ _includes/header.html | 37 +++++++++++++++++++++++++++++-------- _sass/_as-theme.scss | 7 +++++++ 3 files changed, 72 insertions(+), 8 deletions(-) create mode 100644 _data/navi.yaml diff --git a/_data/navi.yaml b/_data/navi.yaml new file mode 100644 index 0000000..a316b14 --- /dev/null +++ b/_data/navi.yaml @@ -0,0 +1,36 @@ +items: + - title: Etusivu + href: / + - title: Kilta + href: /kilta + subnavi: + directory: kilta + items: + - title: Hallitus + href: hallitus.html + - title: Toimihenkilöt + href: toimihenkilot.html + - title: Viestintä + href: viestinta.html + - title: Jäsenyys + href: jasenyys.html + - title: Aski + href: aski.html + - title: Halloped + href: halloped.html + - title: GT + href: gt.html + #- title: Säätökerho + # href: saatokerho.html + - title: Opiskelu + href: /opiskelu.html + - title: Uudet opiskelijat + href: /phuksit.html + - title: Tapahtumat + href: /tapahtumat.html + - title: Yrityksille + href: /yrityksille.html + - title: Yhteystiedot + href: /yhteystiedot.html + - title: In English + href: /in-english.html diff --git a/_includes/header.html b/_includes/header.html index 813ff45..7a8b616 100644 --- a/_includes/header.html +++ b/_includes/header.html @@ -8,17 +8,38 @@ + {% if subnavi %} + + {% endif %} diff --git a/_sass/_as-theme.scss b/_sass/_as-theme.scss index e17f605..119a6f3 100644 --- a/_sass/_as-theme.scss +++ b/_sass/_as-theme.scss @@ -78,6 +78,13 @@ body { } } +.navigation__item.active { + font-weight: bold; +} + +.navigation__item.active a { + color: $purple-color; +} .header__title { padding-top: $spacing-unit/4; padding-bottom: $spacing-unit/4; -- cgit v1.3