Skip to content

Commit

Permalink
Fix a few navbar and styling issues
Browse files Browse the repository at this point in the history
  • Loading branch information
xypnox committed Feb 27, 2024
1 parent 3f13eda commit f90ed67
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 25 deletions.
1 change: 1 addition & 0 deletions src/components/footer.astro
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ const links = [
.footer-row {
display: flex;
align-items: center;
flex-wrap: wrap;
gap: 1rem;
}
footer p {
Expand Down
30 changes: 23 additions & 7 deletions src/components/nav/Navbar.astro
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import NavLink from "./NavLink.astro";
<NavLink href="https://x5z.studio">x5z</NavLink>
</div>
<div class="mobile-menu-button navButton navSurface">
<iconify-icon icon={icons.menu} />
<iconify-icon icon={icons.menu}></iconify-icon>
</div>
<div id="themePopupSection">
<ThemePopup client:only />
Expand Down Expand Up @@ -74,6 +74,7 @@ import NavLink from "./NavLink.astro";
.navbar > .navSurface {
display: flex;
align-items: center;
color: var(--text);
border-radius: calc(var(--border-radius) * 2);
background: var(--background);
padding: 0 0.5rem;
Expand All @@ -83,6 +84,27 @@ import NavLink from "./NavLink.astro";
animation: borderFlash 3s;
}

.navbar :global(.navButton) {
padding: 0.5rem;
width: 4rem;
border-radius: calc(var(--border-radius) * 2);
color: var(--primary-contrast);
background: var(--primary-color);
border: none;
position: relative;
display: flex;
align-items: center;
justify-content: center;
iconify-icon {
font-size: 2rem;
}

&:focus-visible {
outline: 2px solid var(--primary-color);
outline-offset: 3px;
}
}

.navbar .mobile-menu,
.navbar .mobile-menu-button {
display: none;
Expand Down Expand Up @@ -149,12 +171,6 @@ import NavLink from "./NavLink.astro";
.navbar .navlinks {
display: none;
}
.navbar :global(.navButton) {
width: 4rem;
display: flex;
font-size: 2rem;
cursor: pointer;
}

.navbar .mobile-menu-button {
display: flex;
Expand Down
18 changes: 0 additions & 18 deletions src/components/themeManager/popup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -142,23 +142,5 @@ const PopupControls = styled('div')`
`

const PopupButton = styled('button')`
padding: 0.5rem;
width: 4rem;
border-radius: calc(${theme.border.radius} * 2);
color: var(--primary-contrast);
background: var(--primary-color);
border: none;
position: relative;
z-index: 120;
display: flex;
align-items: center;
justify-content: center;
iconify-icon {
font-size: 2rem;
}
&:focus-visible {
outline: 2px solid var(--primary-color);
outline-offset: 3px;
}
`
6 changes: 6 additions & 0 deletions src/pages/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,12 @@ import LatestBlog from "../components/latestBlog.astro";
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

@media (max-width: 400px) {
.containers {
grid-template-columns: 1fr;
}
}

.blog-and-links {
display: flex;
flex-direction: column;
Expand Down

0 comments on commit f90ed67

Please sign in to comment.