janispagel.de

Source code for https://janispagel.de
Log | Files | Refs | README | LICENSE

commit 5f41d6180249197130bcfdac56016c4d491f4fca
parent f9e89faebe95a7b91e179669f8245610cbb0533d
Author: Janis Pagel <janis.pagel@ims.uni-stuttgart.de>
Date:   Fri, 26 Jun 2020 17:20:36 +0200

Apply proper css styling to mobile nav

Diffstat:
M_includes/header.html | 6+++---
M_sass/minima/_custom-styles.scss | 9++++++++-
2 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/_includes/header.html b/_includes/header.html @@ -7,11 +7,11 @@ {%- if page_paths -%} <nav class="site-nav"> - <ul> + <ul> {%- for item in site.data.navigation -%} - <li><a class="page-link" href="{{ item.url }}"{% if item.tooltip %} title="{{item.tooltip}}"{% endif %}>{{ item.title }}</a></li> + <li><a class="page-link" href="{{ item.url }}"{% if item.tooltip %} title="{{item.tooltip}}"{% endif %}>{{ item.title }}</a></li> {%- endfor -%} - <ul> + <ul> </nav> {%- endif -%} </div> diff --git a/_sass/minima/_custom-styles.scss b/_sass/minima/_custom-styles.scss @@ -6,6 +6,13 @@ /* Override minima nav */ .site-nav { + position: static; + + li { + list-style: none; + } + +@media screen and (min-width: $on-medium) { ul { margin: 0; padding: 0; @@ -13,11 +20,11 @@ li { float: left; - list-style: none; padding: 0; &:not(:last-child) { margin-right: 20px; } + } } }