move misplaced wotds, update scripts
This commit is contained in:
parent
05fb0d9144
commit
5549910b56
|
@ -1 +0,0 @@
|
|||
{"word":"sphexish","pronunciation":"ˈsfɛksɪʃ","definitions":[{"part":"Adjective","definitions":["Of animal behaviour: deterministic, preprogrammed."]}]}
|
20
index.html
20
index.html
|
@ -258,18 +258,31 @@
|
|||
<p>Humble home of user gome</p>
|
||||
</article>
|
||||
<article id='wotd'>
|
||||
<h2 class='title'>Word of the day</h2>
|
||||
<h2 class='title'></h2>
|
||||
<time class='date'></time>
|
||||
<div class='definiendum'></div>
|
||||
<div class='pronunciation'></div>
|
||||
</article>
|
||||
<article id='status'>
|
||||
<h2>My status</h2>
|
||||
<h2 id='statuscafe-title'></h2>
|
||||
<div id='statuscafe'>
|
||||
<div id='statuscafe-username'></div>
|
||||
<div id='statuscafe-content'></div>
|
||||
</div>
|
||||
<script src='https://status.cafe/current-status.js?name=gome' defer></script>
|
||||
<script defer>
|
||||
// based on https://status.cafe/current-status.js
|
||||
fetch('https://status.cafe/users/gome/status.json')
|
||||
.then( r => r.json() )
|
||||
.then( r => {
|
||||
if (!r.content.length) {
|
||||
document.getElementById('statuscafe-content').innerHTML = 'No status yet.'
|
||||
return
|
||||
}
|
||||
document.getElementById('statuscafe-title').innerHTML = 'My status'
|
||||
document.getElementById('statuscafe-username').innerHTML = "<a href='https://status.cafe/users/gome' target='_blank'>" + r.author + '</a> ' + r.face + ' ' + r.timeAgo
|
||||
document.getElementById('statuscafe-content').innerHTML = r.content
|
||||
})
|
||||
</script>
|
||||
</article>
|
||||
</main>
|
||||
<footer>
|
||||
|
@ -330,6 +343,7 @@
|
|||
if (!entry) {
|
||||
document.querySelector('#wotd').remove();
|
||||
} else {
|
||||
wotd.querySelector('.title').textContent = 'Word of the day';
|
||||
wotd.querySelector('.date').textContent = today.getDate() + ' ' + months[today.getMonth()] + ' ' + today.getFullYear();
|
||||
wotd.querySelector('.definiendum').textContent = entry.word;
|
||||
wotd.querySelector('.pronunciation').textContent = entry.pronunciation;
|
||||
|
|
Loading…
Reference in New Issue