Skip to content

Commit

Permalink
Fix styling
Browse files Browse the repository at this point in the history
  • Loading branch information
ferrybig committed Dec 19, 2024
1 parent db56680 commit d87fbe4
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
4 changes: 2 additions & 2 deletions app/_components/ArticleWrapper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -159,10 +159,10 @@ export default function ArticleWrapper({
{tags.length > 0 && (
<aside className={classes.moreReading}>
<Column>
<h1 className={classes.sectionHeading}>More {getMetadataBySlug(tags[0]).title}</h1>
<Heading id="read-more" level={1} padded>More {getMetadataBySlug(tags[0]).title}</Heading>
<nav>
<ul>
{getChildrenBySlug(tags[0]).reverse().map(p =>
{getChildrenBySlug(tags[0]).map(p =>
<li key={p.slug}>
<Link href={'/' + p.slug} aria-current={slug === p.slug}>
{p.title}
Expand Down
1 change: 0 additions & 1 deletion app/_components/Comments.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ function Comments() {
theme={baseUrl}
lang="en"
loading="lazy"
host="https://www.ferrybig.me/"
/>}
</div>
);
Expand Down
4 changes: 4 additions & 0 deletions app/_components/Heading.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,7 @@ h6.root {
transition: opacity 0.01s 0.1s;
mask-image: url(../../assets/link.svg);
}
.padded {
margin-left: 16px;
margin-right: 16px;
}
5 changes: 3 additions & 2 deletions app/_components/Heading.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,14 @@ interface Heading {
id: string;
title?: string;
hidden?: boolean;
padded?: boolean;
children: ReactNode;
}
function Heading({ level, className, id, title, hidden, children }: Heading) {
function Heading({ level, className, id, title, hidden, children, padded }: Heading) {
const Tag = `h${level}` as keyof JSX.IntrinsicElements;
return (
<Tag
className={classNames(className, id ? classes.withLink : classes.root)}
className={classNames(className, id ? classes.withLink : classes.root, padded && classes.padded)}
id={id}
title={title}
hidden={hidden}
Expand Down

0 comments on commit d87fbe4

Please sign in to comment.