Skip to content

Commit

Permalink
Merge pull request #62 from jannis-baum/issue/61-add-definition-lists
Browse files Browse the repository at this point in the history
Add definition lists
  • Loading branch information
jannis-baum authored Apr 29, 2024
2 parents 99b128d + b324651 commit 25c7803
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 0 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"katex": "^0.15.6",
"markdown-it": "^13.0.1",
"markdown-it-anchor": "^8.6.7",
"markdown-it-deflist": "^3.0.0",
"markdown-it-emoji": "^2.0.2",
"markdown-it-footnote": "^4.0.0",
"markdown-it-inject-linenumbers": "^0.3.0",
Expand Down
1 change: 1 addition & 0 deletions src/parser/parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ mdit.use(require('markdown-it-texmath'), {
delimiters: 'dollars',
katexOptions: config.katexOptions,
});
mdit.use(require('markdown-it-deflist'));
/* eslint-enable @typescript-eslint/no-var-requires */
mdit.use(graphviz);

Expand Down
26 changes: 26 additions & 0 deletions static/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,32 @@ section.footnotes {
color: #7d7d7d;
}

/* --------------------------------------------------------------------------
* DEFIITION LISTS ---------------------------------------------------------- */

dl {
display: flex;
flex-flow: row wrap;
}
dt {
flex-basis: 20%;
text-align: right;
font-weight: bold;
box-sizing: border-box;
padding: 0.25em;
border-right: 0.2px solid #444;
margin: 0.25em 0;
}
dd {
flex-basis: 80%;
flex-grow: 1;
text-align: left;
box-sizing: border-box;
margin: 0;
padding: 0.25em;
margin: 0.25em 0;
}

/* --------------------------------------------------------------------------
* LIGHT MODE --------------------------------------------------------------- */
@media (prefers-color-scheme: light) {
Expand Down
5 changes: 5 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1557,6 +1557,11 @@ markdown-it-anchor@^8.6.7:
resolved "https://registry.yarnpkg.com/markdown-it-anchor/-/markdown-it-anchor-8.6.7.tgz#ee6926daf3ad1ed5e4e3968b1740eef1c6399634"
integrity sha512-FlCHFwNnutLgVTflOYHPW2pPcl2AACqVzExlkGQNsi4CJgqOHN7YTgDd4LuhgN1BFO3TS0vLAruV1Td6dwWPJA==

markdown-it-deflist@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/markdown-it-deflist/-/markdown-it-deflist-3.0.0.tgz#f2beb0b308beae5a62f62cca7fde0de48dcbe3de"
integrity sha512-OxPmQ/keJZwbubjiQWOvKLHwpV2wZ5I3Smc81OjhwbfJsjdRrvD5aLTQxmZzzePeO0kbGzAo3Krk4QLgA8PWLg==

markdown-it-emoji@^2.0.2:
version "2.0.2"
resolved "https://registry.yarnpkg.com/markdown-it-emoji/-/markdown-it-emoji-2.0.2.tgz#cd42421c2fda1537d9cc12b9923f5c8aeb9029c8"
Expand Down

0 comments on commit 25c7803

Please sign in to comment.