Skip to content

Commit

Permalink
add discord redirect page
Browse files Browse the repository at this point in the history
  • Loading branch information
stewartkwokca committed Jun 19, 2024
1 parent cb04864 commit 5e9de38
Show file tree
Hide file tree
Showing 11 changed files with 1,207 additions and 1,086 deletions.
2 changes: 2 additions & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@ compressionLevel: mixed

enableGlobalCache: false

nodeLinker: node-modules

yarnPath: .yarn/releases/yarn-4.0.2.cjs
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"eslint-plugin-next": "^0.0.0",
"eslint-plugin-react": "^7.32.2",
"eslint-plugin-react-hooks": "^4.6.0",
"prettier": "^2.8.7"
"prettier": "^3.3.2"
},
"packageManager": "[email protected]"
}
8 changes: 3 additions & 5 deletions pages/blog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,10 @@ export async function getStaticProps() {
return {
props: {
posts: await Promise.all(
(
await getPostIds()
).map(
(await getPostIds()).map(
async (id) =>
await getPostMetadata(id).then((data) => ({ id, ...data }))
)
await getPostMetadata(id).then((data) => ({ id, ...data })),
),
),
},
};
Expand Down
28 changes: 28 additions & 0 deletions pages/discord.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import Link from "next/link";
import Footer from "../components/Footer";

import Navbar from "../components/Navbar";

import styles from "../styles/Discord.module.scss";

import Script from "next/script";

export default function Discord() {
return (
<div>
<Navbar />
<main className={styles.redirect}>
<h1>Redirecting you now...</h1>
<p className={styles.home}>
<Link href="https://discord.gg/H9enFH7g">
Click here if you are not redirected automatically
</Link>
</p>
</main>
<Script id="discord-redirect">
{`window.location.href = "https://discord.gg/H9enFH7g"`}
</Script>
<Footer />
</div>
);
}
4 changes: 2 additions & 2 deletions pages/events.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,10 @@ export default function Events() {
useEffect(() => setToday(new Date()), []);

const thisWeek = AllEvents.filter((e) =>
isSameWeek(new Date(e.start), today)
isSameWeek(new Date(e.start), today),
);
const upcomingEvents = AllEvents.filter(
(e) => e.start > today.valueOf() && !isSameWeek(new Date(e.start), today)
(e) => e.start > today.valueOf() && !isSameWeek(new Date(e.start), today),
);

return (
Expand Down
8 changes: 6 additions & 2 deletions styles/About.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -87,15 +87,19 @@
text-align: center;
font-weight: 800;
font-size: calc(0.35 * var(--size));
transition: font-size 100ms linear, padding-bottom 100ms linear;
transition:
font-size 100ms linear,
padding-bottom 100ms linear;
}

img {
margin: auto;
object-fit: contain;
width: calc(0.75 * var(--size));
height: calc(0.75 * var(--size));
transition: width 100ms linear, height 100ms linear;
transition:
width 100ms linear,
height 100ms linear;
}
}

Expand Down
15 changes: 15 additions & 0 deletions styles/Discord.module.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
.redirect {
min-height: 90vh;
padding: 4rem 0 4rem 0;
margin: 4rem 20% 0 20%;
text-align: center;
color: #ffba44;
}

.home a {
text-decoration: underline;
}

.home:hover a {
color: #ffba44;
}
11 changes: 8 additions & 3 deletions styles/Home.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@

height: max(var(--welcome-hero-height), 28rem);
overflow: hidden;
background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.5)),
background:
linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.5)),
url("/images/collage.png") no-repeat;
background-size: cover;

Expand Down Expand Up @@ -199,15 +200,19 @@ h1.motto {
text-align: center;
font-weight: 800;
font-size: calc(0.35 * var(--size));
transition: font-size 100ms linear, padding-bottom 100ms linear;
transition:
font-size 100ms linear,
padding-bottom 100ms linear;
}

img {
margin: auto;
object-fit: contain;
width: calc(0.75 * var(--size));
height: calc(0.75 * var(--size));
transition: width 100ms linear, height 100ms linear;
transition:
width 100ms linear,
height 100ms linear;
}
}

Expand Down
12 changes: 9 additions & 3 deletions styles/Navbar.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,9 @@
margin: -10px;
padding: 0;
border: 0;
transition: height $amazing-curve, min-height $amazing-curve,
transition:
height $amazing-curve,
min-height $amazing-curve,
margin $amazing-curve;

li {
Expand All @@ -234,7 +236,9 @@
width: 0;
height: 0;
margin: -10px;
transition: height $amazing-curve, margin $amazing-curve;
transition:
height $amazing-curve,
margin $amazing-curve;
}
}

Expand All @@ -244,7 +248,9 @@
margin: -10px;
padding: 0;
border: 0;
transition: height $amazing-curve, margin $amazing-curve;
transition:
height $amazing-curve,
margin $amazing-curve;
}
}

Expand Down
3 changes: 2 additions & 1 deletion styles/globals.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
font-family: "Westwood Sans 0.5";
font-style: normal;
font-weight: 400;
src: local("Westwood Sans Regular"),
src:
local("Westwood Sans Regular"),
url("../public/fonts/WestwoodSans-Regular-0.5.ttf") format("truetype");
}

Expand Down
Loading

0 comments on commit 5e9de38

Please sign in to comment.