fix: update mobile styles

This commit is contained in:
Devin Haska 2024-02-21 22:30:52 -08:00
parent aa77e9bfb9
commit bab76c7f31
9 changed files with 91 additions and 67 deletions

View file

@ -1,8 +1,9 @@
<footer class="[ footer ] [ mt-1.5 py-1.5 ]">
<div class="[ footer-grid ] [ wrapper gap-0.5 ]">
<footer class="[ bg-surface mt-1.5 py-1.5 ]">
<div class="[ wrapper flow ]">
<div class="[ repel ]">
<p>&copy; {{ meta.author }} 2018-2024.</p>
<nav class="[ footer-pages ]">
<ul class="[ flex-col list-none p-0 m-0 gap-0.5 ]">
<nav>
<ul class="[ list-none cluster p-0 m-0 ]">
{% for link in navigation.bottom %}
<li>
<a href="{{ link.url }}">{{ link.text }}</a>
@ -10,8 +11,10 @@
{% endfor %}
</ul>
</nav>
<nav class="[ footer-socials ]">
<ul class="[ flex list-none gap-0.5 m-0 p-0 ]">
</div>
<nav style="--flow-space: var(--spacing-0\.5)">
<ul class="[ list-none cluster p-0 m-0 ]"
style="--gap: var(--spacing-0\.5)">
<li>
<span class="[ visually-hidden ]">RSS</span>
<a href="/rss.xml" target="_blank" aria-label="View RSS feed">{% include "svgs/rss.svg" %}</a>

View file

@ -1,6 +1,7 @@
<header class="[ navbar ]">
<nav class="[ wrapper flex items-center justify-between ]">
<div class="[ site-logo ] [ flex items-center ]">
<header class="[ navbar ][ py-1 mb-1 ]">
<div class="[ wrapper ]">
<nav class="[ repel ]">
<div class="[ site-logo ] [ flex items-center gap-0.5 ]">
<a class="[ logo ] [ flex items-center justify-center ]"
aria-label="Go to index"
href="{{ meta.url }}">
@ -15,4 +16,5 @@
</div>
{% include "partials/menu.html" %}
</nav>
</div>
</header>

View file

@ -1,4 +1,4 @@
<ul class="[ links ] [ flex ]">
<ul class="[ list-none cluster p-0 m-0 ]">
{% for item in navigation.top %}
<li>
<a href="{{ item.url }}" {{ helpers.getLinkActiveState(item.url, page.url) | safe }}>{{ item.text }}</a>

View file

@ -1,23 +0,0 @@
.footer {
background-color: var(--color-surface);
}
.footer-grid {
display: grid;
}
.footer-socials {
grid-column: 1 / -1;
}
@media (min-width: 32rem) {
.footer-grid {
grid-template-columns: 1fr 1fr;
}
.footer-pages ul {
flex-direction: row;
gap: 1rem;
justify-content: flex-end;
}
}

View file

@ -1,9 +1,6 @@
.site-logo {
gap: 0.5rem;
}
.site-logo .wordmark {
text-decoration: none;
margin-block-start: -6px;
}
.site-logo .wordmark > span {

View file

@ -2,18 +2,11 @@
backdrop-filter: blur(3px);
background-color: color-mix(
in srgb,
var(--color-background) 60%,
var(--color-background) 70%,
transparent
);
background-image: linear-gradient(var(--color-background) 20%, transparent);
container: navbar / inline-size;
padding-block: 1.5rem;
position: sticky;
top: 0;
z-index: 1;
}
.navbar .links {
list-style-type: none;
gap: 1rem;
}

View file

@ -0,0 +1,15 @@
/*
CLUSTER
More info: https://every-layout.dev/layouts/cluster/
A layout that lets you distribute items with consitent
spacing, regardless of their size
*/
.cluster {
--gap: var(--spacing-1);
display: flex;
flex-wrap: wrap;
gap: var(--gap, --spacing-1);
justify-content: flex-start;
align-items: center;
}

View file

@ -0,0 +1,16 @@
/*
REPEL
A little layout that pushes items away from each other where
there is space in the viewport and stacks on small viewports
*/
.repel {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
align-items: center;
gap: var(--spacing-0\.5);
}
.repel[data-nowrap] {
flex-wrap: nowrap;
}

View file

@ -0,0 +1,21 @@
/*
SWITCHER
More info: https://every-layout.dev/layouts/switcher/
A layout that allows you to lay **2** items next to each other
until there is not enough horizontal space to allow that.
*/
.switcher {
display: flex;
flex-wrap: wrap;
}
.switcher > * {
flex-grow: 1;
flex-basis: calc((32rem - 100%) * 999);
}
.switcher > :nth-last-child(n + 3),
.switcher > :nth-last-child(n + 3) ~ * {
flex-basis: 100%;
}