1
0

Compare commits

..

No commits in common. "6b245f540d0227a00a7ba09d762ee08742dfb914" and "ee77ff7c84372c97c9b971b029309ada231eff0e" have entirely different histories.

3 changed files with 10 additions and 6 deletions

View File

@ -21,6 +21,7 @@ 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,6 +102,7 @@ nav {
text-decoration: none; text-decoration: none;
} }
} }
li.mobile-only { display: none }
} }
} }
@ -215,21 +216,19 @@ 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,7 +26,11 @@
<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><a href="{{ get_url(path=item.path, trailing_slash=true) }}">{{ item.title }}</a></li> <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>