mirror of
https://github.com/dongdigua/dongdigua.github.io
synced 2024-11-23 23:53:10 +08:00
add random quote
This commit is contained in:
parent
87bb9dfe21
commit
36cd19bd3a
14
index.html
14
index.html
@ -25,19 +25,21 @@
|
||||
<div class="home p-contact contact h-card vcard">
|
||||
<pre>
|
||||
(let ((name "dongdigua")
|
||||
(blog "<a href=posts>posts/</a>")
|
||||
(feed "<a href=feed.xml>feed.xml</a>")
|
||||
(blog "<a href=https://dongdigua.github.io/posts>posts/</a>")
|
||||
(feed "<a href=https://dongdigua.github.io/feed.xml>feed.xml</a>")
|
||||
(github "<a href=https://github.com/dongdigua>@dongdigua</a>")
|
||||
(payment "<a href=xmr.txt>monero</a>")
|
||||
(pgp "<a href=pgpkey.txt>0x56CEE157C9F5334F</a>")
|
||||
(payment "<a href=https://dongdigua.github.io/xmr.txt>monero</a>")
|
||||
(pgp "<a href=https://dongdigua.github.io/pgpkey.txt>0x56CEE157C9F5334F</a>")
|
||||
(interests
|
||||
'("computer science"
|
||||
"cyber security"
|
||||
"GeoGebra"
|
||||
"Minecraft redstone survival"
|
||||
"anime"
|
||||
(Lost (In (Superfluous (Parentheses))))))))
|
||||
(Lost (In (Superfluous (Parentheses)))))))
|
||||
(random-quote
|
||||
"<span id="quote"></span>"))
|
||||
</pre>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
<script src="./js/random-quote.js"></script>
|
||||
|
12
js/random-quote.js
Normal file
12
js/random-quote.js
Normal file
@ -0,0 +1,12 @@
|
||||
var data = [
|
||||
"富强民主闻名和谐, 自由平等公正法治, 爱国敬业诚信友善",
|
||||
"解放思想, 实事求是, 与时俱进",
|
||||
|
||||
"You are not alone",
|
||||
"The internet is FULL, go away!",
|
||||
"May the --force be with you",
|
||||
"Software that sucks less",
|
||||
];
|
||||
|
||||
var index = Math.floor((Math.random() * data.length));
|
||||
window.document.getElementById("quote").innerHTML = data[index];
|
Loading…
Reference in New Issue
Block a user