Skip to content

Commit 0bbe947

Browse files
authored
Merge pull request #7 from thedevdavid/develop
Release 0.3.0
2 parents b3bb84c + 3cf3e90 commit 0bbe947

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+799
-323
lines changed

CHANGELOG.md

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7+
8+
## [Unreleased]
9+
10+
## [0.3.0] - 2023-06-18
11+
12+
### Added
13+
14+
- Configurable navigation links
15+
- Projects video file support
16+
17+
### Fixed
18+
19+
- Mobile navigation
20+
- Responsive layout issues
21+
- Unoptimized images
22+
23+
### Changed
24+
25+
- Switched unperformant gif files to mp4

README.md

+10-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ This project is from developers for developers. Please feel free to report a bug
1111

1212
If you love this template and/or use it, please give it a star on GitHub. This will help more people discover it, thus help improving the template.
1313

14-
[![GitHub stars](https://img.shields.io/github/stars/thedevdavid/digital-garden?style=social)](
14+
![GitHub Repo stars](https://img.shields.io/github/stars/thedevdavid/digital-garden?style=social)
1515

1616
**Note: This project is always evolving and it's far from being perfect or even done.** I'm always open to suggestions and contributions. Feel free to open an issue or a PR if you have any ideas or suggestions. You can also see the [roadmap](#features--roadmap) for planned features if you want to contribute.
1717

@@ -58,6 +58,12 @@ Open [http://localhost:3000](http://localhost:3000) in your browser to see the r
5858

5959
You can write content in Markdown or MDX. The content is located in `content/` and is organized in folders. The `pages` folder contains the pages. The `posts` folder contains the blogposts. The `projects` folder contains the projects.
6060

61+
Editing list pages is done in the `lib` folder.
62+
63+
- `/uses` - `lib/uses-data.ts`
64+
- `/projects` - `lib/projects-data.ts`
65+
- `/social` - `lib/social-data.ts`
66+
6167
### Deployment
6268

6369
You can deploy the project with [Vercel](https://vercel.com/) or any other hosting provider. If you want to use Vercel, you can use the button at the top of this README.
@@ -78,7 +84,9 @@ The project uses Tailwind colors and @shadcn/ui config. Customize the colors on
7884

7985
### Metadata
8086

81-
You can change the metadata in `utils/metadata.ts`. This will be used around the site for social links, handles, SEO, and OG.
87+
You can change the metadata in `utils/metadata.ts`. This will be used around the site for titles, social links, social handles, SEO, etc.
88+
89+
You can edit navigation links in `lib/navigation-links.ts`.
8290

8391
### Analytics
8492

app/(site)/layout.tsx

+4-24
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,14 @@
1-
import Link from "next/link";
2-
3-
import { defaultAuthor } from "@/lib/metadata";
4-
import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar";
5-
import { CommandDialogComponent } from "@/components/command-dialog";
61
import Footer from "@/components/footer";
7-
import { ModeToggle } from "@/components/mode-toggle";
8-
import { Navbar } from "@/components/navbar";
2+
import { Navigation } from "@/components/navigation";
93

104
interface RootLayoutProps {
115
children: React.ReactNode;
126
}
137

148
export default function RootLayout({ children }: RootLayoutProps) {
159
return (
16-
<div className="">
17-
<header className="mx-auto mt-4 h-16 w-full max-w-6xl px-4 lg:px-0">
18-
<div className="container flex items-center justify-between rounded-lg border border-black/40 bg-white/30 bg-clip-padding px-4 py-2 shadow-md backdrop-blur-sm dark:border-white dark:bg-black/30 dark:text-white">
19-
<Avatar asChild>
20-
<Link href="/">
21-
<AvatarImage className="rounded-full border border-black hover:opacity-60" src="/avatar.png" />
22-
<AvatarFallback>{defaultAuthor.name}</AvatarFallback>
23-
</Link>
24-
</Avatar>
25-
<nav className="ml-auto space-x-6 text-sm font-medium">
26-
<Navbar />
27-
</nav>
28-
<CommandDialogComponent />
29-
<ModeToggle />
30-
</div>
31-
</header>
10+
<>
11+
<Navigation />
3212
<div className="order-last mt-[calc(theme(spacing.16)-theme(spacing.3))]"></div>
3313
<main>{children}</main>
3414
<Footer />
@@ -44,6 +24,6 @@ export default function RootLayout({ children }: RootLayoutProps) {
4424
}}
4525
/>
4626
</div>
47-
</div>
27+
</>
4828
);
4929
}

app/(site)/page.tsx

+9-4
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ export default async function Home() {
4747
"select-rounded-md block w-full rounded-md px-3 py-6 leading-none no-underline outline-none transition hover:bg-foreground/20 hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground"
4848
)}
4949
>
50-
<h3 className="m-0 text-2xl font-bold leading-none text-foreground">{post.title}</h3>
50+
<h2 className="m-0 text-2xl font-bold leading-none text-foreground">{post.title}</h2>
5151
<div className="mb-4 mt-1 text-sm leading-snug text-muted-foreground">
5252
<time dateTime={post.publishedDate}>{format(parseISO(post.publishedDate), "LLLL d, yyyy")}</time>
5353
<span>{` // ${post.readTimeMinutes} mins read`}</span>
@@ -66,12 +66,17 @@ export default async function Home() {
6666
See all posts <ArrowRight className="ml-2 h-4 w-4" />
6767
</Link>
6868
</div>
69-
<aside className="flex w-full flex-col items-center justify-center md:block">
69+
<aside className="w-full">
7070
<Sidebar />
7171
</aside>
7272
</div>
7373
</div>
74-
<CTA />
74+
<CTA
75+
title="I also write deep dives in email"
76+
description="I write about coding, design, digital nomad life, and solopreneurship. Join over 1,000 other developers in
77+
getting better in business. Unsubscribe whenever."
78+
buttonText="Send me the emails"
79+
/>
7580
{aboutPage && (
7681
<div className="container max-w-6xl">
7782
<h2 className="mb-8 font-heading text-4xl font-bold">Who&apos;s this girl again?</h2>
@@ -81,7 +86,7 @@ export default async function Home() {
8186
src="/avatar-home.png"
8287
alt={defaultAuthor.name}
8388
width={400}
84-
height={400}
89+
height={498}
8590
className="h-auto w-72 -rotate-1 hover:rotate-3"
8691
/>
8792
<div className="text-center">

app/(site)/posts/[slug]/page.tsx

+5-5
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ export default async function PostPage({ params }: PostProps) {
6666
<nav aria-label="Breadcrumb">
6767
<ol role="list" className="hidden items-center gap-1 text-sm text-muted-foreground md:flex md:flex-row">
6868
<li>
69-
<Link href="/" className="block transition hover:text-muted-foreground/70">
69+
<Link href="/" className="block transition hover:text-muted-foreground/70" aria-label="Go to Home">
7070
<span className="sr-only"> Home </span>
7171
<Home size={14} />
7272
</Link>
@@ -105,7 +105,7 @@ export default async function PostPage({ params }: PostProps) {
105105
</li>
106106
</ol>
107107
</nav>
108-
<div className="grid lg:grid-flow-col">
108+
<div className="flex flex-col lg:flex-row">
109109
<div className="lg:hidden">
110110
<div className="mb-4 mt-1 text-sm leading-snug text-muted-foreground">
111111
<p className="mb-2">{`${post.readTimeMinutes} mins read`}</p>
@@ -142,7 +142,7 @@ export default async function PostPage({ params }: PostProps) {
142142
</AccordionItem>
143143
</Accordion>
144144
</div>
145-
<article className="prose max-w-7xl dark:prose-invert prose-headings:mb-3 prose-headings:mt-8 prose-headings:font-heading prose-headings:font-bold prose-headings:leading-tight hover:prose-a:text-muted-foreground prose-a:prose-headings:no-underline lg:max-w-2xl">
145+
<article className="prose max-w-7xl dark:prose-invert prose-headings:mb-3 prose-headings:mt-8 prose-headings:font-heading prose-headings:font-bold prose-headings:leading-tight hover:prose-a:text-muted-foreground prose-a:prose-headings:no-underline lg:mr-auto lg:max-w-2xl">
146146
<h1 className="mb-2 font-heading">{post.title}</h1>
147147
{post.description && (
148148
<p className="mb-2 mt-0 text-xl text-slate-700 dark:text-slate-200">{post.description}</p>
@@ -151,9 +151,9 @@ export default async function PostPage({ params }: PostProps) {
151151
<Mdx code={post.body.code} />
152152
<hr className="my-4" />
153153
{post.tags && (
154-
<ul className="m-0 flex list-none flex-row space-x-2 p-0 text-sm text-muted-foreground">
154+
<ul className="m-0 list-none space-x-2 p-0 text-sm text-muted-foreground">
155155
{post.tags.map((tag: any) => (
156-
<li className="p-0" key={tag.trim()}>
156+
<li className="inline-block p-0" key={tag.trim()}>
157157
{tag}
158158
</li>
159159
))}

app/(site)/projects/page.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { Metadata } from "next";
22
import { format, parseISO } from "date-fns";
33
import { AlertTriangle } from "lucide-react";
44

5-
import { projects } from "@/lib/projectsData";
5+
import { projects } from "@/lib/projects-data";
66
import { SpotlightCard } from "@/components/spotlight-card";
77

88
export async function generateMetadata(): Promise<Metadata> {

app/(site)/uses/page.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { Metadata } from "next";
22
import { format, parseISO } from "date-fns";
33
import { AlertTriangle } from "lucide-react";
44

5-
import { hardware, software } from "@/lib/usesData";
5+
import { hardware, software } from "@/lib/uses-data";
66

77
export async function generateMetadata(): Promise<Metadata> {
88
return {

app/(social)/social/page.tsx

+7-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import Link from "next/link";
55
import { Github, Instagram, Linkedin, Twitter, Youtube } from "lucide-react";
66

77
import { defaultAuthor } from "@/lib/metadata";
8-
import { projects } from "@/lib/projectsData";
8+
import { projects } from "@/lib/projects-data";
99
import { Button } from "@/components/ui/button";
1010
import CTA from "@/components/cta";
1111
import { Signature } from "@/components/signature";
@@ -60,7 +60,12 @@ export default async function SocialPage() {
6060
</div>
6161
<Signature />
6262
</div>
63-
<CTA />
63+
<CTA
64+
title="I also write deep dives in email"
65+
description="I write about coding, design, digital nomad life, and solopreneurship. Join over 1,000 other developers in
66+
getting better in business. Unsubscribe whenever."
67+
buttonText="Send me the emails"
68+
/>
6469
</>
6570
);
6671
}

components/cta.tsx

+27-26
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,17 @@ import { Input } from "@/components/ui/input";
1414
import { ToastAction } from "@/components/ui/toast";
1515
import { useToast } from "@/components/ui/use-toast";
1616

17+
interface CTAProps {
18+
title: string;
19+
description?: string;
20+
buttonText: string;
21+
}
22+
1723
const formSchema = z.object({
1824
email: z.string().email(),
1925
});
2026

21-
const CTA = () => {
27+
const CTA = ({ title, description, buttonText }: CTAProps) => {
2228
const { toast } = useToast();
2329
const form = useForm<z.infer<typeof formSchema>>({
2430
resolver: zodResolver(formSchema),
@@ -27,7 +33,7 @@ const CTA = () => {
2733
},
2834
});
2935
function onSubmit(values: z.infer<typeof formSchema>) {
30-
// TODO: Newsletter subbscriptions
36+
// TODO: Newsletter subscriptions
3137
toast({
3238
title: "In progress...",
3339
description: "I'm still working on this feature.",
@@ -40,37 +46,32 @@ const CTA = () => {
4046
console.log(values);
4147
}
4248
return (
43-
<section className="relative isolate my-24 overflow-hidden rounded-lg bg-primary py-6 text-primary-foreground shadow-md">
49+
<section className="relative isolate my-24 overflow-hidden bg-primary py-6 text-primary-foreground">
4450
<div className="p-8 md:p-12">
4551
<div className="mx-auto max-w-lg text-center">
46-
<h2 className="font-heading text-2xl font-bold md:text-3xl">I also write deep dives in email</h2>
52+
<h2 className="font-heading text-2xl font-bold md:text-3xl">{title}</h2>
4753

48-
<p className="hidden text-muted-foreground sm:mt-4 sm:block">
49-
I write about coding, design, digital nomad life, and solopreneurship. Join over 1,000 other developers in
50-
getting better in business. Unsubscribe whenever.
51-
</p>
54+
<p className="hidden text-muted-foreground sm:mt-4 sm:block">{description}</p>
5255
</div>
5356

5457
<div className="mx-auto mt-8 max-w-xl">
5558
<Form {...form}>
56-
<form onSubmit={form.handleSubmit(onSubmit)} className="space-y-8">
57-
<div className="flex w-full gap-2">
58-
<FormField
59-
control={form.control}
60-
name="email"
61-
render={({ field }) => (
62-
<FormItem className="w-full">
63-
<FormControl>
64-
<Input type="email" placeholder="anakin.skywalker@darksi.de" {...field} />
65-
</FormControl>
66-
<FormMessage />
67-
</FormItem>
68-
)}
69-
/>
70-
<Button type="submit" variant="secondary">
71-
<Mail className="mr-2 h-4 w-4" /> Send me the emails
72-
</Button>
73-
</div>
59+
<form onSubmit={form.handleSubmit(onSubmit)} className="flex w-full flex-col gap-3 md:flex-row">
60+
<FormField
61+
control={form.control}
62+
name="email"
63+
render={({ field }) => (
64+
<FormItem className="flex-auto">
65+
<FormControl>
66+
<Input type="email" placeholder="anakin.skywalker@darksi.de" {...field} />
67+
</FormControl>
68+
<FormMessage />
69+
</FormItem>
70+
)}
71+
/>
72+
<Button type="submit" variant="secondary" className="">
73+
<Mail className="mr-2 h-4 w-4" /> {buttonText}
74+
</Button>
7475
</form>
7576
</Form>
7677
<div className="mt-4 flex items-center justify-center">

components/hero-image.tsx

+7
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import Image from "next/image";
55

66
import { defaultAuthor } from "@/lib/metadata";
77
import { AspectRatio } from "@/components/ui/aspect-ratio";
8+
import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar";
89

910
interface HeroProps {
1011
title: string;
@@ -14,6 +15,12 @@ interface HeroProps {
1415
export function HeroImage({ title, subtitle }: HeroProps) {
1516
return (
1617
<div className="container flex max-w-6xl flex-col items-center md:flex-row">
18+
<div className="mb-4 flex max-w-xl self-start sm:hidden">
19+
<Avatar>
20+
<AvatarImage className="rounded-full border border-primary" src="/avatar.png" alt={defaultAuthor.name} />
21+
<AvatarFallback>{defaultAuthor.name}</AvatarFallback>
22+
</Avatar>
23+
</div>
1724
<div className="flex max-w-xl flex-col lg:mr-auto">
1825
<h1 className="font-heading text-5xl font-bold tracking-tight sm:text-6xl">{title}</h1>
1926
<h2 className="mt-6 font-heading text-lg text-muted-foreground">{subtitle}</h2>

components/hero-simple.tsx

+5-3
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,13 @@ interface HeroProps {
1212

1313
export function HeroSimple({ title, subtitle }: HeroProps) {
1414
return (
15-
<div className="container flex max-w-5xl flex-col items-center justify-center py-32 text-center">
16-
<h1 className="mb-2 font-heading text-5xl font-bold leading-tight tracking-tight sm:text-6xl">{title}</h1>
15+
<div className="container flex max-w-5xl flex-col items-center justify-center text-center sm:py-20 md:py-32">
16+
<h1 className="mb-2 font-heading text-4xl font-bold leading-tight tracking-tight sm:text-5xl md:text-6xl">
17+
{title}
18+
</h1>
1719
<div className="flex content-center items-center justify-center">
1820
<Avatar>
19-
<AvatarImage className="border-blac rounded-full border" src="/avatar.png" />
21+
<AvatarImage className="rounded-full border border-primary" src="/avatar.png" alt={defaultAuthor.name} />
2022
<AvatarFallback>{defaultAuthor.name}</AvatarFallback>
2123
</Avatar>
2224
<p className="ml-2 font-bold text-muted-foreground">{defaultAuthor.handle}</p>

components/hero-video.tsx

+9-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22

33
import * as React from "react";
44

5+
import { defaultAuthor } from "@/lib/metadata";
56
import { AspectRatio } from "@/components/ui/aspect-ratio";
7+
import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar";
68

79
interface HeroProps {
810
title: string;
@@ -12,7 +14,13 @@ interface HeroProps {
1214
export function HeroVideo({ title, subtitle }: HeroProps) {
1315
return (
1416
<div className="container flex max-w-6xl flex-col items-center md:flex-row">
15-
<div className="w-4/12">
17+
<div className="mb-4 flex max-w-xl self-start sm:hidden">
18+
<Avatar>
19+
<AvatarImage className="rounded-full border border-primary" src="/avatar.png" alt={defaultAuthor.name} />
20+
<AvatarFallback>{defaultAuthor.name}</AvatarFallback>
21+
</Avatar>
22+
</div>
23+
<div className="hidden lg:block lg:w-4/12">
1624
<AspectRatio ratio={9 / 12}>
1725
<div className="rounded-lg bg-black shadow-lg">
1826
<iframe

0 commit comments

Comments
 (0)