Skip to content
This repository has been archived by the owner on Aug 30, 2023. It is now read-only.

Commit

Permalink
Merge pull request #127 from nloveladyallen/smart-template
Browse files Browse the repository at this point in the history
Smart loading template
  • Loading branch information
brrd authored Nov 9, 2016
2 parents 6399c0f + 6715390 commit 6c83f5b
Showing 1 changed file with 19 additions and 6 deletions.
25 changes: 19 additions & 6 deletions default/templates/default/template.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,29 @@
<title>$DOCUMENT_TITLE</title>
<meta charset='utf-8'/>
<link rel="stylesheet" type="text/css" href="$ASSETS_PATH/styles.css">
<link rel="stylesheet" href="http://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.2.0/styles/default.min.css">
<script>
window.onload = function() {
if (document.querySelector("script[type=\"math/tex; mode=display\"]") !== null) {
var mathjax = document.createElement("script");
mathjax.src = "https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML";
document.head.appendChild(mathjax);
}
if (document.getElementsByTagName("code").length !== 0) {
var highlight = document.createElement("script");
var highlightcss = document.createElement("link");
highlight.src = "http://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.2.0/highlight.min.js";
highlightcss.rel = "stylesheet";
highlightcss.href = "http://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.2.0/styles/default.min.css";
highlight.onload = function() {hljs.initHighlighting();};
document.head.appendChild(highlight);
document.head.appendChild(highlightcss);
}
}
</script>
</head>
<body>
<article>
$DOCUMENT_CONTENT
</article>
</body>
<!-- MathJax (from CDN) -->
<script src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML"></script>
<!-- highlight.js (from CDN) -->
<script src="http://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.2.0/highlight.min.js"></script>
<script>hljs.initHighlightingOnLoad();</script>
</html>

0 comments on commit 6c83f5b

Please # to comment.