Skip to content

Commit

Permalink
Merge branch 'main' into 102_rich-text-bug
Browse files Browse the repository at this point in the history
  • Loading branch information
zozzzC committed Sep 13, 2024
2 parents b7c4f80 + 5c01cb9 commit 08ffd04
Show file tree
Hide file tree
Showing 122 changed files with 1,202 additions and 305 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/deploy-prod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- uses: superfly/flyctl-actions/setup-flyctl@master
- name: Fly Deploy
working-directory: ./next
run: flyctl deploy --remote-only --config fly.production.toml --dockerfile Dockerfile
run: flyctl deploy --remote-only --config fly.production.toml --dockerfile Dockerfile --build-arg STRAPI_KEY=${{ secrets.PRODUCTION_STRAPI_KEY }} --build-arg STRAPI_URL=https://younite-strapi.fly.dev
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN_FRONTEND }}
deploy-storage:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy-staging.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
- uses: superfly/flyctl-actions/setup-flyctl@master
- name: Fly Deploy
working-directory: ./next
run: flyctl deploy --remote-only --config fly.staging.toml --dockerfile Dockerfile
run: flyctl deploy --remote-only --config fly.staging.toml --dockerfile Dockerfile --build-arg STRAPI_KEY=${{ secrets.STAGING_STRAPI_KEY }} --build-arg STRAPI_URL=https://younite-strapi-staging.fly.dev
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN_FRONTEND_STAGING }}
deploy-storage:
Expand Down
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@
# Logs and databases
############################

