From 2a549dd46db6ff6bb53129a38c90a37c5d91bfd5 Mon Sep 17 00:00:00 2001 From: Jason Antwi-Appah Date: Sat, 5 Oct 2024 16:03:39 -0500 Subject: [PATCH] feat: link to comet clash on hero --- og-images.config.js | 6 +++--- src/components/home/hero.astro | 35 +++++++++++++++++++++++++++------- src/data.ts | 8 ++++---- src/styles/App.css | 16 ++++++++++++++++ 4 files changed, 51 insertions(+), 14 deletions(-) diff --git a/og-images.config.js b/og-images.config.js index 6a97a1b..d1bc2cb 100644 --- a/og-images.config.js +++ b/og-images.config.js @@ -6,7 +6,7 @@ import { html, styled } from 'og-images-generator' /** * Get the TTF font for the specified family and axes values. Adapted from [this GitHub issue comment](https://github.com/vercel/satori/issues/162#issuecomment-2058182646). * - * TL;DR: satori, the library which generates the image, doesn't support variable fonts, so we do some shenanigans to get Google Fonts to serve a non-variable font and then use that. + * NOTE: satori, the library which generates the image, doesn't support variable fonts, so we do some shenanigans to get Google Fonts to serve a non-variable font and then use that. * @param {string} family The font family * @param {string[]} axes The axes of the font * @param {number[]} value The values of the axes @@ -18,13 +18,13 @@ async function getTtfFont(family, axes, value) { const familyParam = `${axes.join(',')}@${value.join(',')}` // Get css style sheet with user agent Mozilla/5.0 Firefox/1.0 to ensure non-variable TTF is returned - const cssCall = await fetch(`https://fonts.googleapis.com/css2?family=${family}:${familyParam}&display=swap`, { + const cssRes = await fetch(`https://fonts.googleapis.com/css2?family=${family}:${familyParam}&display=swap`, { headers: { 'User-Agent': 'Mozilla/5.0 Firefox/1.0', }, }) - const css = await cssCall.text() + const css = await cssRes.text() const ttfUrl = css.match(/url\(([^)]+)\)/)?.[1] return await fetch(ttfUrl).then(res => res.arrayBuffer()) diff --git a/src/components/home/hero.astro b/src/components/home/hero.astro index 80ce363..c5e10e6 100644 --- a/src/components/home/hero.astro +++ b/src/components/home/hero.astro @@ -23,13 +23,34 @@ const VexGroup = await getImage({ padding: '4rem', }} > -

- - We are Comet Robotics,
the leading robotics club at UT Dallas. -

- - scroll to learn more - +

+ + We are Comet Robotics,
the leading robotics club at UT Dallas. +

+
+ scroll to learn more + + + +

Comet Clash

+

+ Watch 48 combat robots fight to the death in our inaugural Comet Clash competition, hosted in the ECSW building at UT Dallas on November 23rd! +

+

Learn More →

diff --git a/src/data.ts b/src/data.ts index 747b3bb..6c1c400 100644 --- a/src/data.ts +++ b/src/data.ts @@ -130,10 +130,10 @@ const footerLinks: LinkType[] = [ name: 'Discord', href: discordInvite, }, - // { - // name: 'Wiki', - // href: '#', - // }, + { + name: 'Wiki', + href: 'https://wiki.cometrobotics.org', + }, { name: 'Source Code', href: websiteRepo, diff --git a/src/styles/App.css b/src/styles/App.css index 09c09bd..65cfeef 100644 --- a/src/styles/App.css +++ b/src/styles/App.css @@ -103,4 +103,20 @@ html { .no-decoration { text-decoration: none; +} + +.scale-hover:hover { + transform: scale(1); +} + +.scale-hover:active { + transform: scale(0.98); +} + +.scale-hover { + transition-duration: 0.1s; + transition-property: transform; + transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); + transform: scale(0.97); + transform-origin: left; } \ No newline at end of file