Skip to content

Commit

Permalink
fmt + theme color
Browse files Browse the repository at this point in the history
  • Loading branch information
iamawatermelo committed Oct 23, 2024
1 parent 0f4b65b commit 63618ae
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 21 deletions.
4 changes: 2 additions & 2 deletions src/lib/emails/email.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@ export async function sendEmail<T extends Record<string, any>>(

if (emailResponse.ErrorCode !== 0) {
if (emailResponse.ErrorCode === 300) {
throw error(400, { message: 'Invalid email address' })
throw error(400, { message: 'Invalid email address' });
}

console.error(`Failed to send an email: ${emailResponse.Message}`);
throw error(500, { message: 'Internal server error' });
}
Expand Down
10 changes: 6 additions & 4 deletions src/routes/+layout.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
<noscript><link rel="stylesheet" href={fonts} /></noscript>
<!-- See app.html -->
<link rel="preload" as="style" href={fonts} id="font-preload" />

<meta name="theme-color" content="#2C1B10" />
</svelte:head>

<slot />
Expand Down Expand Up @@ -54,10 +56,10 @@
:global(:root) {
font-family: 'Revolution Sans ASCII', 'Revolution Sans', 'system-ui', 'sans-serif';
color: rgb(var(--fg));
// WebKit does this for some reason
font-synthesis: none;
// Scrollbar
color-scheme: dark;
}
Expand Down Expand Up @@ -173,12 +175,12 @@
}
}
}
// Global header styles
:global(h1) {
font-family: 'Revolution Sans Title', 'Revolution Sans ASCII', 'Revolution Sans', system-ui, sans-serif;
}
:global(h1, h2, h3, h4, h5, h6) {
font-variation-settings: 'opsz' 40;
font-weight: bolder;
Expand Down
25 changes: 13 additions & 12 deletions src/routes/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
name="description"
content="Revolution is a UK hackathon taking place sometime next year. We'd love to see you there!"
/>
<meta name="og:image" content="{SocialMediaCard}">
<meta name="og:image" content={SocialMediaCard} />
</svelte:head>

{#snippet email()}
Expand Down Expand Up @@ -128,46 +128,47 @@
display: flex;
}
}
.train-track {
position: relative;
height: 8em;
&::before, &::after {
&::before,
&::after {
position: absolute;
display: block;
content: "";
content: '';
top: 0;
left: 0;
width: 100%;
height: 100%;
}
&::before {
background: repeat space url('$lib/textures/track.svg') left/8em;
}
&::after {
// 149em comes from 2388px (width of SVG) / 16px
background: no-repeat space url('$lib/images/train.svg') left/149em;
animation: 30s linear infinite train;
animation-delay: var(--animation-delay);
}
&.reverse::after {
transform: rotate(0.5turn);
}
@keyframes train {
from {
background-position-x: -450%;
}
to {
background-position-x: 550%;
}
}
@media (prefers-reduced-motion) {
display: none;
}
Expand Down Expand Up @@ -218,7 +219,7 @@
display: block;
}
}
@media (prefers-reduced-motion) {
animation: none;
}
Expand Down
6 changes: 3 additions & 3 deletions src/routes/email/+page.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ export const actions = {
if (email instanceof File) {
return fail(400, { message: 'Attempted to upload a file?' });
}
if (email.includes('\'') || email.includes('\\')) {

if (email.includes("'") || email.includes('\\')) {
return fail(400, { message: 'Forbidden characters used' });
}

Expand All @@ -41,7 +41,7 @@ export const actions = {
})
).getId();
} catch (_) {
return fail(400, { message: "Invalid email address" })
return fail(400, { message: 'Invalid email address' });
}
} else {
if (existingRecord[0].get('Verified')) {
Expand Down

0 comments on commit 63618ae

Please sign in to comment.