Add support for site heading

This commit is contained in:
Anand Chowdhary
2020-08-10 13:51:54 +05:30
parent 330bea0405
commit 91eca93035
2 changed files with 24 additions and 3 deletions
+2 -2
View File
@@ -17,5 +17,5 @@ status-website:
cname: up.js.org
logoUrl: https://avatars3.githubusercontent.com/u/65495851?s=88&v=4
name: Koj Status
introTitle: Up.js is the open-source uptime monitor and status page, powered entirely by GitHub.
introMessage: This is a sample status page which uses **real-time** data from our [Github repository](https://github.com/koj-co/up.js).
introTitle: "**Up.js** is the open-source uptime monitor and status page, powered entirely by GitHub."
introMessage: This is a sample status page which uses **real-time** data from our [Github repository](https://github.com/koj-co/up.js). Literally, no server required, it's just GitHub Actions, Issues, and Pages.
+22 -1
View File
@@ -2,11 +2,32 @@
import ActiveIncidents from "../components/ActiveIncidents.svelte";
import Incidents from "../components/Incidents.svelte";
import config from "../data/config.json";
import snarkdown from "snarkdown";
</script>
<style>
p.lead {
font-size: 110%;
}
header {
margin-bottom: 2rem;
}
</style>
<svelte:head>
<title>Koj Status</title>
</svelte:head>
{JSON.stringify(config)}
<header>
{#if config['status-website']}
<h1>
{@html snarkdown(config['status-website'].introTitle)}
</h1>
<p class="lead">
{@html snarkdown(config['status-website'].introMessage)}
</p>
{/if}
</header>
<ActiveIncidents />
<Incidents />