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
44f49f2afa
commit
fdcd5c7efa
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];
|
@ -279,7 +279,7 @@ defmodule Server do
|
||||
|
||||
case find_peer(user_data) do
|
||||
nil -> add_peer(user_data)
|
||||
{{peer0, msg0}, {peer1, msg1}} ->
|
||||
{ {peer0, msg0}, {peer1, msg1} } ->
|
||||
:gen_udp.send(socket, peer0, msg0)
|
||||
:gen_udp.send(socket, peer1, msg1)
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user