This commit is contained in:
2020-01-02 14:14:47 +01:00
parent 920dec4f08
commit 3ed48ebcfb
3 changed files with 10 additions and 28 deletions

View File

@@ -1,38 +1,15 @@
<script> <script>
export let status; export let status
export let error; export let error
const dev = process.env.NODE_ENV === 'development'; const dev = process.env.NODE_ENV === 'development'
</script> </script>
<style>
h1, p {
margin: 0 auto;
}
h1 {
font-size: 2.8em;
font-weight: 700;
margin: 0 0 0.5em 0;
}
p {
margin: 1em auto;
}
@media (min-width: 480px) {
h1 {
font-size: 4em;
}
}
</style>
<svelte:head> <svelte:head>
<title>{status}</title> <title>{status}</title>
</svelte:head> </svelte:head>
<h1>{status}</h1> <h1>{status}</h1>
<p>{error.message}</p> <p>{error.message}</p>
{#if dev && error.stack} {#if dev && error.stack}

View File

@@ -1,14 +1,18 @@
import { readable, writable } from 'svelte/store' import { readable, writable } from 'svelte/store'
export const dev = process.env.NODE_ENV === 'development'
/* ========================================================================== /* ==========================================================================
Site related Site related
========================================================================== */ ========================================================================== */
const apiEndpoint = dev ? 'http://api.housesof.localhost/how' : 'https://api.housesof.world/_'
export const api = { export const api = {
graphql: '//api.housesof.localhost/how/gql?access_token=NJk0urljsdSvApUDzWxGgoO6', graphql: apiEndpoint + '/gql?access_token=NJk0urljsdSvApUDzWxGgoO6',
rest: '//api.housesof.localhost/how' rest: apiEndpoint
} }
// Data
export let currentLocation = writable() export let currentLocation = writable()
export let loaded = writable(false) export let loaded = writable(false)

View File

@@ -9,6 +9,7 @@
%sapper.styles% %sapper.styles%
%sapper.head% %sapper.head%
</head> </head>
<body> <body>
<div id="site">%sapper.html%</div> <div id="site">%sapper.html%</div>