-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
369 additions
and
225 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,40 @@ | ||
<script> | ||
import Blitzheader from "./templates/Header.svelte"; | ||
import Blitzcontent from "./templates/Content.svelte"; | ||
import Blitzfooter from "./templates/Footer.svelte"; | ||
</script> | ||
import { onMount } from 'svelte'; | ||
import BlitzHeader from './templates/Header.svelte'; | ||
import BlitzContent from './templates/Content.svelte'; | ||
let settings; | ||
async function getSettings() { | ||
const res = await fetch( | ||
BLITZ.settingsUrl, | ||
{ | ||
headers: { | ||
'B-PID': BLITZ.currentID | ||
} | ||
} | ||
); | ||
<Blitzheader/> | ||
<main class="min-h-screen" role="main"> | ||
<Blitzcontent/> | ||
</main> | ||
<Blitzfooter/> | ||
// TODO: settings may return 404 | ||
const data = await res.json(); | ||
return data; | ||
} | ||
onMount(async() => { | ||
settings = getSettings(); | ||
}); | ||
</script> | ||
{#await settings then setting} | ||
{#if setting && setting.showHeader} | ||
<BlitzHeader | ||
logoUrl={setting.logoUrl} | ||
textColor={setting.textColor} | ||
backgroundColor={setting.backgroundColor} | ||
showNavigation={setting.showNavigation} | ||
/> | ||
<main class="min-h-screen" role="main"> | ||
<BlitzContent /> | ||
</main> | ||
{/if} | ||
{/await} |
Oops, something went wrong.