Add /news/archive and /news/[year]/[term] pages #146
|
@ -5,6 +5,12 @@
|
|||
border-radius: calc(20rem / 16);
|
||||
}
|
||||
|
||||
.fit.card {
|
||||
max-width: unset;
|
||||
padding: unset;
|
||||
border-radius: unset;
|
||||
}
|
||||
|
||||
.date {
|
||||
font-size: calc(18rem / 16);
|
||||
margin: 0;
|
||||
|
|
|
@ -6,15 +6,19 @@ interface NewsCardProps {
|
|||
date: Date;
|
||||
author: string;
|
||||
children: ReactNode;
|
||||
fit?: boolean;
|
||||
}
|
||||
|
||||
export const NewsCard: React.FC<NewsCardProps> = ({
|
||||
date,
|
||||
author,
|
||||
children,
|
||||
fit = false,
|
||||
}) => {
|
||||
const classes = fit ? [styles.card, styles.fit] : [styles.card];
|
||||
|
||||
return (
|
||||
<article className={styles.card}>
|
||||
<article className={classes.join(" ")}>
|
||||
<h1 className={styles.date}>
|
||||
<time dateTime={date.toISOString()}>
|
||||
{date.toLocaleDateString("en-US", {
|
||||
|
|
Loading…
Reference in New Issue