- {response.objects.map((post: { title: string; metadata: { date: string; image: { url: string; }; content: string; }; }, index: number) => (
+ {response.objects.map((post: { title: string; metadata: { date: string; image: { url: string; }; video: { url: string; }; "youtube-video": string; content: string; }; }, index: number) => (
))}
diff --git a/components/Blog/Blog.module.css b/components/Blog/Blog.module.css
index 6c880c7..18e2b07 100644
--- a/components/Blog/Blog.module.css
+++ b/components/Blog/Blog.module.css
@@ -1,13 +1,13 @@
/* Blog.module.css */
.blogContainer {
- width: 100%;
+ width: min(100%, 1280px);
/* height: 100%; */
/* min-height: 70vh; */
/* max-height: 70vh; */
/* margin: 5vh; Centering and adding equal top/bottom margins */
- margin-top: 5vh;
- margin-bottom: 5vh;
+ margin-top: 20px;
+ margin-bottom: 20px;
/* margin-left: 5vh;
margin-right: 5vh; */
/* border: 2px solid #ddd; */
@@ -17,26 +17,24 @@
box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
display: flex;
flex-direction: column;
- gap: 10% 1.5rem;
/* padding: 8.4vh 8.3vw; */
- padding: 10% 12% 15% 12%;
+ padding: 80px clamp(80px, 15%, 160px);
}
.blogHeader {
display: flex;
justify-content: space-between;
align-items: center;
- margin-bottom: 0vh;
- margin-top: 0vh;
+ margin-bottom: 40px;
}
.blogTitle {
- font-size: 2.5vw; /* Scales with viewport width */
+ font-size: 2.4rem; /* Scales with viewport width */
color: #ffffff;
}
.blogDate {
- font-size: 1.625vw; /* Scales with viewport width */
+ font-size: 1.625rem; /* Scales with viewport width */
color: #ffffff;
}
@@ -66,53 +64,4 @@
.blogDescription {
flex-grow: 1;
overflow-y: auto;
-}
-
-/* Responsive adjustments for small screens */
-@media (max-width: 768px) {
- .blogContainer {
- width: 100%;
- height: 100%;
- max-height: 100vh;
- margin-top: 2vh;
- margin-bottom: 2vh;
- border-radius: 20px;
- background-color: #5a5656;
- box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
- display: flex;
- flex-direction: column;
- gap: 0.5rem;
- padding: 5vh 8vw;
- }
- .blogContent {
- flex-direction: column; /* Stack image and content vertically */
- }
-
- .blogImage {
- width: 36%;
- aspect-ratio: 1 / 1;
- max-width: 100%;
- max-height: 100%;
- align-items: center;
- }
-
- .blogDescription {
- margin-top: 1vh;
- font-size: small;
- }
-
- .blogHeader {
- flex-direction: column; /* Stack title and date */
- align-items: flex-start;
- gap: 0.5rem;
- }
-
- .blogDate {
- text-align: left;
- font-size: 2vw;
- }
-
- .blogTitle {
- font-size: 3.5vw;
- }
}
\ No newline at end of file
diff --git a/components/Blog/Blog.tsx b/components/Blog/Blog.tsx
index a3b6917..9ecb08a 100644
--- a/components/Blog/Blog.tsx
+++ b/components/Blog/Blog.tsx
@@ -4,11 +4,16 @@ import Image from 'next/image';
interface BlogProps {
title: string;
imageUrl: string;
+ videoUrl: string;
+ ytUrl: string;
description: string;
date: string;
}
-export default function Blog({ title, imageUrl, description, date }: BlogProps) {
+export default function Blog({ title, imageUrl, videoUrl, ytUrl, description, date }: BlogProps) {
+ const ytRegex = /(?:https?:\/\/)?(?:www.)?(?:youtube\.com|youtu\.be|youtube-nocookie\.com)\/(?:embed\/|v\/|watch\?v=|watch\?list=.*&v=)?((?:\w|-){11})(?:&list=(?:\w+)&?)?/;
+ const matches = ytUrl?.match(ytRegex) || ["no match"];
+ console.log(matches);
return (
@@ -16,7 +21,9 @@ export default function Blog({ title, imageUrl, description, date }: BlogProps)
{date}
- {imageUrl ?
: <>>}
+ {imageUrl ?
:
+ videoUrl ?
:
+ ytUrl && matches.length > 1 ?
VIDEO : <>>}
{description}
diff --git a/components/Navbar/Navbar.module.css b/components/Navbar/Navbar.module.css
index d83f090..f48f7de 100644
--- a/components/Navbar/Navbar.module.css
+++ b/components/Navbar/Navbar.module.css
@@ -54,6 +54,7 @@ so you could scale with screen area? this goes for both links and logo*/
height: 2rem;
margin-bottom: 1rem;
margin-left: 0.5rem;
+ transition: all 0.3s ease;
}
.instagram-logo:hover {
diff --git a/components/Navbar/Navbar.tsx b/components/Navbar/Navbar.tsx
index ebbead5..4f8bd62 100644
--- a/components/Navbar/Navbar.tsx
+++ b/components/Navbar/Navbar.tsx
@@ -6,25 +6,27 @@ import styles from "./Navbar.module.css";
import Image from "next/image";
const routes = [
- { href: "/about", label: "About" },
- { href: "/news", label: "News" },
- { href: "/gallery", label: "Gallery" },
- { href: "/contact", label: "Contact Us" },
+ { href: "/about", label: "About" },
+ { href: "/news", label: "News" },
+ { href: "/gallery", label: "Gallery" },
+ { href: "/contact", label: "Contact Us" },
];
export default function Navbar() {
- const pathname = usePathname();
- return (
+ const pathname = usePathname();
+ return (
-
+
+
{routes.map((route) => (
Soul Sisters
-
+
);
diff --git a/components/about/AboutSection.tsx b/components/about/AboutSection.tsx
index 90bd551..d668aba 100644
--- a/components/about/AboutSection.tsx
+++ b/components/about/AboutSection.tsx
@@ -1,34 +1,33 @@
-// import cosmic from "@/lib/cosmicClient";
+import cosmic from "@/lib/cosmicClient";
import Image from "next/image";
-export default function AboutSection() {
- // const aboutData = await cosmic.objects
- // .findOne({
- // type: "about-page",
- // slug: "about-us",
- // })
- // .props("title,metadata")
- // .depth(1);
+export default async function AboutSection() {
+ const aboutData = await cosmic.objects
+ .findOne({
+ type: "about-page",
+ slug: "about-us",
+ })
+ .props("title,metadata")
+ .depth(1);
- // const { title, metadata } = aboutData?.object || {};
- // const description = metadata?.["content_of_box"] || "Default description";
- // const image_url = metadata?.image?.url || "/default-image.jpg";
+ const { metadata } = aboutData?.object;
+ const title = metadata?.["title_of_page"] || "About";
+ const description = metadata?.["content_of_box"] || `Haitian-Canadian sisters Pem and Sonam Almonor Shulman based the script for Soul Sisters on their recent experiences at York University (Canada) and Brown University (USA), respectively.
+ Soul Sisters conveys the dreams and struggles of a generation with biting wit, flair and a passion for social justice.This slyly satiric take on the young immigrant university student coming of age tale will delight and inspire.
+ The sisters are mentored by NAACP Image Award Nominated filmmakers Jeanne Marie - Almonor and John Shulman.`;
+ const image_url = `${metadata?.image?.imgix_url}?q=40&auto=format,compress` || "/images/About.JPG";
return (
{/* Left Section: Heading + Content */}
- {/* {title} */}
- About Us
+ {title}
- {/* {description} */}
- Haitian-Canadian sisters Pem and Sonam Almonor Shulman based the script for Soul Sisters on their recent experiences at York University (Canada) and Brown University (USA), respectively.
-
- Soul Sisters conveys the dreams and struggles of a generation with biting wit, flair and a passion for social justice. This slyly satiric take on the young immigrant university student coming of age tale will delight and inspire. The sisters are mentored by NAACP Image Award Nominated filmmakers Jeanne Marie-Almonor and John Shulman.
+ {description}
@@ -37,11 +36,11 @@ export default function AboutSection() {
{/* Right Section: Image (Full Height) */}