feat: Even *more* adaptive navbar
Oh and icons can be disabled without the nav turning into shit
This commit is contained in:
@ -11,9 +11,10 @@
|
|||||||
width: min(calc(var(--content-width) + 10rem), 90%);
|
width: min(calc(var(--content-width) + 10rem), 90%);
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
|
|
||||||
@media screen and (max-width: 480px) {
|
@media screen and (max-width: 720px) {
|
||||||
& {
|
& {
|
||||||
position: static;
|
width: auto;
|
||||||
|
max-width: min(calc(var(--content-width) + 10rem), 90%);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -24,7 +25,7 @@
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
padding: 0.5rem;
|
padding: 0.5rem;
|
||||||
|
|
||||||
@media screen and (max-width: 630px) {
|
@media screen and (max-width: 720px) {
|
||||||
& {
|
& {
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
}
|
}
|
||||||
@ -61,6 +62,24 @@
|
|||||||
&:active {
|
&:active {
|
||||||
transform: scale(var(--active));
|
transform: scale(var(--active));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media screen and (max-width: 480px) {
|
||||||
|
&:has(span) {
|
||||||
|
padding: 0.325rem 0.625rem;
|
||||||
|
|
||||||
|
span {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#home {
|
||||||
|
margin-right: 0.25rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
#feed {
|
||||||
|
margin-left: 0.25rem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,10 +1,12 @@
|
|||||||
<header id="site-nav">
|
<header id="site-nav">
|
||||||
<nav>
|
<nav>
|
||||||
<a id="title" href="{{ get_url(path='') }}">
|
<a id="home" href="{{ get_url(path='') }}">
|
||||||
{% if config.extra.nav.icons %}
|
{% if config.extra.nav.icons %}
|
||||||
<i class="bi bi-house"></i>
|
<i class="bi bi-house"></i>
|
||||||
|
<span>{{ config.title }}</span>
|
||||||
|
{% else %}
|
||||||
|
{{ config.title }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{{ config.title }}
|
|
||||||
</a>
|
</a>
|
||||||
<ul>
|
<ul>
|
||||||
{% for link in config.extra.nav.links %}
|
{% for link in config.extra.nav.links %}
|
||||||
@ -13,22 +15,26 @@
|
|||||||
{% if config.extra.nav.icons %}
|
{% if config.extra.nav.icons %}
|
||||||
{% if link.icon %}
|
{% if link.icon %}
|
||||||
<i class="bi bi-{{ link.icon }}"></i>
|
<i class="bi bi-{{ link.icon }}"></i>
|
||||||
|
<span>{{ link.name }}</span>
|
||||||
|
{% else %}
|
||||||
|
{{ link.name }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% else %}
|
||||||
|
{{ link.name }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{{ link.name }}
|
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% if config.extra.nav.show_feed %}
|
|
||||||
<li>
|
|
||||||
<a href="{{ get_url(path='') }}/{{ config.feed_filename }}">
|
|
||||||
{% if config.extra.nav.icons %}
|
|
||||||
<i class="bi bi-rss"></i>
|
|
||||||
{% endif %}
|
|
||||||
Feed
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
{% endif %}
|
|
||||||
</ul>
|
</ul>
|
||||||
|
{% if config.extra.nav.show_feed %}
|
||||||
|
<a id="feed" href="{{ get_url(path='') }}/{{ config.feed_filename }}">
|
||||||
|
{% if config.extra.nav.icons %}
|
||||||
|
<i class="bi bi-rss"></i>
|
||||||
|
<span class="link-name">Feed</span>
|
||||||
|
{% else %}
|
||||||
|
Feed
|
||||||
|
{% endif %}
|
||||||
|
</a>
|
||||||
|
{% endif %}
|
||||||
</nav>
|
</nav>
|
||||||
</header>
|
</header>
|
||||||
|
Reference in New Issue
Block a user