Skip to content

Commit

Permalink
Merge pull request #97 from UoaWDCC/ORAKEI-95-404-Page
Browse files Browse the repository at this point in the history
Orakei 95 404 page
  • Loading branch information
chrisv09 authored Oct 13, 2024
2 parents 3614f3c + 5857139 commit 41a0a60
Show file tree
Hide file tree
Showing 3 changed files with 144 additions and 0 deletions.
10 changes: 10 additions & 0 deletions public/error404.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
33 changes: 33 additions & 0 deletions src/pages/404.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
import "../styles/global.css";
import "../styles/error404.css";
import Layout from '../layouts/layout.astro';
import BlobBackground from "../components/BlobBackground/BlobBackground";
---

<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="generator" content={Astro.generator} />
<title>404 Page</title>
</head>

<Layout>
<div class="content-wrapper">
<BlobBackground zIndexVal="-10" />
<div class="error404-wrapper">
<div class="image-wrapper">
<img src="/error404.svg" alt="404" />
</div>
<div class="error-message">
<p>Oops, we can't find the page you are looking for!</p>
</div>
<div class="home-button-wrapper">
<a href="/" class="home-button">Return to home</a>
</div>
</div>
</div>
</Layout>

101 changes: 101 additions & 0 deletions src/styles/error404.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
.error404-wrapper {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
text-align: center;
padding: 0 20px;
overflow: hidden;
}

.content-wrapper {
position: relative;
overflow: hidden;
margin-top: -100px;
}

.image-wrapper {
width: 35%;
height: auto;
text-align: center;
padding-top: 100px;
}

h1 {
font-size: 10rem;
font-weight: 900;
color: var(--YOO-Green-Primary);
}

.error-message {
font-size: 3rem;
font-weight: 800;
margin-bottom: 2rem;
color: var(--YOO-Green-Primary);
max-width: 40vw;
}

.home-button {
padding: 15px 40px;
font-size: 2rem;
background: var(--YOO-Green-Light);
border-radius: 20px;
color: 142601;
font-weight: 700;
line-height: 1;
text-decoration: none;
transition: all 400ms;
box-shadow: 4px 4px 6px 0px rgba(110, 172, 109, 0.15);
cursor: pointer;
}

.home-button:hover {
opacity: 0.9;
box-shadow: 4px 4px 8px -2px hsl(188deg 100% 16% / 0.1), 12px 12px 18px -3px hsl(188deg 100% 16% / 0.1);
transform: translate(-3px, -3px);
transition: all 200ms;
}

.home-button-wrapper {
margin-bottom: 2.5rem;
}

/* Media Queries for Mobile */
@media (max-width: 768px) {
.image-wrapper {
width: 60%;
}

h1 {
font-size: 5rem;
}

.error-message {
font-size: 2rem;
max-width: 80vw;
}

.home-button {
font-size: 1.5rem;
padding: 10px 20px;
}
}

@media (max-width: 480px) {
.image-wrapper {
width: 80%;
}

h1 {
font-size: 4rem;
}

.error-message {
font-size: 1.5rem;
}

.home-button {
font-size: 1.2rem;
padding: 8px 16px;
}
}

0 comments on commit 41a0a60

Please sign in to comment.