1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2025-07-17 19:25:32 -04:00

stop being lazy with css selectors

This commit is contained in:
2022-01-30 11:38:37 -05:00
parent 9f34cec930
commit f0259dbab5
24 changed files with 498 additions and 471 deletions

View File

@@ -5,16 +5,12 @@
font-weight: 700;
}
.title a {
color: inherit;
.title code {
margin: 0 0.075em;
}
.title code {
font-size: 1em;
background: none !important;
border: 0 !important;
margin: 0 0.075em !important;
padding: 0 !important;
.link {
color: inherit;
}
@media screen and (max-width: 768px) {

View File

@@ -1,19 +1,20 @@
import Link from "next/link";
import classNames from "classnames";
import type { NoteMetaType } from "../../types";
import styles from "./NoteTitle.module.css";
type Props = Pick<NoteMetaType, "slug" | "htmlTitle">;
type Props = Pick<NoteMetaType, "slug" | "htmlTitle"> & { className?: string };
const NoteTitle = ({ slug, htmlTitle, ...rest }: Props) => (
<h1 className={styles.title}>
const NoteTitle = ({ slug, htmlTitle, className, ...rest }: Props) => (
<h1 className={classNames(styles.title, className)}>
<Link
href={{
pathname: "/notes/[slug]/",
query: { slug: slug },
}}
>
<a dangerouslySetInnerHTML={{ __html: htmlTitle }} {...rest} />
<a className={styles.link} dangerouslySetInnerHTML={{ __html: htmlTitle }} {...rest} />
</Link>
</h1>
);