Add RSS feed
This commit is contained in:
parent
67943d3fed
commit
3830e9e4cd
2 changed files with 14 additions and 14 deletions
|
@ -71,19 +71,19 @@ function handleOnlineStatus(status) {
|
|||
info.style.display = 'block'
|
||||
document.getElementById('server-status-current-num-players').textContent = status.players.now
|
||||
document.getElementById('server-status-max-players').textContent = status.players.max
|
||||
}
|
||||
if ('sample' in status.players) {
|
||||
samplingHeader.style.display = 'block'
|
||||
samplingList.style.display = 'block'
|
||||
samplingList.textContent = ''
|
||||
for (const player of status.players.sample) {
|
||||
const newListItem = document.createElement('li')
|
||||
newListItem.textContent = player.name
|
||||
newListItem.title = player.id
|
||||
samplingList.appendChild(newListItem)
|
||||
}
|
||||
if (status.players.sample.length != status.players.now) {
|
||||
document.getElementById('server-status-player-sampling-insufficient').style.display = 'block'
|
||||
if ('sample' in status.players && status.players.now > 0) {
|
||||
samplingHeader.style.display = 'block'
|
||||
samplingList.style.display = 'block'
|
||||
samplingList.textContent = ''
|
||||
for (const player of status.players.sample) {
|
||||
const newListItem = document.createElement('li')
|
||||
newListItem.textContent = player.name
|
||||
newListItem.title = player.id
|
||||
samplingList.appendChild(newListItem)
|
||||
}
|
||||
if (status.players.sample.length != status.players.now) {
|
||||
document.getElementById('server-status-player-sampling-insufficient').style.display = 'block'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
{{ .Content }}
|
||||
|
||||
<h2>Latest Posts</h2>
|
||||
<h2>Latest Posts (<a target="_blank" href="/index.xml">RSS</a>)</h2>
|
||||
|
||||
<ul>
|
||||
{{ range (where .Site.RegularPages "Section" "blog") }}
|
||||
|
|
Loading…
Reference in a new issue