added video for FAM and video support to gallery

This commit is contained in:
Hunter W.
2026-05-31 23:34:21 -04:00
parent dc5cd50b57
commit d979ac7f9b
6 changed files with 436 additions and 155 deletions

View File

@@ -4,6 +4,7 @@ import { useEffect, useState } from "react";
import type { Project } from "@/data/content";
import SimpleGallery from "./SimpleGallery";
type Props = {
project: Project;
visible: boolean;
@@ -14,9 +15,8 @@ type Props = {
export default function ProjectCard({ project, visible, selected = false, setSelected, setExpandedHeight}: Props) {
const [hovered, setHovered] = useState(false);
const [expandedImage, setExpandedImage] = useState(false);
const [currentExpandedHeight, setCurrentExpandedHeight] = useState(0);
function projectTagsComponent(project: Project){
return (<div style={{ display: "flex", gap: 8, flexWrap: "wrap", marginBottom: 12 }}>
{project.tags.map((tag) => (
@@ -123,12 +123,11 @@ export default function ProjectCard({ project, visible, selected = false, setSel
<p style={{fontFamily: "var(--sans)", fontSize: 14, lineHeight: 1.6, color: "var(--fg-secondary)", margin: "0 0 16px 0"}}>
{project.description}
</p>
{project.images && project.images.length > 0 && (
<SimpleGallery images={project.images} title={project.title} expansionHandler={(height: number) => {
<SimpleGallery images={project.images} videos={project.videos} title={project.title} expansionHandler={(height: number) => {
setExpandedHeight(height);
setExpandedImage(height > 0);
setExpandedImage(height > 0);
}} />
)}