mirror of
https://github.com/larstvei/SMT-for-IN3070.git
synced 2024-11-26 03:28:31 +00:00
Blur code blocks
This commit is contained in:
parent
8dc6f59e5d
commit
fb82ad5467
@ -1,5 +1,6 @@
|
|||||||
#+TITLE: SMT for IN3070
|
#+TITLE: SMT for IN3070
|
||||||
#+AUTHOR: Lars Tveito
|
#+AUTHOR: Lars Tveito
|
||||||
|
#+HTML_HEAD: <script type="text/javascript" src="js/script.js"></script>
|
||||||
#+HTML_HEAD: <link rel="stylesheet" type="text/css" href="Rethink/rethink.css" />
|
#+HTML_HEAD: <link rel="stylesheet" type="text/css" href="Rethink/rethink.css" />
|
||||||
#+OPTIONS: toc:nil num:nil html-style:nil
|
#+OPTIONS: toc:nil num:nil html-style:nil
|
||||||
|
|
||||||
|
16
js/script.js
Normal file
16
js/script.js
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
function blurPython() {
|
||||||
|
blocksToBlur = document.getElementsByClassName('src-python');
|
||||||
|
// Note: Skipping the two first code blocks
|
||||||
|
for (var i = 1; i < blocksToBlur.length; i++) {
|
||||||
|
const block = blocksToBlur[i]
|
||||||
|
block.setAttribute("style", "cursor: pointer;");
|
||||||
|
block.classList.toggle("blur");
|
||||||
|
block.addEventListener("click", function () {
|
||||||
|
block.classList.toggle("blur");
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
document.addEventListener('DOMContentLoaded', function(){
|
||||||
|
blurPython();
|
||||||
|
}, false);
|
Loading…
Reference in New Issue
Block a user