Skip to content

Commit

Permalink
fix: styling for article header link box
Browse files Browse the repository at this point in the history
  • Loading branch information
kalecream committed Jan 16, 2024
1 parent 8d9b448 commit 5ad78a4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
12 changes: 7 additions & 5 deletions frontend/src/components/blog/articles.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,18 @@
color: var(--primary);
}

@media (max-width: 768px) {
@include breakpoint-range($from: mobile) {
display: none;
}

@media (min-width: 1024px) {
width: 360px;
@include breakpoint-range($from: desktopLarge) {
display: block;
width: 450px;
position: fixed;
left: 0;
top: 40%;
padding: 0 2rem;
top: 45%;
padding: 0 1rem;
font-size: 0.8rem;
}
}

Expand Down
4 changes: 2 additions & 2 deletions frontend/src/pages/posts/[slug].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import rehypeSlug from 'rehype-slug';
import { useHeadsObserver } from '@hooks/useObserver';
import getReadTime from '@utils/read-time';
import { ReactNode } from '@mdx-js/react/lib';

import article from '@components/blog/articles.module.scss';

type PostPageProps = {
source: MDXRemoteSerializeResult;
Expand Down Expand Up @@ -79,7 +79,7 @@ const PostPage = ({ source, frontMatter }: PostPageProps): JSX.Element => {
</div>
</div>

<aside className="table-of-contents">
<aside className={article['table-of-contents']}>
<ul>
{headings.map((heading) => {
const activeHeader = document.querySelector(`#${heading.id}`) ?? headings[0].id;
Expand Down

0 comments on commit 5ad78a4

Please sign in to comment.