Skip to content

Commit

Permalink
updated video-card
Browse files Browse the repository at this point in the history
  • Loading branch information
gnehs committed Nov 12, 2023
1 parent e545bec commit 04f31ba
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 0 deletions.
7 changes: 7 additions & 0 deletions app/cfp/(submit)/normal/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import SubmissionBtn from "@/components/cfp/SubmissionBtn";
import CardForNormal from "@/components/cfp/CardForNormal";
import Subtitle from "@/components/cfp/Subtitle";
import Toc from "@/components/cfp/Toc";
import VideoCard from "@/components/cfp/VideoCard";

export default function Page() {
const tocs = [
Expand Down Expand Up @@ -194,6 +195,12 @@ export default function Page() {
</p>
<p>讓您有充分的時間展示想法、描述經歷、和與會者交流</p>
</div>
{/* <div className="grid grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4 mb-8 mt-4">
<VideoCard href="#" image="test.jpg" title="test" />
<VideoCard href="#" image="test.jpg" title="test" />
<VideoCard href="#" image="test.jpg" title="test" />
<VideoCard href="#" image="test.jpg" title="test" />
</div> */}

<h2 className="text-2xl mt-8 font-medium">ESPRESSO</h2>

Expand Down
25 changes: 25 additions & 0 deletions components/cfp/VideoCard.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
export default function VideoCard({
image,
title,
href,
}: {
image: string;
title: string;
href: string;
}) {
return (
<a
className="relative aspect-video w-full rounded-lg shadow-sm hover:shadow-lg hover:-translate-y-1 active:scale-95 flex items-end justify-start px-2 transition-all"
style={{
backgroundImage: `url(/2024/cfp/video-image/${image})`,
backgroundSize: "cover",
backgroundPosition: "center center",
}}
href={href}
target="_blank"
>
<div className="bg-gradient-to-b from-transparent to-black absolute inset-0 w-full h-full opacity-50 rounded-lg" />
<div className="relative text-white">{title}</div>
</a>
);
}
Binary file added public/cfp/video-image/test.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 04f31ba

Please sign in to comment.