Fix ourcraft paragraph links and light-theme buttons

This commit is contained in:
Daniel Flanagan 2023-01-02 14:22:34 -06:00
parent 62166c3ddb
commit b775ed86cd
Signed by: lytedev
GPG key ID: 5B2020A0F9921EF4
2 changed files with 9 additions and 9 deletions

View file

@ -35,7 +35,7 @@ title: Ourcraft Server Status Checker
function showServerStatus(key) {
for (const name of ['server-status-check-failed', 'server-status-online', 'server-status-offline', 'server-status-loading']) {
if (name == key) {
document.getElementById(name).style.display = 'block'
document.getElementById(name).style.display = null
} else {
document.getElementById(name).style.display = 'none'
}
@ -68,12 +68,12 @@ function handleOnlineStatus(status) {
if ('players' in status) {
if ('max' in status.players && 'now' in status.players) {
info.style.display = 'block'
info.style.display = null
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 && status.players.now > 0) {
samplingHeader.style.display = 'block'
samplingList.style.display = 'block'
samplingHeader.style.display = null
samplingList.style.display = null
samplingList.textContent = ''
for (const player of status.players.sample) {
const newListItem = document.createElement('li')
@ -82,7 +82,7 @@ function handleOnlineStatus(status) {
samplingList.appendChild(newListItem)
}
if (status.players.sample.length != status.players.now) {
document.getElementById('server-status-player-sampling-insufficient').style.display = 'block'
document.getElementById('server-status-player-sampling-insufficient').style.display = null
}
}
}

View file

@ -41,7 +41,7 @@ html,body
> h1, > h2, > h3, > h4, > h5, > h6 { color: var(--heading-fg) }
*:first-child { margin-top: 0 }
> h1, > h2, > h3, > h4, > h5, > h6
h1, h2, h3, h4, h5, h6
display flex
.anchor-link
@ -61,7 +61,7 @@ html,body
color var(--fg)
@media (max-width: 600px)
> h1, > h2, > h3, > h4, > h5, > h6
h1, h2, h3, h4, h5, h6
.anchor-link
padding 0 0.25em
font-weight normal
@ -232,7 +232,7 @@ ul.horizontal-blocks
flex-grow 1
display flex
padding 0.5em 2em
background-color rgba(255, 255, 255, 0.05)
background-color var(--header-bg)
text-align center
justify-content center
align-items center
@ -240,5 +240,5 @@ ul.horizontal-blocks
white-space nowrap
&:hover
background-color rgba(255, 255, 255, 0.1)
background-color var(--header-bg)