Added media query to navigation sidebar

This commit is contained in:
Gil 2025-04-28 13:43:54 -05:00
parent 3949b2d8c9
commit 15402ec24b
8 changed files with 62 additions and 14 deletions

18
scss/_media.scss Normal file
View file

@ -0,0 +1,18 @@
@mixin breakpoint($point) {
@if $point == small {
@media only screen and (min-width: 600px) { @content; }
}
@else if $point == medium {
@media only screen and (min-width: 768px) { @content; }
}
@else if $point == large {
@media only screen and (min-width: 992px) { @content; }
}
@else if $point == x-large {
@media only screen and (min-width: 1200px) { @content; }
}
@else {
@error "Unknown breakpoint #{$point}.";
}
}

View file

@ -1,3 +1,4 @@
@use 'media';
@use 'theme'; @use 'theme';
body { body {
@ -5,7 +6,7 @@ body {
color: var(--theme-text); color: var(--theme-text);
} }
#skip-navigation { a#skip-navigation {
position: fixed; position: fixed;
top: -100%; top: -100%;
right: 0; right: 0;
@ -22,9 +23,19 @@ body {
.contentarea { .contentarea {
display: flex; display: flex;
flex-direction: row-reverse; flex-direction: column;
main { main {
width: 100%; width: 100%;
} }
@include media.breakpoint(medium) {
flex-direction: row-reverse;
}
}
ul#updates {
time {
color: rgb(110, 110, 110); // Muted color
}
} }

View file

@ -1,3 +1,6 @@
<ul> <ul id="updates">
{% for update in updates %}<li>[{{ update.date }}] {{ update.content | mdinline }}</li>{% endfor %} {% for update in updates %}<li>
<time datetime="{{ update.date }}">[{{ update.date }}]</time>
{{ update.content | mdinline }}
</li>{% endfor %}
</ul> </ul>

View file

@ -30,13 +30,13 @@ body {
color: var(--theme-text); color: var(--theme-text);
} }
#skip-navigation { a#skip-navigation {
position: fixed; position: fixed;
top: -100%; top: -100%;
right: 0; right: 0;
padding: 10px; padding: 10px;
} }
#skip-navigation:focus { a#skip-navigation:focus {
top: 0; top: 0;
} }
@ -47,10 +47,19 @@ body {
.contentarea { .contentarea {
display: flex; display: flex;
flex-direction: row-reverse; flex-direction: column;
} }
.contentarea main { .contentarea main {
width: 100%; width: 100%;
} }
@media only screen and (min-width: 768px) {
.contentarea {
flex-direction: row-reverse;
}
}
ul#updates time {
color: rgb(110, 110, 110);
}
/*# sourceMappingURL=main.css.map */ /*# sourceMappingURL=main.css.map */

View file

@ -1 +1 @@
{"version":3,"sourceRoot":"","sources":["../../../scss/_theme.scss","../../../scss/main.scss"],"names":[],"mappings":"AAAA;;AAAA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AAAA;;AAAA;AAAA;AAAA;AAAA;AAkBA;EACI;EACA;;;AAGJ;EACI;EACA;;;ACvBJ;EACI;EACA;;;AAGJ;EACI;EACA;EACA;EACA;;AACA;EACI;;;AAIR;EACI;EACA;;;AAGJ;EACI;EACA;;AAEA;EACI","file":"main.css"} {"version":3,"sourceRoot":"","sources":["../../../scss/_theme.scss","../../../scss/main.scss","../../../scss/_media.scss"],"names":[],"mappings":"AAAA;;AAAA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AAAA;;AAAA;AAAA;AAAA;AAAA;AAkBA;EACI;EACA;;;AAGJ;EACI;EACA;;;ACtBJ;EACI;EACA;;;AAGJ;EACI;EACA;EACA;EACA;;AACA;EACI;;;AAIR;EACI;EACA;;;AAGJ;EACI;EACA;;AAEA;EACI;;ACvBF;EDkBN;IASQ;;;;AAKJ;EACI","file":"main.css"}

View file

@ -1,13 +1,20 @@
--- ---
title: '/changelog' title: '/changelog'
layout: base.njk layout: base.njk
lastmod: 2025-04-28T00:48:00.00-06:00 lastmod: 2025-04-28T07:59:00.00-06:00
eleventyNavigation: eleventyNavigation:
key: '/changelog' key: '/changelog'
parent: '/slashes' parent: '/slashes'
--- ---
# 2025-04-28 (0.0.1) # Changelog
- Setting things up
This is a list of changes to my website, organized by date.
## 0.0.1 (pub. 2025-04-28)
- Made basic setup
- Added CSS reset, see *Piccalilli*'s [A (more) Modern CSS Reset](https://piccalil.li/blog/a-more-modern-css-reset/) - Added CSS reset, see *Piccalilli*'s [A (more) Modern CSS Reset](https://piccalil.li/blog/a-more-modern-css-reset/)
- First slashpages, see [/slashes](/slashes) and [slashpages.net](https://slashpages.net/) - First slashpages, see [/slashes](/slashes) and [slashpages.net](https://slashpages.net/)
## 0.0.2 (pending)
- Added a media query to move the navigation sidebar to the top on smaller screens, to the right on larger screens

View file

@ -1,7 +1,7 @@
--- ---
title: 'Gil.Ink' title: 'Gil.Ink'
layout: base.njk layout: base.njk
lastmod: 2025-02-19T01:28:48.00-06:00 lastmod: 2025-04-28T08:00:00.00-06:00
eleventyNavigation: eleventyNavigation:
key: 'Home' key: 'Home'
order: -1 order: -1

View file

@ -1,7 +1,7 @@
--- ---
title: '/now' title: '/now'
layout: base.njk layout: base.njk
lastmod: 2025-02-20T02:17:03.00-06:00 lastmod: 2025-04-28T08:00:00.00-06:00
eleventyNavigation: eleventyNavigation:
key: '/now' key: '/now'
parent: '/slashes' parent: '/slashes'