diff options
| author | la-ninpre <leobrekalini@gmail.com> | 2020-08-14 19:27:46 +0300 |
|---|---|---|
| committer | la-ninpre <leobrekalini@gmail.com> | 2020-08-14 19:27:46 +0300 |
| commit | f967b17607d4a251f6bfb3d970c07ef491ef6ba9 (patch) | |
| tree | f23076da18ea69b64d0e1cbb78a9d827d31bac8e | |
| parent | df5eaabe38a62168e7167781d5f862953e97af1e (diff) | |
| download | aaoth.xyz-f967b17607d4a251f6bfb3d970c07ef491ef6ba9.tar.gz aaoth.xyz-f967b17607d4a251f6bfb3d970c07ef491ef6ba9.zip | |
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.
| -rw-r--r-- | _data/navigation.yml | 8 | ||||
| -rw-r--r-- | _includes/navigation.html | 2 | ||||
| -rw-r--r-- | _sass/main.scss | 4 |
3 files changed, 9 insertions, 5 deletions
diff --git a/_data/navigation.yml b/_data/navigation.yml index a774e85..cad0fd1 100644 --- a/_data/navigation.yml +++ b/_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/ diff --git a/_includes/navigation.html b/_includes/navigation.html index c11df77..db577db 100644 --- a/_includes/navigation.html +++ b/_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"> diff --git a/_sass/main.scss b/_sass/main.scss index a12cc99..a36b18b 100644 --- a/_sass/main.scss +++ b/_sass/main.scss @@ -23,6 +23,10 @@ a:hover { color: #999; } +.current { + color: #333; +} + nav { display: flex; font: 400 1.5em $title-font; |
