update server-side sitemap.xml code

This commit is contained in:
2022-05-07 20:47:14 -04:00
parent d8363d131a
commit 00d497b69b
7 changed files with 79 additions and 61 deletions
-4
View File
@@ -10,10 +10,6 @@ const Wrapper = styled("header", {
borderBottom: "1px solid $kindaLight",
backgroundColor: "$backgroundHeader",
// stick to the top of the page when scrolling
position: "sticky",
top: 0,
// blurry glass-like background effect (except on firefox...?)
backdropFilter: "saturate(180%) blur(5px)",
zIndex: 9999,
+7 -1
View File
@@ -23,6 +23,12 @@ const Container = styled("div", {
display: "block",
});
// stick header to the top of the page when scrolling
const StickyHeader = styled(Header, {
position: "sticky",
top: 0,
});
// footer needs to fill the remaining vertical screen space. doing it here to keep flex stuff together.
const FlexedFooter = styled(Footer, {
flex: 1,
@@ -43,7 +49,7 @@ const Layout = ({ container = true, children, ...rest }: LayoutProps) => {
</Head>
<Flex {...rest}>
<Header />
<StickyHeader />
{/* passing `container={false}` to Layout allows 100% control of the content area on a per-page basis */}
{container ? (
+7 -7
View File
@@ -9,14 +9,12 @@ export const clientScript = () => {
var light = "light";
var dark = "dark";
var newTheme;
// user's saved preference
var pref = window.localStorage.getItem("__STORAGE_KEY__");
// map of theme -> classname
var classNames = "__CLASS_NAMES__";
// the list of <html>'s current class(es)...
var classList = document.documentElement.classList;
// ...from which `classNames` are removed to start fresh
classList.remove(classNames[light], classNames[dark]);
// map of theme -> classname
var classNames = "__CLASS_NAMES__";
// user's saved preference
var pref = window.localStorage.getItem("__STORAGE_KEY__");
if (pref === light || pref === dark) {
// simply restore the local storage preference
@@ -27,7 +25,9 @@ export const clientScript = () => {
newTheme = window.matchMedia("__MEDIA_QUERY__").matches ? dark : light;
}
// FINALLY set the root class
// remove both `classNames` to start fresh...
classList.remove(classNames[light], classNames[dark]);
// ...and then FINALLY set the root class
classList.add(classNames[newTheme]);
} catch (error) {}
};