Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 587df31

Browse files
update: Initial Commit
0 parents commit 587df31

File tree

94 files changed

+10198
-0
lines changed

Some content is hidden

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

94 files changed

+10198
-0
lines changed

‎.DS_Store‎

10 KB
Binary file not shown.

‎.gitignore‎

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2+
3+
# dependencies
4+
/node_modules
5+
6+
# next.js
7+
/.next/
8+
/out/
9+
10+
# production
11+
/build
12+
13+
# debug
14+
npm-debug.log*
15+
yarn-debug.log*
16+
yarn-error.log*
17+
.pnpm-debug.log*
18+
19+
# env files
20+
.env*
21+
22+
# vercel
23+
.vercel
24+
25+
# typescript
26+
*.tsbuildinfo
27+
next-env.d.ts

‎app/_document.tsx‎

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import { Html, Head, Main, NextScript } from "next/document"
2+
3+
export default function Document() {
4+
return (
5+
<Html lang="en">
6+
<Head>
7+
<link rel="preconnect" href="https://fonts.googleapis.com" />
8+
<link rel="preconnect" href="https://fonts.gstatic.com" crossOrigin="anonymous" />
9+
<link
10+
href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap"
11+
rel="stylesheet"
12+
/>
13+
</Head>
14+
<body>
15+
<Main />
16+
<NextScript />
17+
</body>
18+
</Html>
19+
)
20+
}

‎app/blog/[slug]/page.tsx‎

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
import { notFound } from "next/navigation"
2+
import { getPostBySlug, getAllPosts } from "@/utils/getPosts"
3+
import Link from "next/link"
4+
import Footer from "@/components/Footer"
5+
import { Metadata } from "next"
6+
import PostContent from "@/components/PostContent" // Import the new client-side component
7+
8+
interface Params {
9+
params: {
10+
slug: string
11+
}
12+
}
13+
14+
export async function generateMetadata({ params }: Params): Promise<Metadata> {
15+
const post = getPostBySlug(params.slug, ["title", "excerpt"])
16+
17+
return {
18+
title: `${post.title} | AgileCoder`,
19+
description: post.excerpt,
20+
}
21+
}
22+
23+
export default async function Post({ params }: Params) {
24+
const post = getPostBySlug(params.slug, [
25+
"title",
26+
"date",
27+
"slug",
28+
"author",
29+
"content",
30+
"coverImage",
31+
"excerpt",
32+
])
33+
34+
if (!post?.slug) {
35+
return notFound()
36+
}
37+
38+
return (
39+
<div className="min-h-screen bg-white">
40+
<div className="container max-w-[900px] w-full mx-auto px-10 py-8">
41+
<Link href="/#blog" className="text-black hover:underline mb-8 inline-block">
42+
← Back to all posts
43+
</Link>
44+
45+
{/* Render markdown content on the client */}
46+
<PostContent post={post as any} />
47+
</div>
48+
49+
<Footer />
50+
</div>
51+
)
52+
}
53+
54+
export async function generateStaticParams() {
55+
const posts = getAllPosts(["slug"])
56+
57+
return posts.map((post) => ({
58+
slug: post.slug,
59+
}))
60+
}

‎app/blog/page.tsx‎

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
import { getAllPosts } from "@/utils/getPosts"
2+
import type { PostData } from "@/types"
3+
import BlogCard from "@/components/BlogCard"
4+
5+
export default async function BlogPage() {
6+
const posts: PostData[] = getAllPosts([
7+
"title",
8+
"date",
9+
"slug",
10+
"author",
11+
"excerpt",
12+
"coverImage",
13+
])
14+
15+
return (
16+
<section className="py-20 bg-white">
17+
<div className="container mx-auto px-4">
18+
<h1 className="text-4xl md:text-5xl font-bold text-black mb-16">
19+
All Blog Posts
20+
</h1>
21+
22+
<div className="grid md:grid-cols-3 gap-10">
23+
{posts.map((post) => (
24+
<BlogCard key={post.slug} post={post} />
25+
))}
26+
</div>
27+
</div>
28+
</section>
29+
)
30+
}

