mirror of
https://github.com/jakejarvis/jarv.is.git
synced 2025-11-26 03:46:06 -05:00
18
components/page/PageTitle.module.scss
Normal file
18
components/page/PageTitle.module.scss
Normal file
@@ -0,0 +1,18 @@
|
||||
.title {
|
||||
margin-top: 0;
|
||||
margin-bottom: 0.4em;
|
||||
font-size: 2em;
|
||||
text-align: center;
|
||||
|
||||
a {
|
||||
background: none;
|
||||
padding-bottom: 0;
|
||||
color: var(--text);
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (max-width: 800px) {
|
||||
.title {
|
||||
font-size: 1.8em;
|
||||
}
|
||||
}
|
||||
17
components/page/PageTitle.tsx
Normal file
17
components/page/PageTitle.tsx
Normal file
@@ -0,0 +1,17 @@
|
||||
import { useRouter } from "next/router";
|
||||
|
||||
import styles from "./PageTitle.module.scss";
|
||||
|
||||
type Props = {
|
||||
title: unknown;
|
||||
};
|
||||
|
||||
export default function Content({ title }: Props) {
|
||||
const router = useRouter();
|
||||
|
||||
return (
|
||||
<h1 className={styles.title}>
|
||||
<a href={router.asPath}>{title}</a>
|
||||
</h1>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user