mirror of
https://github.com/jakejarvis/jarv.is.git
synced 2026-06-13 19:55:26 -04:00
Migrate to app router (#2254)
This commit is contained in:
@@ -0,0 +1,92 @@
|
||||
.footer {
|
||||
width: 100%;
|
||||
padding: 1.25em 1.5em;
|
||||
border-top: 1px solid var(--colors-kindaLight);
|
||||
background-color: var(--colors-backgroundOuter);
|
||||
color: var(--colors-mediumDark);
|
||||
transition:
|
||||
background var(--transitions-fade),
|
||||
border var(--transitions-fade);
|
||||
}
|
||||
|
||||
.row {
|
||||
display: flex;
|
||||
width: 100%;
|
||||
max-width: var(--sizes-maxLayoutWidth);
|
||||
margin: 0 auto;
|
||||
justify-content: space-between;
|
||||
font-size: 0.8em;
|
||||
line-height: 2.3;
|
||||
}
|
||||
|
||||
.link {
|
||||
color: var(--colors-mediumDark) !important;
|
||||
}
|
||||
|
||||
.link.hover:hover,
|
||||
.link.hover:focus-visible {
|
||||
color: var(--colors-medium) !important;
|
||||
}
|
||||
|
||||
.link.underline {
|
||||
padding-bottom: 2px;
|
||||
border-bottom: 1px solid var(--colors-light);
|
||||
}
|
||||
|
||||
.link.underline:hover,
|
||||
.link.hover:focus-visible {
|
||||
border-bottom-color: var(--colors-kindaLight);
|
||||
}
|
||||
|
||||
.icon {
|
||||
display: inline;
|
||||
width: 1.25em;
|
||||
height: 1.25em;
|
||||
vertical-align: -0.25em;
|
||||
margin: 0 0.075em;
|
||||
}
|
||||
|
||||
.heart {
|
||||
display: inline-block;
|
||||
color: var(--colors-error);
|
||||
}
|
||||
|
||||
@media (prefers-reduced-motion: no-preference) {
|
||||
.heart {
|
||||
animation: pulse 10s ease 7.5s infinite;
|
||||
will-change: transform;
|
||||
}
|
||||
|
||||
@keyframes pulse {
|
||||
0% {
|
||||
transform: scale(1);
|
||||
}
|
||||
2% {
|
||||
transform: scale(1.25);
|
||||
}
|
||||
4% {
|
||||
transform: scale(1);
|
||||
}
|
||||
6% {
|
||||
transform: scale(1.2);
|
||||
}
|
||||
8% {
|
||||
transform: scale(1);
|
||||
}
|
||||
/* pause for ~9 out of 10 seconds */
|
||||
100% {
|
||||
transform: scale(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.footer {
|
||||
padding: 1em 1.25em;
|
||||
}
|
||||
|
||||
/* stack columns on left instead of flexboxing across */
|
||||
.row {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
@@ -1,124 +1,57 @@
|
||||
import clsx from "clsx";
|
||||
import Link from "../Link";
|
||||
import { GoHeartFill } from "react-icons/go";
|
||||
import { SiNextdotjs } from "react-icons/si";
|
||||
import { styled, theme, keyframes } from "../../lib/styles/stitches.config";
|
||||
import config from "../../lib/config";
|
||||
import type { ComponentPropsWithoutRef } from "react";
|
||||
|
||||
const Wrapper = styled("footer", {
|
||||
width: "100%",
|
||||
padding: "1.25em 1.5em",
|
||||
borderTop: `1px solid ${theme.colors.kindaLight}`,
|
||||
backgroundColor: theme.colors.backgroundOuter,
|
||||
color: theme.colors.mediumDark,
|
||||
transition: `background ${theme.transitions.fade}, border ${theme.transitions.fade}`,
|
||||
import styles from "./Footer.module.css";
|
||||
|
||||
"@medium": {
|
||||
padding: "1em 1.25em",
|
||||
},
|
||||
});
|
||||
export type FooterProps = ComponentPropsWithoutRef<"footer">;
|
||||
|
||||
const Row = styled("div", {
|
||||
display: "flex",
|
||||
width: "100%",
|
||||
maxWidth: theme.sizes.maxLayoutWidth,
|
||||
margin: "0 auto",
|
||||
justifyContent: "space-between",
|
||||
fontSize: "0.8em",
|
||||
lineHeight: 2.3,
|
||||
|
||||
// stack columns on left instead of flexboxing across
|
||||
"@medium": {
|
||||
display: "block",
|
||||
},
|
||||
});
|
||||
|
||||
const PlainLink = styled(Link, {
|
||||
color: theme.colors.mediumDark,
|
||||
});
|
||||
|
||||
const Icon = styled("svg", {
|
||||
display: "inline",
|
||||
width: "1.25em",
|
||||
height: "1.25em",
|
||||
verticalAlign: "-0.25em",
|
||||
margin: "0 0.075em",
|
||||
});
|
||||
|
||||
const Heart = styled("span", {
|
||||
display: "inline-block",
|
||||
color: theme.colors.error, // somewhat ironically color the heart with the themed "error" red... </3
|
||||
|
||||
"@media (prefers-reduced-motion: no-preference)": {
|
||||
animation: `${keyframes({
|
||||
"0%": { transform: "scale(1)" },
|
||||
"2%": { transform: "scale(1.25)" },
|
||||
"4%": { transform: "scale(1)" },
|
||||
"6%": { transform: "scale(1.2)" },
|
||||
"8%": { transform: "scale(1)" },
|
||||
// pause for ~9 out of 10 seconds
|
||||
"100%": { transform: "scale(1)" },
|
||||
})} 10s ease 7.5s infinite`,
|
||||
willChange: "transform",
|
||||
},
|
||||
});
|
||||
|
||||
export type FooterProps = ComponentPropsWithoutRef<typeof Wrapper>;
|
||||
|
||||
const Footer = ({ ...rest }: FooterProps) => {
|
||||
const Footer = ({ className, ...rest }: FooterProps) => {
|
||||
return (
|
||||
<Wrapper {...rest}>
|
||||
<Row>
|
||||
<footer className={clsx(styles.footer, className)} {...rest}>
|
||||
<div className={styles.row}>
|
||||
<div>
|
||||
Content{" "}
|
||||
<PlainLink href="/license/" title={config.license} underline={false}>
|
||||
<Link href="/license" title={config.license} underline={false} className={styles.link}>
|
||||
licensed under {config.licenseAbbr}
|
||||
</PlainLink>
|
||||
</Link>
|
||||
,{" "}
|
||||
<PlainLink href="/previously/" title="Previously on..." underline={false}>
|
||||
<Link href="/previously" title="Previously on..." underline={false} className={styles.link}>
|
||||
{config.copyrightYearStart}
|
||||
</PlainLink>{" "}
|
||||
</Link>{" "}
|
||||
– {new Date(process.env.RELEASE_DATE || Date.now()).getUTCFullYear()}.
|
||||
</div>
|
||||
|
||||
<div>
|
||||
Made with{" "}
|
||||
<Heart title="Love">
|
||||
<Icon as={GoHeartFill} css={{ strokeWidth: 2 }} />
|
||||
</Heart>{" "}
|
||||
<span className={styles.heart} title="Love">
|
||||
<GoHeartFill className={styles.icon} style={{ strokeWidth: 2 }} />
|
||||
</span>{" "}
|
||||
and{" "}
|
||||
<PlainLink
|
||||
<Link
|
||||
href="https://nextjs.org/"
|
||||
title="Powered by Next.js"
|
||||
aria-label="Next.js"
|
||||
underline={false}
|
||||
css={{
|
||||
"&:hover, &:focus-visible": {
|
||||
color: theme.colors.medium,
|
||||
},
|
||||
}}
|
||||
className={clsx(styles.link, styles.hover)}
|
||||
>
|
||||
<Icon as={SiNextdotjs} />
|
||||
</PlainLink>
|
||||
<SiNextdotjs className={styles.icon} />
|
||||
</Link>
|
||||
.{" "}
|
||||
<PlainLink
|
||||
<Link
|
||||
href={`https://github.com/${config.githubRepo}`}
|
||||
title="View Source on GitHub"
|
||||
underline={false}
|
||||
css={{
|
||||
paddingBottom: "2px",
|
||||
borderBottom: `1px solid ${theme.colors.light}`,
|
||||
|
||||
"&:hover, &:focus-visible": {
|
||||
borderColor: theme.colors.kindaLight,
|
||||
},
|
||||
}}
|
||||
className={clsx(styles.link, styles.underline)}
|
||||
>
|
||||
View source.
|
||||
</PlainLink>
|
||||
</Link>
|
||||
</div>
|
||||
</Row>
|
||||
</Wrapper>
|
||||
</div>
|
||||
</footer>
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user