Skip to content

Commit

Permalink
Merge pull request #59 from tuurep/issue/57-footnotes
Browse files Browse the repository at this point in the history
Close #57
  • Loading branch information
jannis-baum authored Jan 14, 2024
2 parents fbe9dea + 0b2f3ee commit 99b128d
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 1 deletion.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,10 @@
"markdown-it": "^13.0.1",
"markdown-it-anchor": "^8.6.7",
"markdown-it-emoji": "^2.0.2",
"markdown-it-footnote": "^4.0.0",
"markdown-it-inject-linenumbers": "^0.3.0",
"markdown-it-texmath": "^1.0.0",
"markdown-it-task-lists": "^2.1.1",
"markdown-it-texmath": "^1.0.0",
"uuid": "^9.0.0",
"ws": "^8.13.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 @@ -20,6 +20,7 @@ mdit.use(anchor, {
/* eslint-disable @typescript-eslint/no-var-requires */
mdit.use(require('markdown-it-emoji'));
mdit.use(require('markdown-it-task-lists'));
mdit.use(require('markdown-it-footnote'));
mdit.use(require('markdown-it-inject-linenumbers'));
mdit.use(require('markdown-it-texmath'), {
engine: require('katex'),
Expand Down
17 changes: 17 additions & 0 deletions static/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,18 @@ hr {
border: 0;
}

/* --------------------------------------------------------------------------
* FOOTNOTE ----------------------------------------------------------------- */
.footnotes-sep {
display: none;
}
section.footnotes {
font-size: 0.75rem;
margin-top: 1.25rem;
border-top: 0.2px solid #444;
color: #7d7d7d;
}

/* --------------------------------------------------------------------------
* LIGHT MODE --------------------------------------------------------------- */
@media (prefers-color-scheme: light) {
Expand Down Expand Up @@ -167,4 +179,9 @@ hr {
hr {
background-color: #d0d7de;
}

section.footnotes {
border-top: 0.2px solid #d8dee4;
color: #656d76;
}
}
5 changes: 5 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1562,6 +1562,11 @@ markdown-it-emoji@^2.0.2:
resolved "https://registry.yarnpkg.com/markdown-it-emoji/-/markdown-it-emoji-2.0.2.tgz#cd42421c2fda1537d9cc12b9923f5c8aeb9029c8"
integrity sha512-zLftSaNrKuYl0kR5zm4gxXjHaOI3FAOEaloKmRA5hijmJZvSjmxcokOLlzycb/HXlUFWzXqpIEoyEMCE4i9MvQ==

markdown-it-footnote@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/markdown-it-footnote/-/markdown-it-footnote-4.0.0.tgz#02ede0cb68a42d7e7774c3abdc72d77aaa24c531"
integrity sha512-WYJ7urf+khJYl3DqofQpYfEYkZKbmXmwxQV8c8mO/hGIhgZ1wOe7R4HLFNwqx7TjILbnC98fuyeSsin19JdFcQ==

markdown-it-inject-linenumbers@^0.3.0:
version "0.3.0"
resolved "https://registry.yarnpkg.com/markdown-it-inject-linenumbers/-/markdown-it-inject-linenumbers-0.3.0.tgz#654364fa7a2dcb5f4461ef6d29d2603b74b29fd7"
Expand Down

0 comments on commit 99b128d

Please sign in to comment.