style updates

This commit is contained in:
Matthias Kretschmann 2022-10-18 19:14:49 +01:00
parent b9f921ae46
commit 9dca4a0967
Signed by: m
GPG Key ID: 606EEEF3C479A91F
3 changed files with 19 additions and 9 deletions

View File

@ -8,11 +8,11 @@ import CheckAsset from '../images/check.svg'
function statusIcon(state: State): ReactElement { function statusIcon(state: State): ReactElement {
if (state === State.Up) { if (state === State.Up) {
return <CheckAsset className={styles.check} /> return <CheckAsset className={`${styles.icon} ${styles.check}`} />
} else if (state === State.Down) { } else if (state === State.Down) {
return <>🚨</> return <span className={styles.icon}>🚨</span>
} else { } else {
return <>🚧</> return <span className={styles.icon}>🚧</span>
} }
} }
@ -85,7 +85,9 @@ export default function HomePage(): ReactElement {
: value.status : value.status
)}{' '} )}{' '}
{key} {key}
<code className={styles.version}>{value.version}</code> <code className={styles.version} title="deployed version">
{value.version}
</code>
</h2> </h2>
{value.statusMessages && value.statusMessages !== '' && ( {value.statusMessages && value.statusMessages !== '' && (

View File

@ -3,10 +3,14 @@
margin: 0 auto; margin: 0 auto;
} }
@media screen and (min-width: 50rem) {
.container {
padding: calc(var(--spacer) * 2);
}
}
.footer { .footer {
padding: 2rem 0; padding: var(--spacer) 0;
justify-content: center;
align-items: center;
} }
.title { .title {
@ -71,12 +75,15 @@
margin: 0 auto; margin: 0 auto;
} }
.check { .icon {
display: inline-block; display: inline-block;
fill: var(--brand-alert-green);
margin-right: calc(var(--spacer) / 6); margin-right: calc(var(--spacer) / 6);
} }
.check {
fill: var(--brand-alert-green);
}
.messages { .messages {
list-style-type: square; list-style-type: square;
margin-left: 1rem; margin-left: 1rem;

View File

@ -12,6 +12,7 @@ export async function getData(): Promise<{ [key: string]: Status }> {
const output = Object.fromEntries( const output = Object.fromEntries(
response.data?.map((item) => [item.network, item]) response.data?.map((item) => [item.network, item])
) )
console.log('Got new data', output)
return output return output
} catch (error) { } catch (error) {
console.error(error.message) console.error(error.message)