# /strapi/.tmp # Dev only: allow shared database
/strapi/.tmp
/strapi/*.log
/strapi/*.sql
/strapi/*.sqlite
Expand All @@ -125,7 +125,7 @@
/strapi/ssl
/strapi/.idea
/strapi/nbproject
# /strapi/public/uploads/* # Dev only: allow shared images
/strapi/public/uploads/*
!/strapi/public/uploads/.gitkeep

############################
Expand Down
1 change: 1 addition & 0 deletions next/.dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
dist
node_modules
.env
.next
9 changes: 6 additions & 3 deletions next/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@ LABEL fly_launch_runtime="Next.js"
# Next.js app lives here
WORKDIR /app

# Set production environment
ENV NODE_ENV="production"

# Install pnpm
# ARG PNPM_VERSION=8.3.1
# RUN npm install -g pnpm@$PNPM_VERSION
Expand All @@ -32,6 +29,12 @@ RUN npm install
COPY --link . .

# Build application
ARG STRAPI_KEY
ARG STRAPI_URL
ENV STRAPI_KEY=${STRAPI_KEY}
ENV STRAPI_URL=${STRAPI_URL}
ENV NODE_ENV="production"

RUN npm run build

# Remove development dependencies
Expand Down
8 changes: 4 additions & 4 deletions next/app/about/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@ export default async function AboutPage() {
<>
<Image src={flair} alt="" className="absolute -z-10 top-[70%]" />
<section className="max-w-4xl mx-auto mt-header pt-24 flex flex-col items-center text-center">
<h1 className="text-8xl font-bold leading-[0.95] uppercase mb-6">
<h1 className="md:text-8xl sm:text-7xl text-5xl font-bold leading-[0.95] uppercase mb-6">
Our Values
</h1>
<p className="mb-2 mx-6">{data.Subtitle}</p>
<p className="mb-16 mx-6">Click Below!</p>
<div className="grid grid-cols-3 grid-rows-2 text-black text-left mx-6">
<div className="sm:grid sm:grid-cols-3 sm:grid-rows-2 text-black text-left mx-6">
{data.Values.map((value, i) => (
<div key={value.Name} className={styles.valueCard}>
<h2 className="mb-1 text-2xl font-black uppercase">
<h2 className="mb-1 text-sm text-center md:text-left sm:text-lg md:text-2xl font-black uppercase">
{value.Name}
</h2>
<p>{value.ValueDescription}</p>
Expand All @@ -45,7 +45,7 @@ export default async function AboutPage() {
</div>
</section>
<section className="py-40 text-center px-4">
<h2 className="text-8xl font-bold leading-[0.95] uppercase mb-12">
<h2 className="md:text-8xl sm:text-7xl text-6xl font-bold leading-[0.95] uppercase mb-12">
Our History
</h2>
<div className="text-left max-w-xl mx-auto">
Expand Down
46 changes: 43 additions & 3 deletions next/app/about/styles.module.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,43 @@
@media (width >= 500px) {
.valueCard {
position: relative;
border-radius: 0.8125rem;
border: 2px solid #000;
box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.25);
padding: 2rem;
aspect-ratio: 1;
}

.valueCard:nth-of-type(1) {
background: linear-gradient(180deg, #faab36 45.83%, #ffc9c9 100%);
transform: rotate(-3.259deg);
z-index: 2;
}

.valueCard:nth-of-type(2) {
background: linear-gradient(
180deg,
#6cc3e5 0%,
#75c5e2 59.9%,
#ffdead 100%
);
transform: rotate(3.414deg) translateY(1.5rem);
z-index: 1;
}

.valueCard:nth-of-type(3) {
background: linear-gradient(180deg, #c8f2ff 0%, #ffc062 68.75%);
transform: rotate(-1.517deg) translateY(6rem) translateX(-1.5rem);
}

.valueCard:nth-of-type(4) {
background: linear-gradient(0deg, #ace8ff 0%, #ace8ff 100%);
transform: rotate(-9.745deg) translateY(-1rem) translateX(-2rem);
grid-column-start: 2;
z-index: 2;
}
}

.valueCard {
position: relative;
border-radius: 0.8125rem;
Expand All @@ -15,18 +55,18 @@

.valueCard:nth-of-type(2) {
background: linear-gradient(180deg, #6cc3e5 0%, #75c5e2 59.9%, #ffdead 100%);
transform: rotate(3.414deg) translateY(1.5rem);
transform: rotate(3.414deg);
z-index: 1;
}

.valueCard:nth-of-type(3) {
background: linear-gradient(180deg, #c8f2ff 0%, #ffc062 68.75%);
transform: rotate(-1.517deg) translateY(6rem) translateX(-1.5rem);
transform: rotate(-1.517deg);
}

.valueCard:nth-of-type(4) {
background: linear-gradient(0deg, #ace8ff 0%, #ace8ff 100%);
transform: rotate(-9.745deg) translateY(-2rem) translateX(-2rem);
transform: rotate(-6deg);
grid-column-start: 2;
z-index: 2;
}
7 changes: 5 additions & 2 deletions next/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,19 @@ export const metadata = {
},
};

export default function RootLayout({
export default async function RootLayout({
children,
}: {
children: React.ReactNode;
}) {
return (
<html lang="en" className="h-full">
<body className="bg-gradient-1 isolate flex flex-col min-h-svh">
{/* @ts-ignore */}
<Header />
<main className="grow overflow-y-auto overflow-x-hidden">{children}</main>
<main className="grow overflow-y-auto overflow-x-hidden">
{children}
</main>
<Footer />
</body>
</html>
Expand Down
10 changes: 5 additions & 5 deletions next/app/members/[year]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ export default async function MemberPage({
<>
<div className="flex flex-col items-center justify-center gap-6 mt-header pt-24">
<h1 className="uppercase flex flex-col items-center mx-auto mb-24">
<span className="text-6xl leading-[0.95]">Meet the</span>
<span className="text-8xl font-bold leading-[0.95]">
<span className="md:text-6xl text-5xl leading-[0.95]">Meet the</span>
<span className="md:text-8xl text-6xl text-center font-bold leading-[0.95]">
{team.CommitteeYear} Team
</span>
</h1>
Expand All @@ -36,7 +36,7 @@ export default async function MemberPage({
src={getLargestImageUrl(team.teamPhoto)}
alt=""
/>
<div className="absolute bottom-8 right-12 p-8 pr-16 max-w-lg bg-white shadow-lg rounded-3xl text-b-dark-blue __markdown">
<div className="md:absolute md:bottom-8 md:right-12 m-3 p-8 pr-16 max-w-lg bg-white shadow-lg rounded-3xl text-b-dark-blue __markdown">
<RichText
props={{
text: team.description,
Expand All @@ -50,12 +50,12 @@ export default async function MemberPage({
</a>
</div>
<Image
className="absolute bottom-0 left-0"
className="absolute bottom-0 left-0 hidden md:visible"
src={ScribbleLeft}
alt=""
/>
<Image
className="absolute top-0 right-0 -translate-y-12 -z-10"
className="absolute top-0 right-0 -translate-y-12 -z-10 hidden md:visible"
src={ScribbleRight}
alt=""
/>
Expand Down
6 changes: 3 additions & 3 deletions next/app/page.module.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.description {
display: inherit;
justify-content: inherit;
align-items: inherit;
display: flex;
justify-content: center;
align-items: center;
font-size: 0.85rem;
max-width: var(--max-width);
width: 100%;
Expand Down
12 changes: 7 additions & 5 deletions next/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,22 @@ export default async function Home() {
return (
<>
<BGWaves className="w-full absolute -z-50 top-[85vh]" />
{/* @ts-ignore */}
<Header />
<div className="min-h-[55vh] flex flex-col items-center gap-6 mt-header pt-24">
<h1 className="uppercase flex flex-col items-center">
<span className="text-6xl leading-[0.95]">A Youth Board</span>
<span className="text-8xl font-bold leading-[0.95]">
<h1 className="uppercase flex flex-col items-center mx-auto justify-center">
<span className="text-2xl xs:text-3xl sm:text-4xl lg:text-6xl xl:text-8xl leading-[0.95] text-center">A Youth Board</span>
<span className="text-3xl xs:text-4xl sm:text-5xl lg:text-7xl xl:text-9xl font-bold leading-[0.95] text-center">
For The Future
</span>
</h1>
<p className="text-lg max-w-[50ch] text-center mb-16 leading-relaxed">
<p className="text-sm xs:text-md sm:text-lg md:text-xl lg:text-2xl xl:text-3xl max-w-[50ch] text-center mb-16 leading-relaxed">
{data.heroParagraph}
</p>
</div>
<HomePageBlobs blob1={data.blob1} blob2={data.blob2} blob3={data.blob3} />

<ImageWithText props={data.textWithImage} />
<ImageWithText props={data.textWithImage}/>
<div>
<div className="bg-white bg-opacity-50">
<div className="overflow-hidden ml-20 mr-20 ">
Expand Down
1 change: 1 addition & 0 deletions next/components/blocks/ImageWithText.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
background-color: #fab34a;
background-image: linear-gradient(to bottom, #ffc062f5, #ffc062f5),
url(../../assets/home/Background_Dots.png);
width: 100%;
}

.backgroundCol {
Expand Down
8 changes: 5 additions & 3 deletions next/components/blocks/ImageWithText.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,18 @@ export default function ImageWithText({ props }: ImageWithTextProps) {
const imageUrl = getLargestImageUrl(props.image);

return (
<div className="grid grid-cols-2 max-h-[80vh]">
<div className="flex">
//
// grid grid-cols-2 max-h-[80vh]
<div className="flex outline flex-col md:flex-row md:items-stretch">
{/* <div className="flex"> */}
<Image
className={styles.backgroundImg}
src={imageUrl}
alt={props.Heading}
width={500}
height={500}
/>
</div>
{/* </div> */}
<div className={styles.backgroundDots}>
<div className={styles.backgroundCol}>
<div className={styles.heading}>{props.Heading}</div>
Expand Down
10 changes: 5 additions & 5 deletions next/components/feedback/ActiveSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,17 @@ export default function ActiveSection({

return (
<div
className={`flex w-full max-w-5xl mb-24 mx-auto gap-12 ${styleClick ? "animate-[fadeOut_0.3s_ease-in_forwards]" : "animate-[fadeIn_0.3s_ease-in_forwards]"}`}
className={`flex flex-col md:flex-row w-full max-w-5xl mb-24 mx-auto gap-12 ${styleClick ? "animate-[fadeOut_0.3s_ease-in_forwards]" : "animate-[fadeIn_0.3s_ease-in_forwards]"}`}
>
<div className="flex flex-col">
<div className="flex flex-col items-end w-80 ml-5">
<div className="flex flex-col items-center md:items-left">
<div className="flex flex-col md:items-end w-80 ml-5">
<button
className={`text-wrap uppercase font-bold text-7xl mb-2`}
disabled={true}
>
{activeSection == "FAQ" ? "FAQ" : "Contact"}
</button>
<div className="flex items-center">
<div className="flex items-center justify-center">
<Image
src={selectionArrow}
alt="Selection arrow"
Expand All @@ -59,7 +59,7 @@ export default function ActiveSection({
</div>
</div>
</div>
<div className="flex-1 mr-5">
<div className="flex-1 mr-5 ml-5">
{activeSection == "FAQ" ? <FAQ QAs={QAs} /> : <FeedbackForm />}
</div>
</div>
Expand Down
5 changes: 3 additions & 2 deletions next/components/feedback/FAQ.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ export default function FAQ({
}) {
return (
<div className="w-full">
<h1 className="text-3xl font-bold mb-10">Frequently Asked Questions</h1>
<h1 className="text-2xl xs:text-3xl md:text-left text-center font-bold mb-10">
Frequently Asked Questions
</h1>
<div className="flex flex-col gap-6">
{QAs.map((QA) => {
return (
Expand All @@ -26,5 +28,4 @@ export default function FAQ({
</div>
</div>
);

}
Loading

0 comments on commit 08ffd04

Please sign in to comment.