-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1caccbc
commit 298b2dd
Showing
7 changed files
with
154 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"root": true, | ||
"extends": ["eslint:recommended"], | ||
"parserOptions": { | ||
"ecmaVersion": "latest" | ||
}, | ||
"rules": {}, | ||
"ignorePatterns": ["src/_build/**/*"], | ||
"env": { | ||
"browser": true | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
trailingComma = "es5" | ||
tabWidth = 2 | ||
semi = false | ||
singleQuote = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
gitpython | ||
myst-parser | ||
pandas | ||
pre-commit | ||
pydata-sphinx-theme | ||
sphinx>=7 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/** Set up event listeners for the git history modal */ | ||
function setupGitHistory() { | ||
const checkbox = document.getElementById('history-checkbox') | ||
const background = document.getElementById('history-modal-background') | ||
const foreground = document.getElementById('history-modal-foreground') | ||
|
||
// Click on the background to close the modal | ||
background.onclick = () => { | ||
checkbox.checked = '' | ||
} | ||
|
||
// Prevent clicks on the table from closing the modal | ||
foreground.onclick = (event) => { | ||
event.stopPropagation() | ||
} | ||
|
||
// Listen for escape key to close modal | ||
document.addEventListener('keydown', (event) => { | ||
if (event.key === 'Escape' && checkbox.checked) { | ||
checkbox.checked = '' | ||
} | ||
}) | ||
} | ||
|
||
window.addEventListener('DOMContentLoaded', () => { | ||
setupGitHistory() | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<label for="history-checkbox" class="modal-checkbox-label"> | ||
<i class="fa-solid fa-clock-rotate-left"></i> | ||
Show article history | ||
</label> | ||
<input id="history-checkbox" type="checkbox" class="modal-checkbox" /> | ||
<div id="history-modal-background" class="modal-background"> | ||
<div id="history-modal-foreground" class="modal-foreground"> | ||
<div class="modal-body">{{ add_git_history() }}</div> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters