-
Notifications
You must be signed in to change notification settings - Fork 11.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Minor fixes of the dark mode + automatic equation numbering (#160)
* Add an option for showing selected publications * Improve publication styles * Update README.md * Clearfix * Fix minor issues with dark mode * Add automatic equation numbering (#158) * Fix a typo
- Loading branch information
1 parent
b36304a
commit 4f9cdb1
Showing
8 changed files
with
58 additions
and
29 deletions.
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 |
---|---|---|
|
@@ -3,5 +3,5 @@ _site | |
.jekyll-metadata | ||
.DS_store | ||
.ruby-version | ||
Gemfile.lock | ||
.tweet-cache/ | ||
Gemfile.lock |
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 |
---|---|---|
@@ -1,5 +1,12 @@ | ||
{% if site.enable_math %} | ||
<!-- MathJax --> | ||
<script type="text/javascript"> | ||
window.MathJax = { | ||
tex: { | ||
tags: 'ams' | ||
} | ||
}; | ||
</script> | ||
<script defer type="text/javascript" id="MathJax-script" src="https://cdn.jsdelivr.net/npm/mathjax@{{ site.mathjax.version }}/es5/tex-mml-chtml.js"></script> | ||
<script defer src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script> | ||
{% endif %} |
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
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 |
---|---|---|
@@ -1,35 +1,34 @@ | ||
$(document).ready(function() { | ||
const mode_toggle = document.getElementById("light-toggle"); | ||
|
||
mode_toggle.addEventListener("click", function() { | ||
const temp = localStorage.getItem('theme'); | ||
const temp = localStorage.getItem("theme"); | ||
toggleTheme(temp); | ||
}); | ||
|
||
let toggleTheme = (theme) => { | ||
if (theme == "dark") { | ||
setTheme(null); | ||
setTheme("light"); | ||
} else { | ||
setTheme('dark'); | ||
setTheme("dark"); | ||
} | ||
} | ||
|
||
let setTheme = (theme) => { | ||
trans(); | ||
if (theme) { | ||
document.documentElement.setAttribute('data-theme', theme) | ||
document.documentElement.setAttribute("data-theme", theme) | ||
} | ||
else { | ||
document.documentElement.removeAttribute('data-theme'); | ||
document.documentElement.removeAttribute("data-theme"); | ||
} | ||
localStorage.setItem('theme', theme); | ||
localStorage.setItem("theme", theme); | ||
}; | ||
|
||
let trans = () => { | ||
document.documentElement.classList.add('transition'); | ||
document.documentElement.classList.add("transition"); | ||
window.setTimeout(() => { | ||
document.documentElement.classList.remove('transition') | ||
}, 1000) | ||
document.documentElement.classList.remove("transition") | ||
}, 500) | ||
} | ||
}); | ||
|
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