all repos — aaoth.xyz @ f967b17607d4a251f6bfb3d970c07ef491ef6ba9

aaoth.xyz website

add subtle current page indication to navbar

and fix some links in site data to make it work.
it's kinda subtle yet, maybe change it later.
la-ninpre leobrekalini@gmail.com
Fri, 14 Aug 2020 19:27:46 +0300
commit

f967b17607d4a251f6bfb3d970c07ef491ef6ba9

parent

df5eaabe38a62168e7167781d5f862953e97af1e

3 files changed, 9 insertions(+), 5 deletions(-)

jump to
M _data/navigation.yml_data/navigation.yml

@@ -1,10 +1,10 @@

- name: home link: / - name: music - link: /music + link: /music/ - name: art - link: /art + link: /art/ - name: other - link: /other + link: /other/ - name: about - link: /about + link: /about/
M _includes/navigation.html_includes/navigation.html

@@ -1,7 +1,7 @@

<nav> <ul> {% for item in site.data.navigation %} - <li><a href="{{ item.link }}">{{ item.name }}</a></li> + <li><a href="{{ item.link }}" {% if page.url == item.link %}class="current"{% endif %}>{{ item.name }}</a></li> {% endfor %} </ul> <img src="/assets/img/aaoth-logo.png" alt="aaoth">
M _sass/main.scss_sass/main.scss

@@ -23,6 +23,10 @@ a:hover {

color: #999; } +.current { + color: #333; +} + nav { display: flex; font: 400 1.5em $title-font;