Skip to content

Commit

Permalink
Make headlines permalink-able
Browse files Browse the repository at this point in the history
Fixes mdn#1004
  • Loading branch information
peterbe committed Aug 12, 2020
1 parent 3484c2f commit 4758b3d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
4 changes: 4 additions & 0 deletions client/src/document/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,7 @@
top: 0;
right: 5px;
}

#content h2 a {
color: rgb(51, 51, 51);
}
6 changes: 5 additions & 1 deletion client/src/document/ingredients/prose.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@ export function Prose({ section }) {
export function ProseWithHeading({ id, section }) {
return (
<>
<h2 id={id}>{section.title}</h2>
<h2 id={id}>
<a href={`#${id}`} title="Permalink to this section">
{section.title}
</a>
</h2>
<Prose section={section} />
</>
);
Expand Down

0 comments on commit 4758b3d

Please sign in to comment.