Skip to content

Commit 7b4b9d5

Browse files
authored
Merge pull request #23 from thedevdavid/feature/hero-minimal
Feature/hero minimal
2 parents 892fdb3 + 6b5e485 commit 7b4b9d5

File tree

3 files changed

+30
-0
lines changed

3 files changed

+30
-0
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1111

1212
- Copy button component
1313
- Scroll-aware table of contets
14+
- Minimal hero variant
1415

1516
### Changed
1617

app/(site)/page.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import { defaultAuthor } from "@/lib/metadata";
88
import { cn } from "@/lib/utils";
99
import CTA from "@/components/cta";
1010
import { HeroImage } from "@/components/hero-image";
11+
import { HeroMinimal } from "@/components/hero-minimal";
1112
import { HeroSimple } from "@/components/hero-simple";
1213
import { HeroVideo } from "@/components/hero-video";
1314
import { Sidebar } from "@/components/home-sidebar";

components/hero-minimal.tsx

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
"use client";
2+
3+
import * as React from "react";
4+
import Image from "next/image";
5+
6+
import { defaultAuthor } from "@/lib/metadata";
7+
8+
interface HeroProps {
9+
title: string;
10+
subtitle?: string;
11+
}
12+
13+
export function HeroMinimal({ title, subtitle }: HeroProps) {
14+
return (
15+
<div className="container flex max-w-6xl flex-col items-start justify-center sm:py-2 md:py-6">
16+
<Image
17+
className="aspect-square h-10 w-10 rounded-full border border-black sm:hidden"
18+
width={40}
19+
height={40}
20+
src="/avatar.png"
21+
alt={defaultAuthor.name}
22+
/>
23+
<h1 className="font-heading text-2xl font-bold leading-tight tracking-tight">{defaultAuthor.name}</h1>
24+
<p className="text-muted-foreground">{defaultAuthor.jobTitle}</p>
25+
<p className="my-2 text-muted-foreground">{title}</p>
26+
</div>
27+
);
28+
}

0 commit comments

Comments
 (0)