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) { function showServerStatus(key) {
for (const name of ['server-status-check-failed', 'server-status-online', 'server-status-offline', 'server-status-loading']) { for (const name of ['server-status-check-failed', 'server-status-online', 'server-status-offline', 'server-status-loading']) {
if (name == key) { if (name == key) {
document.getElementById(name).style.display = 'block' document.getElementById(name).style.display = null
} else { } else {
document.getElementById(name).style.display = 'none' document.getElementById(name).style.display = 'none'
} }
@ -68,12 +68,12 @@ function handleOnlineStatus(status) {
if ('players' in status) { if ('players' in status) {
if ('max' in status.players && 'now' in status.players) { 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-current-num-players').textContent = status.players.now
document.getElementById('server-status-max-players').textContent = status.players.max document.getElementById('server-status-max-players').textContent = status.players.max
if ('sample' in status.players && status.players.now > 0) { if ('sample' in status.players && status.players.now > 0) {
samplingHeader.style.display = 'block' samplingHeader.style.display = null
samplingList.style.display = 'block' samplingList.style.display = null
samplingList.textContent = '' samplingList.textContent = ''
for (const player of status.players.sample) { for (const player of status.players.sample) {
const newListItem = document.createElement('li') const newListItem = document.createElement('li')
@ -82,7 +82,7 @@ function handleOnlineStatus(status) {
samplingList.appendChild(newListItem) samplingList.appendChild(newListItem)
} }
if (status.players.sample.length != status.players.now) { 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) } > h1, > h2, > h3, > h4, > h5, > h6 { color: var(--heading-fg) }
*:first-child { margin-top: 0 } *:first-child { margin-top: 0 }
> h1, > h2, > h3, > h4, > h5, > h6 h1, h2, h3, h4, h5, h6
display flex display flex
.anchor-link .anchor-link
@ -61,7 +61,7 @@ html,body
color var(--fg) color var(--fg)
@media (max-width: 600px) @media (max-width: 600px)
> h1, > h2, > h3, > h4, > h5, > h6 h1, h2, h3, h4, h5, h6
.anchor-link .anchor-link
padding 0 0.25em padding 0 0.25em
font-weight normal font-weight normal
@ -232,7 +232,7 @@ ul.horizontal-blocks
flex-grow 1 flex-grow 1
display flex display flex
padding 0.5em 2em padding 0.5em 2em
background-color rgba(255, 255, 255, 0.05) background-color var(--header-bg)
text-align center text-align center
justify-content center justify-content center
align-items center align-items center
@ -240,5 +240,5 @@ ul.horizontal-blocks
white-space nowrap white-space nowrap
&:hover &:hover
background-color rgba(255, 255, 255, 0.1) background-color var(--header-bg)