-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
💄 added the current page highlight to the hamburger menu
- Loading branch information
Showing
14 changed files
with
111 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1 @@ | ||
{ | ||
"images": { | ||
"remote_images": ["https?://wdcc-website\\.fly\\.storage\\.tigris\\.dev/.*"] | ||
} | ||
} | ||
{"images":{"remote_images":["https?://wdcc-website\\.fly\\.storage\\.tigris\\.dev/.*"]}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,4 +17,3 @@ export default defineConfig({ | |
domains: ["wdcc-website.fly.storage.tigris.dev"], | ||
}, | ||
}); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,4 +14,4 @@ | |
"components": "@/components", | ||
"utils": "@/lib/utils" | ||
} | ||
} | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
interface ResponsiveImageProps { | ||
imageUrl: string; | ||
imageAlt: string; | ||
} | ||
|
||
const ResponsiveImage = ({ imageUrl, imageAlt }: ResponsiveImageProps) => { | ||
return ( | ||
<img | ||
className="max-w-xs sm:max-w-xl md:max-w-2xl lg:max-w-3xl rounded-lg" | ||
src={imageUrl} | ||
alt={imageAlt} | ||
/> | ||
); | ||
}; | ||
|
||
export default ResponsiveImage; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import ResponsiveImage from "../ResponsiveImage"; | ||
import { Button } from "../ui/button"; | ||
|
||
interface HeroProps { | ||
intro: string; | ||
subIntro: string; | ||
imageUrl: string; | ||
imageAlt: string; | ||
linkHref: string; | ||
linkText: string; | ||
} | ||
|
||
const Hero = ({ | ||
intro, | ||
subIntro, | ||
imageUrl, | ||
imageAlt, | ||
linkHref, | ||
linkText, | ||
}: HeroProps) => { | ||
return ( | ||
<div className="flex flex-col items-center gap-6 lg:gap-8"> | ||
<Button variant="skyblue" className="rounded-full px-8 cursor-default"> | ||
The University of Auckland | ||
</Button> | ||
<h1 className="text-center leading-[2.7625rem] md:leading-[4.2rem] lg:leading-[5.8rem] text-4xl md:text-5xl lg:text-6xl"> | ||
{intro} | ||
</h1> | ||
<p className="max-w-md overflow-hidden flex items-center justify-center text-center"> | ||
{subIntro} | ||
</p> | ||
<Button asChild> | ||
<a href={linkHref}>{linkText}</a> | ||
</Button> | ||
<ResponsiveImage imageUrl={imageUrl} imageAlt={imageAlt} /> | ||
</div> | ||
); | ||
}; | ||
|
||
export default Hero; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
import { type ClassValue, clsx } from "clsx" | ||
import { twMerge } from "tailwind-merge" | ||
import { type ClassValue, clsx } from "clsx"; | ||
import { twMerge } from "tailwind-merge"; | ||
|
||
export function cn(...inputs: ClassValue[]) { | ||
return twMerge(clsx(inputs)) | ||
return twMerge(clsx(inputs)); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,37 @@ | ||
--- | ||
import { Button } from "@/components/ui/button"; | ||
import Hero from "@/components/home/Hero"; | ||
import "@/global.css"; | ||
import Layout from '../layouts/layout.astro'; | ||
import Layout from "../layouts/layout.astro"; | ||
import fetchApi from "../lib/strapi"; | ||
const STRAPI_URL = import.meta.env.STRAPI_URL; | ||
const index = await fetchApi<any>({ | ||
endpoint: "index?populate=*", | ||
wrappedByKey: "data", | ||
}); | ||
// const introContent = index.attributes.intro && await marked.parse(index.attributes.intro); | ||
// const subIntroContent = index.attributes.subIntro && await marked.parse(index.attributes.subIntro); | ||
const intro = index.attributes.intro; | ||
const subIntro = index.attributes.subintro; | ||
const imageUrl = | ||
STRAPI_URL + index.attributes.gallery.data[0].attributes.formats.large.url; | ||
const imageAlt = index.attributes.gallery.data[0].attributes.alternativeText; | ||
const linkHref = index.attributes.links[0].href; | ||
const linkText = index.attributes.links[0].value; | ||
--- | ||
|
||
<Layout title='WDCC' description="The Web Development & Consulting Club @ The University of Auckland"> | ||
<h1>Test H1</h1> | ||
<h2>Test H2</h2> | ||
<h3>Test H3</h3> | ||
<h4>Test H4</h4> | ||
<p>Test P</p> | ||
<p class="text-sm">Text xs</p> | ||
<Button>Hello</Button> | ||
<Layout | ||
title="WDCC" | ||
description="The Web Development & Consulting Club @ The University of Auckland" | ||
> | ||
<div class="container"> | ||
<Hero | ||
intro={intro} | ||
subIntro={subIntro} | ||
imageUrl={imageUrl} | ||
imageAlt={imageAlt} | ||
linkHref={linkHref} | ||
linkText={linkText} | ||
/> | ||
</div> | ||
</Layout> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters