feat: Re-do the nav
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
David Lapshin 2023-10-30 17:41:37 +03:00
parent 17c711287f
commit 0ebed6e34d
3 changed files with 36 additions and 48 deletions

View file

@ -283,12 +283,9 @@ img:not(.no-hover):hover {
} }
// NAVBAR // NAVBAR
.site-nav { .nav {
z-index: 1;
width: 80%;
top: 1rem;
position: sticky;
overflow: auto; overflow: auto;
width: 80%;
max-width: var(--content-width); max-width: var(--content-width);
margin: 1rem auto; margin: 1rem auto;
box-shadow: var(--shadow); box-shadow: var(--shadow);
@ -296,10 +293,14 @@ img:not(.no-hover):hover {
background-color: var(--fg05); background-color: var(--fg05);
backdrop-filter: blur(24px); backdrop-filter: blur(24px);
-webkit-backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
position: sticky;
top: 1rem;
z-index: 1;
// bootstrap icons &-container {
.bi { margin: 0.5rem 0.5rem;
font-size: 1rem; position: relative;
text-align: center;
} }
ul { ul {
@ -310,71 +311,57 @@ img:not(.no-hover):hover {
} }
li { li {
color: var(--fg50); transition: var(--transition);
color: var(--default-color);
display: inline-block; display: inline-block;
} }
a { a {
display: inline-block; display: inline-block;
font-size: 0.9rem;
padding: 0.4rem 1rem; padding: 0.4rem 1rem;
border-radius: var(--rounded-corner); border-radius: var(--rounded-corner);
background-color: transparent; background-color: transparent;
color: var(--fg50); color: var(--fg50);
transition: var(--transition); transition: var(--transition);
text-decoration: none; text-decoration: none;
}
a:hover { &:hover,
&:focus {
background-color: var(--fg05); background-color: var(--fg05);
color: var(--primary-color); color: var(--primary-color);
} }
a.site-nav-title {
line-height: normal; // unset line height
font-size: 1.2rem;
}
// svg {
// transform: translateY(-0.125rem) translateX(-0.125rem); // fix icon position
// }
}
@media only screen and (max-device-width: 480px) {
.site-nav {
position: static;
width: 90%;
} }
} }
.site-nav-container { @media (min-width: 600px) {
display: block; .nav {
margin: 0.5rem 0.5rem; &-container {
position: relative;
text-align: center;
}
@media (min-width: 640px) {
.site-nav-container {
text-align: left; text-align: left;
} }
.site-nav ul { ul {
bottom: 0; bottom: 0;
position: absolute; position: absolute;
right: 0; right: 0;
} }
}
}
@media only screen and (max-device-width: 480px) {
.nav {
width: 90%;
}
} }
// FOOTER // FOOTER
.site-footer { .footer {
text-align: center; text-align: center;
padding: 3rem 0 3rem; padding: 3rem 0 3rem;
font-size: 1rem; font-size: 1rem;
margin-top: 4rem; margin-top: 4rem;
} }
.site-footer { .footer {
details { details {
all: unset; all: unset;
} }

View file

@ -1,4 +1,4 @@
<footer class="site-footer"> <footer class="footer">
{% if config.extra.footer.show_copyright %} {% if config.extra.footer.show_copyright %}
<p title="Last built at {{ now() | date(format='%F %R %Z') }}">&copy; {{ config.title }}, 2023</p> <p title="Last built at {{ now() | date(format='%F %R %Z') }}">&copy; {{ config.title }}, 2023</p>
{% endif %} {% endif %}

View file

@ -1,6 +1,7 @@
<nav class="site-nav"> <nav class="nav">
<div class="site-nav-container"> <div class="nav-container">
<a class="site-nav-title" href="{{ config.base_url }}"> <a href="{{ config.base_url }}">
<i class="bi bi-house-fill"></i>
{{ config.title }} {{ config.title }}
</a> </a>
<ul> <ul>