‎app/globals.css‎

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
@tailwind base;
2+
@tailwind components;
3+
@tailwind utilities;
4+
5+
body {
6+
font-family: Arial, Helvetica, sans-serif;
7+
}
8+
9+
@layer utilities {
10+
.text-balance {
11+
text-wrap: balance;
12+
}
13+
}
14+
15+
@layer base {
16+
:root {
17+
--background: 0 0% 100%;
18+
--foreground: 0 0% 3.9%;
19+
--card: 0 0% 100%;
20+
--card-foreground: 0 0% 3.9%;
21+
--popover: 0 0% 100%;
22+
--popover-foreground: 0 0% 3.9%;
23+
--primary: 0 0% 9%;
24+
--primary-foreground: 0 0% 98%;
25+
--secondary: 0 0% 96.1%;
26+
--secondary-foreground: 0 0% 9%;
27+
--muted: 0 0% 96.1%;
28+
--muted-foreground: 0 0% 45.1%;
29+
--accent: 0 0% 96.1%;
30+
--accent-foreground: 0 0% 9%;
31+
--destructive: 0 84.2% 60.2%;
32+
--destructive-foreground: 0 0% 98%;
33+
--border: 0 0% 89.8%;
34+
--input: 0 0% 89.8%;
35+
--ring: 0 0% 3.9%;
36+
--chart-1: 12 76% 61%;
37+
--chart-2: 173 58% 39%;
38+
--chart-3: 197 37% 24%;
39+
--chart-4: 43 74% 66%;
40+
--chart-5: 27 87% 67%;
41+
--radius: 0.5rem;
42+
--sidebar-background: 0 0% 98%;
43+
--sidebar-foreground: 240 5.3% 26.1%;
44+
--sidebar-primary: 240 5.9% 10%;
45+
--sidebar-primary-foreground: 0 0% 98%;
46+
--sidebar-accent: 240 4.8% 95.9%;
47+
--sidebar-accent-foreground: 240 5.9% 10%;
48+
--sidebar-border: 220 13% 91%;
49+
--sidebar-ring: 217.2 91.2% 59.8%;
50+
}
51+
.dark {
52+
--background: 0 0% 3.9%;
53+
--foreground: 0 0% 98%;
54+
--card: 0 0% 3.9%;
55+
--card-foreground: 0 0% 98%;
56+
--popover: 0 0% 3.9%;
57+
--popover-foreground: 0 0% 98%;
58+
--primary: 0 0% 98%;
59+
--primary-foreground: 0 0% 9%;
60+
--secondary: 0 0% 14.9%;
61+
--secondary-foreground: 0 0% 98%;
62+
--muted: 0 0% 14.9%;
63+
--muted-foreground: 0 0% 63.9%;
64+
--accent: 0 0% 14.9%;
65+
--accent-foreground: 0 0% 98%;
66+
--destructive: 0 62.8% 30.6%;
67+
--destructive-foreground: 0 0% 98%;
68+
--border: 0 0% 14.9%;
69+
--input: 0 0% 14.9%;
70+
--ring: 0 0% 83.1%;
71+
--chart-1: 220 70% 50%;
72+
--chart-2: 160 60% 45%;
73+
--chart-3: 30 80% 55%;
74+
--chart-4: 280 65% 60%;
75+
--chart-5: 340 75% 55%;
76+
--sidebar-background: 240 5.9% 10%;
77+
--sidebar-foreground: 240 4.8% 95.9%;
78+
--sidebar-primary: 224.3 76.3% 48%;
79+
--sidebar-primary-foreground: 0 0% 100%;
80+
--sidebar-accent: 240 3.7% 15.9%;
81+
--sidebar-accent-foreground: 240 4.8% 95.9%;
82+
--sidebar-border: 240 3.7% 15.9%;
83+
--sidebar-ring: 217.2 91.2% 59.8%;
84+
}
85+
}
86+
87+
@layer base {
88+
* {
89+
@apply border-border;
90+
}
91+
body {
92+
@apply bg-background text-foreground;
93+
}
94+
}

