More menu layout fixes
This commit is contained in:
@@ -2,7 +2,6 @@
|
|||||||
import HeaderLink from './HeaderLink.astro';
|
import HeaderLink from './HeaderLink.astro';
|
||||||
import Blazestar from './Blazestar.astro';
|
import Blazestar from './Blazestar.astro';
|
||||||
import NoteHierarchy from './NoteHierarchy.astro';
|
import NoteHierarchy from './NoteHierarchy.astro';
|
||||||
import NotesLinks from './NotesLinks.astro';
|
|
||||||
import NotchedBox from './NotchedBox.astro';
|
import NotchedBox from './NotchedBox.astro';
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -14,11 +13,11 @@ import NotchedBox from './NotchedBox.astro';
|
|||||||
<HeaderLink href="/blog">Blog</HeaderLink>
|
<HeaderLink href="/blog">Blog</HeaderLink>
|
||||||
<HeaderLink href="/about">About</HeaderLink>
|
<HeaderLink href="/about">About</HeaderLink>
|
||||||
<div class="notes-menu">
|
<div class="notes-menu">
|
||||||
<label for="notes-menu-checkbox">
|
<label for="notes-menu-checkbox" id="notes-menu-button">
|
||||||
<HeaderLink>Notes</HeaderLink>
|
Notes
|
||||||
</label>
|
</label>
|
||||||
<input type="checkbox" id="notes-menu-checkbox" name="notes-menu-checkbox"/>
|
<input type="checkbox" id="notes-menu-checkbox" name="notes-menu-checkbox"/>
|
||||||
<div class="notes-menu-tree" id="notes">
|
<div class="notes-menu-tree" id="notes-menu-tree">
|
||||||
<NotchedBox fillNotches="left">
|
<NotchedBox fillNotches="left">
|
||||||
<NoteHierarchy prefix="/notes" />
|
<NoteHierarchy prefix="/notes" />
|
||||||
</NotchedBox>
|
</NotchedBox>
|
||||||
@@ -76,7 +75,6 @@ import NotchedBox from './NotchedBox.astro';
|
|||||||
nav a {
|
nav a {
|
||||||
padding: 1em 0.5em;
|
padding: 1em 0.5em;
|
||||||
color: var(--color-light-text);
|
color: var(--color-light-text);
|
||||||
border-bottom: 4px solid transparent;
|
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
@@ -91,12 +89,8 @@ import NotchedBox from './NotchedBox.astro';
|
|||||||
.social-links a {
|
.social-links a {
|
||||||
display: flex;
|
display: flex;
|
||||||
}
|
}
|
||||||
@media (max-width: 720px) {
|
|
||||||
.social-links {
|
@media (max-width: 800px) {
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@media (max-width: 520px) {
|
|
||||||
nav {
|
nav {
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
}
|
}
|
||||||
@@ -106,23 +100,39 @@ import NotchedBox from './NotchedBox.astro';
|
|||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
gap: 4px;
|
gap: 4px;
|
||||||
|
font-size: 120%;
|
||||||
}
|
}
|
||||||
|
|
||||||
#notes-menu-checkbox {
|
#notes-menu-checkbox {
|
||||||
display: none;
|
display: none;
|
||||||
|
|
||||||
&:checked ~ #notes {
|
&:checked ~ #notes-menu-tree {
|
||||||
display: flex;
|
display: flex;
|
||||||
}
|
}
|
||||||
|
&:checked ~ #notes-menu-button {
|
||||||
|
color: var(--color-accent);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.notes-menu {
|
||||||
|
position: relative;
|
||||||
|
margin: 1em 0.5em; /* Matches links above */
|
||||||
|
|
||||||
|
.notes-menu-tree {
|
||||||
|
position: absolute;
|
||||||
|
top: 100%;
|
||||||
|
z-index: 10;
|
||||||
|
right: 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.notes-menu-tree {
|
.notes-menu-tree {
|
||||||
display: none;
|
display: none;
|
||||||
position: fixed;
|
|
||||||
overflow: scroll;
|
overflow: scroll;
|
||||||
z-index: 10;
|
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
margin-top: -4px;
|
width: 15em;
|
||||||
|
background-color: rgba(0, 0, 0, 0.2);
|
||||||
|
padding: 8px;
|
||||||
|
|
||||||
a {
|
a {
|
||||||
color: var(--color-light-text);
|
color: var(--color-light-text);
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ const { title = SITE_TITLE, description = SITE_DESCRIPTION } = Astro.props;
|
|||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
<style>
|
<style>
|
||||||
@media (max-width: 800px) {
|
@media (max-width: 900px) {
|
||||||
body {
|
body {
|
||||||
grid-template-areas:
|
grid-template-areas:
|
||||||
"header"
|
"header"
|
||||||
@@ -42,6 +42,9 @@ const { title = SITE_TITLE, description = SITE_DESCRIPTION } = Astro.props;
|
|||||||
grid-template-columns: 1fr;
|
grid-template-columns: 1fr;
|
||||||
margin: 1rem 0.5rem;
|
margin: 1rem 0.5rem;
|
||||||
}
|
}
|
||||||
|
main {
|
||||||
|
padding: 1em;
|
||||||
|
}
|
||||||
.header {
|
.header {
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
@@ -49,7 +52,7 @@ const { title = SITE_TITLE, description = SITE_DESCRIPTION } = Astro.props;
|
|||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@media (min-width: 800px) {
|
@media (min-width: 900px) {
|
||||||
body {
|
body {
|
||||||
grid-template-areas:
|
grid-template-areas:
|
||||||
"header header"
|
"header header"
|
||||||
|
|||||||
@@ -107,6 +107,7 @@ body {
|
|||||||
font-size: var(--font-size-md);
|
font-size: var(--font-size-md);
|
||||||
line-height: 1.7;
|
line-height: 1.7;
|
||||||
background-color: var(--color-space-blue);
|
background-color: var(--color-space-blue);
|
||||||
|
min-width: 360px;
|
||||||
}
|
}
|
||||||
|
|
||||||
main {
|
main {
|
||||||
@@ -191,14 +192,6 @@ hr {
|
|||||||
border: none;
|
border: none;
|
||||||
border-top: 1px solid rgb(var(--gray-light));
|
border-top: 1px solid rgb(var(--gray-light));
|
||||||
}
|
}
|
||||||
@media (max-width: 720px) {
|
|
||||||
body {
|
|
||||||
font-size: 18px;
|
|
||||||
}
|
|
||||||
main {
|
|
||||||
padding: 1em;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.sr-only {
|
.sr-only {
|
||||||
border: 0;
|
border: 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user