mirror of
https://github.com/vale981/highlight-lisp
synced 2025-03-05 09:21:38 -05:00
theme-switching tests
This commit is contained in:
parent
34075b1a19
commit
0b6facedce
2 changed files with 19 additions and 2 deletions
|
@ -6,7 +6,7 @@
|
|||
<link rel="stylesheet" href="/highlight-lisp/css/highlight.css" />
|
||||
|
||||
<script type="text/javascript" src="/highlight-lisp/js/highlight-lisp/highlight-lisp.js"></script>
|
||||
<link rel="stylesheet" href="/highlight-lisp/js/highlight-lisp/themes/github.css" />
|
||||
<link rel="stylesheet" id="hl-theme" href="/highlight-lisp/js/highlight-lisp/themes/github.css" />
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
|
19
index.md
19
index.md
|
@ -16,9 +16,26 @@ Worry no more, your life is about to be transformed:
|
|||
type="button"
|
||||
value="Click to CHANGE YOUR LIFE FOREVER!"
|
||||
id="highlight_btn"
|
||||
onclick="HighlightLisp.highlight_auto(); document.getElementById('highlight_btn').disabled=true;"
|
||||
onclick="do_highlight();"
|
||||
/> **!!!WARNING!!!** There is no going back!
|
||||
|
||||
<script type="text/javascript">
|
||||
function do_highlight() {
|
||||
HighlightLisp.highlight_auto();
|
||||
document.getElementById('highlight_btn').disabled=true;
|
||||
}
|
||||
function switch_theme(name) {
|
||||
var style = document.getElementById('hl-theme');
|
||||
if(!style) return;
|
||||
style.href = '/highlight-lisp/js/highlight-lisp/themes/'+name+'.css';
|
||||
}
|
||||
</script>
|
||||
|
||||
<ul class="themes">
|
||||
<li><a href="#github" onclick="switch_theme('github');">Github</a></li>
|
||||
<li><a href="#dark" onclick="switch_theme('dark');">dark</a></li>
|
||||
</ul>
|
||||
|
||||
<pre><code class="lisp">;; known globals
|
||||
*read-base*
|
||||
(let* ((*package* nil)) 'random-symbol) ; let/let*/lambda are "special"
|
||||
|
|
Loading…
Add table
Reference in a new issue