‎app/layout.tsx‎

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
import type { Metadata } from "next"
2+
import Header from "@/components/Header"
3+
import "@/styles/globals.css"
4+
import Script from "next/script"
5+
6+
export const metadata: Metadata = {
7+
title: "AgileCoder - Innovate. Build. Deliver.",
8+
description: "From cutting-edge dev tools and plugins to full-fledged websites — we craft and ship modern digital experiences at speed.",
9+
icons: {
10+
icon: "/agilecoder-dark.png",
11+
},
12+
}
13+
14+
const GA_ID = process.env.NEXT_PUBLIC_GA_ID || "";
15+
16+
export default function RootLayout({
17+
children,
18+
}: {
19+
children: React.ReactNode
20+
}) {
21+
return (
22+
<html lang="en">
23+
<head>
24+
<Script
25+
src={`https://www.googletagmanager.com/gtag/js?id=${GA_ID}`}
26+
strategy="afterInteractive"
27+
/>
28+
<Script id="gtag-init" strategy="afterInteractive">
29+
{`
30+
window.dataLayer = window.dataLayer || [];
31+
function gtag(){dataLayer.push(arguments);}
32+
gtag('js', new Date());
33+
gtag('config', '${GA_ID}', {
34+
page_path: window.location.pathname,
35+
});
36+
`}
37+
</Script>
38+
</head>
39+
<body>
40+
<div id="top" />
41+
<Header />
42+
{children}
43+
</body>
44+
</html>
45+
)
46+
}

‎app/page.tsx‎

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
import Hero from "@/components/sections/Hero"
2+
import ToolsSection from "@/components/sections/ExploreSection"
3+
import ServicesSection from "@/components/sections/ServicesSection"
4+
import WhyAgileCoder from "@/components/sections/WhyAgileCoder"
5+
import BlogPreview from "@/components/sections/BlogPreview"
6+
import About from "@/components/sections/About"
7+
import ContactForm from "@/components/sections/ContactForm"
8+
import Footer from "@/components/Footer"
9+
import { getAllPosts } from "@/utils/getPosts"
10+
11+
export default function Home() {
12+
const posts = getAllPosts(["title", "date", "slug", "author", "coverImage", "excerpt"])
13+
14+
return (
15+
<main className="min-h-screen">
16+
<Hero />
17+
<ToolsSection />
18+
<ServicesSection />
19+
<WhyAgileCoder />
20+
<BlogPreview posts={posts} />
21+
<About />
22+
<ContactForm />
23+
<Footer />
24+
</main>
25+
)
26+
}

‎components.json‎

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"$schema": "https://ui.shadcn.com/schema.json",
3+
"style": "default",
4+
"rsc": true,
5+
"tsx": true,
6+
"tailwind": {
7+
"config": "tailwind.config.ts",
8+
"css": "app/globals.css",
9+
"baseColor": "neutral",
10+
"cssVariables": true,
11+
"prefix": ""
12+
},
13+
"aliases": {
14+
"components": "@/components",
15+
"utils": "@/lib/utils",
16+
"ui": "@/components/ui",
17+
"lib": "@/lib",
18+
"hooks": "@/hooks"
19+
},
20+
"iconLibrary": "lucide"
21+
}

‎components/BlogCard.tsx‎

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
import Link from "next/link"
2+
import Image from "next/image"
3+
import type { PostData } from "@/types"
4+
5+
interface BlogCardProps {
6+
post: PostData
7+
}
8+
9+
export default function BlogCard({ post }: BlogCardProps) {
10+
return (
11+
<div className="bg-white border border-black rounded-lg overflow-hidden hover:shadow-md transition duration-300">
12+
{post.coverImage && (
13+
<Image
14+
src={post.coverImage}
15+
alt={`Cover for ${post.title}`}
16+
width={800}
17+
height={400}
18+
className="w-full h-48 object-cover border-b border-black"
19+
/>
20+
)}
21+
<div className="p-6">
22+
{/* Title is now wrapped in Link */}
23+
<Link href={`/blog/${post.slug}#top`}>
24+
<h2 className="text-2xl font-semibold text-black mb-1 hover:underline">
25+
{post.title}
26+
</h2>
27+
</Link>
28+
<p className="text-sm text-gray-500 mb-2">
29+
{new Date(post.date).toLocaleDateString("en-US", {
30+
year: "numeric",
31+
month: "long",
32+
day: "numeric",
33+
})}{" "}
34+
{post.author}
35+
</p>
36+
<p className="text-gray-700 mb-4 line-clamp-3">{post.excerpt}</p>
37+
<Link
38+
href={`/blog/${post.slug}`}
39+
className="text-black font-medium hover:underline"
40+
>
41+
Read more →
42+
</Link>
43+
</div>
44+
</div>
45+
)
46+
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /