1
0

Compare commits

..

2 Commits

Author SHA1 Message Date
6b245f540d Better mobile nav 2025-05-05 19:02:42 +02:00
85f0e72676 Remove mobile-specific navigation options 2025-05-05 18:53:50 +02:00
3 changed files with 6 additions and 10 deletions

View File

@ -21,7 +21,6 @@ nav = [
{title = "Index", path = "/"}, {title = "Index", path = "/"},
{title = "About", path = "/about/"}, {title = "About", path = "/about/"},
{title = "Search", path = "/posts/"}, {title = "Search", path = "/posts/"},
{title = "Categories", path = "/categories/", mobile_only = true}
] ]
latest_posts_count = 3 latest_posts_count = 3
repository_url = "https://git.0x45.cz/em/em.0x45.cz" repository_url = "https://git.0x45.cz/em/em.0x45.cz"

View File

@ -102,7 +102,6 @@ nav {
text-decoration: none; text-decoration: none;
} }
} }
li.mobile-only { display: none }
} }
} }
@ -216,19 +215,21 @@ a {
.grid { grid-template-columns: auto } .grid { grid-template-columns: auto }
header { margin-bottom: 0 }
nav { nav {
position: initial; position: initial;
margin-bottom: 1rem;
ul { display: none } ul { display: none }
ul.main { ul.main {
display: flex; display: flex;
justify-content: center; justify-content: center;
flex-wrap: wrap; flex-wrap: wrap;
border: 1px solid #43494c;
padding: .25rem 0;
} }
ul li.mobile-only { display: list-item }
span.title { display: none } span.title { display: none }
} }
header, nav { margin-bottom: 3rem }
} }
@media (prefers-color-scheme: dark) { @media (prefers-color-scheme: dark) {

View File

@ -26,11 +26,7 @@
<span class="title">Navigation</span> <span class="title">Navigation</span>
<ul class="main"> <ul class="main">
{% for item in config.extra.nav %} {% for item in config.extra.nav %}
<li <li><a href="{{ get_url(path=item.path, trailing_slash=true) }}">{{ item.title }}</a></li>
{% if item.mobile_only %}
class="mobile-only"
{% endif %}
><a href="{{ get_url(path=item.path, trailing_slash=true) }}">{{ item.title }}</a></li>
{% endfor %} {% endfor %}
</ul> </ul>
<span class="title">Categories</span> <span class="title">Categories</span>