feat: Revert previous nav design, re-add option to disable nav icons
Yes, I'm weird
This commit is contained in:
@ -46,6 +46,8 @@ source_url = "https://codeberg.org/daudix/duckquill"
|
|||||||
[extra.nav]
|
[extra.nav]
|
||||||
# Display Atom/RSS feed button in the nav
|
# Display Atom/RSS feed button in the nav
|
||||||
show_feed = true
|
show_feed = true
|
||||||
|
# Whether to use icons in the nav
|
||||||
|
icons = true
|
||||||
# Links used in the nav; any icon from https://icons.getbootstrap.com
|
# 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.
|
# can be used as the icon. The bi- prefix should not be added.
|
||||||
links = [
|
links = [
|
||||||
|
@ -11,20 +11,10 @@ img {
|
|||||||
transition: var(--transition-longer);
|
transition: var(--transition-longer);
|
||||||
|
|
||||||
&:not(.no-hover):hover {
|
&:not(.no-hover):hover {
|
||||||
transform: scale(125%);
|
transform: scale(110%);
|
||||||
border-radius: 0;
|
border-radius: 0;
|
||||||
box-shadow: var(--shadow-raised);
|
box-shadow: var(--shadow-raised);
|
||||||
}
|
}
|
||||||
|
|
||||||
&:active {
|
|
||||||
transform: scale(var(--active));
|
|
||||||
}
|
|
||||||
|
|
||||||
@media screen and (max-width: 480px) {
|
|
||||||
&:not(.no-hover):hover {
|
|
||||||
transform: scale(110%);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.full {
|
.full {
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
|
|
||||||
@media screen and (max-width: 480px) {
|
@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 {
|
ul {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
@ -58,16 +52,6 @@
|
|||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
transition: var(--transition);
|
transition: var(--transition);
|
||||||
|
|
||||||
@media screen and (max-width: 480px) {
|
|
||||||
& {
|
|
||||||
padding: 0.45rem 0.75rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
span {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
background-color: var(--fg-muted-1);
|
background-color: var(--fg-muted-1);
|
||||||
color: var(--primary-color);
|
color: var(--primary-color);
|
||||||
|
@ -1,23 +1,31 @@
|
|||||||
<header id="header">
|
<header id="header">
|
||||||
<nav>
|
<nav>
|
||||||
<a id="title" href="{{ get_url(path='') }}">
|
<a id="title" href="{{ get_url(path='') }}">
|
||||||
<i class="bi bi-house"></i>
|
{% if config.extra.nav.icons %}
|
||||||
<span>{{ config.title }}</span>
|
<i class="bi bi-house"></i>
|
||||||
|
{% endif %}
|
||||||
|
{{ config.title }}
|
||||||
</a>
|
</a>
|
||||||
<ul>
|
<ul>
|
||||||
{% for link in config.extra.nav.links %}
|
{% for link in config.extra.nav.links %}
|
||||||
<li>
|
<li>
|
||||||
<a href="{{ link.url | safe | replace(from='$BASE_URL', to=get_url(path='')) | safe }}">
|
<a href="{{ link.url | safe | replace(from='$BASE_URL', to=get_url(path='')) | safe }}">
|
||||||
<i class="bi bi-{{ link.icon }}"></i>
|
{% if config.extra.nav.icons %}
|
||||||
<span>{{ link.name }}</span>
|
{% if link.icon %}
|
||||||
|
<i class="bi bi-{{ link.icon }}"></i>
|
||||||
|
{% endif %}
|
||||||
|
{% endif %}
|
||||||
|
{{ link.name }}
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% if config.extra.nav.show_feed %}
|
{% if config.extra.nav.show_feed %}
|
||||||
<li>
|
<li>
|
||||||
<a href="{{ get_url(path='') }}/{{ config.feed_filename }}">
|
<a href="{{ get_url(path='') }}/{{ config.feed_filename }}">
|
||||||
<i class="bi bi-rss"></i>
|
{% if config.extra.nav.icons %}
|
||||||
<span>Feed</span>
|
<i class="bi bi-rss"></i>
|
||||||
|
{% endif %}
|
||||||
|
Feed
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
Reference in New Issue
Block a user