feat: updated home section like projects section card, referance card

This commit is contained in:
poyrazavsever
2026-07-16 09:02:41 +03:00
parent 6e12c03312
commit 978f76bfc2
6 changed files with 20 additions and 16 deletions
+1 -3
View File
@@ -2,7 +2,6 @@ import { HomeHero } from "@/components/home-hero";
import { HomeProjectsSection } from "@/components/home-projects-section"; import { HomeProjectsSection } from "@/components/home-projects-section";
import { HomeVideosSection } from "@/components/home-videos-section"; import { HomeVideosSection } from "@/components/home-videos-section";
import { ReferencesSection } from "@/components/references-section"; import { ReferencesSection } from "@/components/references-section";
import { SponsorsSection } from "@/components/sponsors-section";
import { getHomeBlogNews } from "@/data/blog"; import { getHomeBlogNews } from "@/data/blog";
export default async function Home({ export default async function Home({
@@ -14,12 +13,11 @@ export default async function Home({
const homeNews = await getHomeBlogNews(locale, 6); const homeNews = await getHomeBlogNews(locale, 6);
return ( return (
<section className="flex h-full flex-col gap-12 overflow-y-auto overflow-x-hidden md:gap-14"> <section className="flex h-full flex-col overflow-y-auto overflow-x-hidden">
<HomeHero news={homeNews} /> <HomeHero news={homeNews} />
<HomeProjectsSection /> <HomeProjectsSection />
<ReferencesSection /> <ReferencesSection />
<HomeVideosSection /> <HomeVideosSection />
<SponsorsSection />
</section> </section>
); );
} }
+2 -2
View File
@@ -31,7 +31,7 @@ export function HomeHero({ news }: HomeHeroProps) {
const router = useRouter(); const router = useRouter();
return ( return (
<section className="space-y-4"> <section>
<div className="relative grid min-h-[150px] overflow-hidden border-b border-border py-4 sm:grid-cols-[1fr_180px] sm:py-5"> <div className="relative grid min-h-[150px] overflow-hidden border-b border-border py-4 sm:grid-cols-[1fr_180px] sm:py-5">
<div className="flex max-w-2xl flex-col justify-center gap-2"> <div className="flex max-w-2xl flex-col justify-center gap-2">
<Typography <Typography
@@ -105,7 +105,7 @@ export function HomeHero({ news }: HomeHeroProps) {
</div> </div>
</div> </div>
<section className="space-y-3"> <section className="space-y-3 pt-12 md:pt-14">
<div className="flex items-center justify-between gap-4"> <div className="flex items-center justify-between gap-4">
<Typography <Typography
variant="h3" variant="h3"
+5 -5
View File
@@ -12,10 +12,10 @@ export function HomeProjectsSection() {
const t = useTranslations("Home"); const t = useTranslations("Home");
const locale = useLocale(); const locale = useLocale();
const router = useRouter(); const router = useRouter();
const projects = WEB_APPS.slice(0, 4); const projects = WEB_APPS.slice(0, 5);
return ( return (
<section className="space-y-3"> <section className="space-y-3 pt-12 md:pt-14">
<div className="flex items-center justify-between gap-4"> <div className="flex items-center justify-between gap-4">
<Typography <Typography
variant="h3" variant="h3"
@@ -41,7 +41,7 @@ export function HomeProjectsSection() {
</div> </div>
<div className="relative overflow-hidden py-1"> <div className="relative overflow-hidden py-1">
<div className="flex w-max items-stretch gap-3"> <div className="flex w-max items-stretch gap-2">
{projects.map((project) => ( {projects.map((project) => (
<ImageCard <ImageCard
key={project.id} key={project.id}
@@ -54,14 +54,14 @@ export function HomeProjectsSection() {
: undefined : undefined
} }
href={project.href} href={project.href}
className="aspect-square w-72 shrink-0 rounded-sm border-border" className="aspect-square w-56 shrink-0 rounded-sm border-border md:w-[calc((100vw-8rem)/4)] md:max-w-56"
/> />
))} ))}
</div> </div>
<div <div
aria-hidden="true" aria-hidden="true"
className="pointer-events-none absolute top-0 right-0 h-full w-24 bg-linear-to-l from-background via-background/80 to-transparent" className="pointer-events-none absolute top-0 right-0 h-full w-24 bg-gradient-to-l from-background via-background/80 to-transparent"
/> />
</div> </div>
</section> </section>
+1 -1
View File
@@ -10,7 +10,7 @@ export function HomeVideosSection() {
const t = useTranslations("Content"); const t = useTranslations("Content");
return ( return (
<section className="space-y-3"> <section className="space-y-3 pt-12 md:pt-14">
<div className="flex items-center justify-between gap-4"> <div className="flex items-center justify-between gap-4">
<Typography <Typography
variant="h3" variant="h3"
+8 -2
View File
@@ -8,9 +8,15 @@ type ReferenceCardsProps = {
className?: string; className?: string;
cardClassName?: string; cardClassName?: string;
lineClamp?: boolean; lineClamp?: boolean;
showRating?: boolean;
}; };
export function ReferenceCards({ className, cardClassName, lineClamp }: ReferenceCardsProps) { export function ReferenceCards({
className,
cardClassName,
lineClamp,
showRating = true,
}: ReferenceCardsProps) {
const locale = useLocale(); const locale = useLocale();
const hoverClassName = const hoverClassName =
"transition-colors duration-200 group-hover:border-red-600/40 group-hover:bg-muted/30"; "transition-colors duration-200 group-hover:border-red-600/40 group-hover:bg-muted/30";
@@ -26,7 +32,7 @@ export function ReferenceCards({ className, cardClassName, lineClamp }: Referenc
author={item.author} author={item.author}
role={getLocalizedValue(item.role, locale)} role={getLocalizedValue(item.role, locale)}
avatar={item.avatar} avatar={item.avatar}
rating={item.rating} rating={showRating ? item.rating : undefined}
className={`flex flex-col rounded-sm ${lineClamp ? "[&_blockquote]:line-clamp-4" : ""} ${hoverClassName} ${cardClassName || "w-70 shrink-0"}`} className={`flex flex-col rounded-sm ${lineClamp ? "[&_blockquote]:line-clamp-4" : ""} ${hoverClassName} ${cardClassName || "w-70 shrink-0"}`}
/> />
); );
+3 -3
View File
@@ -11,7 +11,7 @@ export function ReferencesSection() {
const router = useRouter(); const router = useRouter();
return ( return (
<section className="space-y-3"> <section className="space-y-3 pt-12 md:pt-14">
<div className="flex items-center justify-between gap-4"> <div className="flex items-center justify-between gap-4">
<Typography <Typography
variant="h3" variant="h3"
@@ -39,8 +39,8 @@ export function ReferencesSection() {
<div className="relative overflow-hidden py-1"> <div className="relative overflow-hidden py-1">
{/* We use two sets of cards for seamless infinite marquee effect */} {/* We use two sets of cards for seamless infinite marquee effect */}
<div className="flex w-max items-start gap-4 animate-marquee pause-on-hover"> <div className="flex w-max items-start gap-4 animate-marquee pause-on-hover">
<ReferenceCards className="flex items-start gap-4 shrink-0" lineClamp={true} cardClassName="w-80" /> <ReferenceCards className="flex items-start gap-4 shrink-0" lineClamp={true} showRating={false} cardClassName="w-80" />
<ReferenceCards className="flex items-start gap-4 shrink-0" lineClamp={true} cardClassName="w-80" /> <ReferenceCards className="flex items-start gap-4 shrink-0" lineClamp={true} showRating={false} cardClassName="w-80" />
</div> </div>
<div <div