Skip to content

Commit

Permalink
feat: add anchors (#836)
Browse files Browse the repository at this point in the history
* node slow sync potential reasons

* fix: fix build

* feat: add anchors

---------

Co-authored-by: Gleb Karavatski <[email protected]>
Co-authored-by: Karavatski Gleb <[email protected]>
  • Loading branch information
3 people authored Nov 6, 2024
1 parent 9c02bba commit 69bf41f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/components/Instructions/InstructionRow.module.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.anchorWithStickyNavbar {
scroll-margin-top: calc(var(--ifm-navbar-height) + 0.5rem);
}
3 changes: 2 additions & 1 deletion src/components/Instructions/InstructionRow.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
import React from 'react';
import Markdown from 'markdown-to-jsx';
import { DisplayableInstruction } from './DisplayableInstruction';
import styles from './InstructionRow.module.css';

type InstructionRowProps = {
instruction: DisplayableInstruction;
}

export function InstructionRow({ instruction }: InstructionRowProps) {
return (
<tr>
<tr className={styles.anchorWithStickyNavbar} id={instruction.fift}>
<td><code>{instruction.opcode ?? ''}</code></td>
<td><code>{instruction.fift}</code></td>
<td><code>{instruction.stack ?? ''}</code></td>
Expand Down

0 comments on commit 69bf41f

Please sign in to comment.