Skip to content
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 21 additions & 5 deletions src/lib/layout/unauthenticated.svelte
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the default slot has a u-margin-block-start-24, lets make it conditional like -

<div class:u-margin-block-start-24={!$isSmallViewport}>
    <slot />
</div>

Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,13 @@
{#if $app.themeInUse === 'dark'}
<img
src={AppwriteLogoDark}
width="160"
width="120"
class="u-block u-only-dark"
alt="Appwrite Logo" />
{:else}
<img
src={AppwriteLogoLight}
width="160"
width="120"
class="u-block u-only-light"
alt="Appwrite Logo" />
{/if}
Expand Down Expand Up @@ -167,18 +167,18 @@
</ul>
</div>
<div
class="logo u-flex u-gap-16 u-margin-inline-auto is-only-mobile u-margin-block-start-32">
class="logo u-flex u-gap-16 u-margin-inline-auto is-only-mobile u-margin-block-start-32 mobile-logo">
<a href={base}>
{#if $app.themeInUse === 'dark'}
<img
src={AppwriteLogoDark}
width="93"
width="120"
class="u-block u-only-dark"
alt="Appwrite Logo" />
{:else}
<img
src={AppwriteLogoLight}
width="93"
width="120"
class="u-block u-only-light"
alt="Appwrite Logo" />
{/if}
Expand Down Expand Up @@ -291,6 +291,13 @@
}
}

/* mobile only: remove top padding toeliminate extra space */
@media #{devices.$break1} {
.side-default {
padding-block-start: 0;
}
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we don't need this. instead add the side-default if !$isSmallViewport conditionally.


/* for smaller screens */
@media #{devices.$break2open} {
.side-default {
Expand Down Expand Up @@ -359,4 +366,13 @@
padding-block-start: 5rem;
}
}

.mobile-logo {
position: fixed;
bottom: 1.25rem;
left: 50%;
transform: translateX(-50%);
z-index: 10;
margin-block-start: 0 !important;
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

</style>
18 changes: 9 additions & 9 deletions src/routes/+error.svelte
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
<script>
import { base } from '$app/paths';
import { page } from '$app/state';
import { Button } from '$lib/elements/forms';
import { Unauthenticated } from '$lib/layout';
import { Typography } from '@appwrite.io/pink-svelte';
import { Button } from '$lib/elements/forms';
import { Badge, Typography, Layout } from '@appwrite.io/pink-svelte';
</script>

<Unauthenticated>
<Typography.Title size="xl"
>{'status' in page.error
? page.error.status || 'Invalid Argument'
: 'Invalid Argument'}</Typography.Title>
<Typography.Title>{page.error.message}</Typography.Title>
<Button href={base}>Back to the console</Button>
<Layout.Stack gap="l" alignItems="center">
<Badge variant="secondary" content="404 Page not found" />
<Typography.Title size="l" align="center">
The page you're looking for doesn't exist.
</Typography.Title>
<Button href={base}>Back to console</Button>
</Layout.Stack>
</Unauthenticated>