feat: Revert previous nav design, re-add option to disable nav icons

Yes, I'm weird
This commit is contained in:
daudix
2024-01-20 19:14:09 +03:00
parent 4ab0720ce2
commit 3e8e9647d8
4 changed files with 18 additions and 34 deletions

View File

@ -46,6 +46,8 @@ source_url = "https://codeberg.org/daudix/duckquill"
[extra.nav]
# Display Atom/RSS feed button in the nav
show_feed = true
# Whether to use icons in the nav
icons = true
# Links used in the nav; any icon from https://icons.getbootstrap.com
# can be used as the icon. The bi- prefix should not be added.
links = [

View File

@ -11,20 +11,10 @@ img {
transition: var(--transition-longer);
&:not(.no-hover):hover {
transform: scale(125%);
transform: scale(110%);
border-radius: 0;
box-shadow: var(--shadow-raised);
}
&:active {
transform: scale(var(--active));
}
@media screen and (max-width: 480px) {
&:not(.no-hover):hover {
transform: scale(110%);
}
}
}
.full {

View File

@ -13,7 +13,7 @@
@media screen and (max-width: 480px) {
& {
width: auto;
position: static;
}
}
@ -30,12 +30,6 @@
}
}
@media screen and (max-width: 480px) {
#title {
margin: 0 0.2rem 0 0;
}
}
ul {
display: flex;
flex-wrap: wrap;
@ -58,16 +52,6 @@
text-decoration: none;
transition: var(--transition);
@media screen and (max-width: 480px) {
& {
padding: 0.45rem 0.75rem;
}
span {
display: none;
}
}
&:hover {
background-color: var(--fg-muted-1);
color: var(--primary-color);

View File

@ -1,23 +1,31 @@
<header id="header">
<nav>
<a id="title" href="{{ get_url(path='') }}">
<i class="bi bi-house"></i>
<span>{{ config.title }}</span>
{% if config.extra.nav.icons %}
<i class="bi bi-house"></i>
{% endif %}
{{ config.title }}
</a>
<ul>
{% for link in config.extra.nav.links %}
<li>
<a href="{{ link.url | safe | replace(from='$BASE_URL', to=get_url(path='')) | safe }}">
<i class="bi bi-{{ link.icon }}"></i>
<span>{{ link.name }}</span>
{% if config.extra.nav.icons %}
{% if link.icon %}
<i class="bi bi-{{ link.icon }}"></i>
{% endif %}
{% endif %}
{{ link.name }}
</a>
</li>
{% endfor %}
{% if config.extra.nav.show_feed %}
<li>
<a href="{{ get_url(path='') }}/{{ config.feed_filename }}">
<i class="bi bi-rss"></i>
<span>Feed</span>
{% if config.extra.nav.icons %}
<i class="bi bi-rss"></i>
{% endif %}
Feed
</a>
</li>
{% endif %}