Skip to content

Commit

Permalink
fix: error page and contact us
Browse files Browse the repository at this point in the history
  • Loading branch information
TorstenDittmann committed Sep 28, 2023
1 parent 19e719e commit ed13cf5
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 2 deletions.
42 changes: 42 additions & 0 deletions src/routes/+error.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<script lang="ts">
import { page } from '$app/stores';
import { FooterNav, MainFooter } from '$lib/components';
import { Main } from '$lib/layouts';
import DocsError from './docs/+error.svelte';
const isDocs = $page.url.pathname.startsWith('/docs');
</script>

{#if isDocs}
<DocsError />
{:else}
<Main>
<div class="aw-big-padding-section">
<div class="aw-big-padding-section-level-2">
<div class="aw-container">
<div class="aw-hero" style="--hero-gap:1.25rem;">
<span class="aw-badges aw-eyebrow">{$page.status}</span>
<h1 class="aw-headline aw-u-color-text-primary">
{$page.error?.message ?? 'An error has occured'}
</h1>
{#if $page.status === 404}
<p class="aw-description">
Sorry, it seems that the page you are looking for does not exist. Feel free to use
our navigation menu or the button below to explore more of Appwrite's documentation.
</p>
{/if}
<a href="/" class="aw-button is-secondary u-cross-child-center u-margin-block-start-12">
<span>Back to homepage</span>
</a>
</div>
</div>
</div>
<div class="aw-big-padding-section-level-2 u-position-relative">
<div class="aw-container">
<FooterNav />
<MainFooter />
</div>
</div>
</div>
</Main>
{/if}
6 changes: 4 additions & 2 deletions src/routes/contact-us/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -206,17 +206,17 @@
type="text"
placeholder="Name"
aria-label="Name"
name="name"
bind:value={firstName}
/>
</li>
<li class="aw-form-item">
<input
required
class="aw-input-text"
type="email"
name="email"
placeholder="Email address"
aria-label="Email address"
bind:value={email}
/>
</li>
<li class="aw-form-item is-column-span-2">
Expand All @@ -227,6 +227,7 @@
name="subject"
placeholder="Subject"
aria-label="Subject"
bind:value={subject}
/>
</li>
<li class="aw-form-item is-column-span-2">
Expand All @@ -236,6 +237,7 @@
class="aw-input-text"
placeholder="Your message"
aria-label="Message"
bind:value={message}
/>
</li>
</ul>
Expand Down

0 comments on commit ed13cf5

Please sign in to comment.