Skip to content

Commit 1ece4e0

Browse files
authored
✨ Refactor code for improved readability and maintainability; update constants and styles across components; add placeholder for blog collection
1 parent 6aea1ce commit 1ece4e0

16 files changed

Lines changed: 211 additions & 131 deletions

.devcontainer/devcontainer.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,7 @@
44
"postCreateCommand": "bash -lc 'set -e; export BUN_INSTALL=\"$HOME/.bun\"; curl -fsSL https://bun.sh/install | bash; \"$BUN_INSTALL/bin/bun\" --version; \"$BUN_INSTALL/bin/bun\" install; grep -q \"BUN_INSTALL=\\\"$HOME/.bun\\\"\" ~/.bashrc || printf \"\\nexport BUN_INSTALL=\\\"$HOME/.bun\\\"\\nexport PATH=\\\"$BUN_INSTALL/bin:$PATH\\\"\\n\" >> ~/.bashrc; grep -q \"BUN_INSTALL=\\\"$HOME/.bun\\\"\" ~/.zshrc || printf \"\\nexport BUN_INSTALL=\\\"$HOME/.bun\\\"\\nexport PATH=\\\"$BUN_INSTALL/bin:$PATH\\\"\\n\" >> ~/.zshrc'",
55
"customizations": {
66
"vscode": {
7-
"extensions": [
8-
"astro-build.astro-vscode",
9-
"biomejs.biome"
10-
]
7+
"extensions": ["astro-build.astro-vscode", "biomejs.biome"]
118
}
129
}
1310
}

src/components/Contact.astro

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
---
22
import type { CollectionEntry } from "astro:content";
3-
import { CARD_CLASSES, TYPOGRAPHY_CLASSES, LINK_CLASSES, CONTAINER_CLASSES } from "@lib/constants";
3+
import {
4+
CARD_CLASSES,
5+
CONTAINER_CLASSES,
6+
LINK_CLASSES,
7+
TYPOGRAPHY_CLASSES,
8+
} from "@lib/constants";
49
510
interface Props {
611
homepage: CollectionEntry<"site">["data"];

src/components/Portfolio.astro

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
---
22
import type { CollectionEntry } from "astro:content";
3-
import { CARD_CLASSES, TYPOGRAPHY_CLASSES, LINK_CLASSES, CONTAINER_CLASSES } from "@lib/constants";
3+
import {
4+
CARD_CLASSES,
5+
CONTAINER_CLASSES,
6+
LINK_CLASSES,
7+
TYPOGRAPHY_CLASSES,
8+
} from "@lib/constants";
49
510
interface Props {
611
items: CollectionEntry<"portfolio">[];
@@ -9,7 +14,8 @@ interface Props {
914
const { items } = Astro.props as Props;
1015
const sorted = [...items].sort((a, b) => a.data.order - b.data.order);
1116
12-
const techBadgeClass = "rounded border border-[var(--border-strong)] bg-[color-mix(in_srgb,var(--surface-elevated)_78%,transparent)] px-1.5 py-0.5 text-[11px] text-[var(--text-strong)]";
17+
const techBadgeClass =
18+
"rounded border border-[var(--border-strong)] bg-[color-mix(in_srgb,var(--surface-elevated)_78%,transparent)] px-1.5 py-0.5 text-[11px] text-[var(--text-strong)]";
1319
---
1420

1521
<section id="work" data-reveal="up">

src/content.config.ts

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ const siteCollection = defineCollection({
99
metaDescription: z.string(),
1010
kicker: z.string(),
1111
heroLead: z.string(),
12-
githubUrl: z.string().url(),
12+
githubUrl: z.url(),
1313
responseTime: z.string(),
1414
timezone: z.string(),
1515
location: z.string(),
1616
availability: z.string(),
17-
contactEmail: z.string().email(),
18-
bookingUrl: z.string().url(),
17+
contactEmail: z.email(),
18+
bookingUrl: z.url(),
1919
}),
2020
});
2121

@@ -29,7 +29,7 @@ const portfolioCollection = defineCollection({
2929
impact: z.string(),
3030
timeframe: z.string(),
3131
stack: z.array(z.string()),
32-
proofUrl: z.string().url(),
32+
proofUrl: z.url(),
3333
proofLabel: z.string(),
3434
}),
3535
});
@@ -42,12 +42,21 @@ const blogCollection = defineCollection({
4242
publishDate: z.coerce.date(),
4343
updatedDate: z.coerce.date().optional(),
4444
author: z.string().default("Avaab Razzaq"),
45-
image: z.object({
46-
src: z.string(),
47-
alt: z.string(),
48-
}).optional(),
45+
image: z
46+
.object({
47+
src: z.string(),
48+
alt: z.string(),
49+
})
50+
.optional(),
4951
tags: z.array(z.string()).default([]),
50-
category: z.enum(["AI", "Marketing", "Development", "Growth", "Analytics", "Tutorial"]),
52+
category: z.enum([
53+
"AI",
54+
"Marketing",
55+
"Development",
56+
"Growth",
57+
"Analytics",
58+
"Tutorial",
59+
]),
5160
draft: z.boolean().default(false),
5261
featured: z.boolean().default(false),
5362
readingTime: z.number().optional(),

src/content/blog/.gitkeep

Whitespace-only changes.

src/content/blog/placeholder.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
title: Placeholder
3+
description: Placeholder content entry used to satisfy content collection glob checks.
4+
publishDate: 2026-01-01
5+
author: Avaab Razzaq
6+
tags: []
7+
category: Development
8+
draft: true
9+
featured: false
10+
---
11+
12+
This draft placeholder ensures the blog collection always has at least one matching file.

src/content/portfolio/content-marketing-strategy.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,13 @@
55
"summary": "Built comprehensive content strategy combining SEO research, thought leadership articles, case studies, and email nurture sequences to drive organic acquisition.",
66
"impact": "Increased organic traffic by 425%, generated 180+ qualified leads/month, achieved #1-3 rankings for 12 target keywords.",
77
"timeframe": "2024-2025",
8-
"stack": ["SEO", "Content Strategy", "Ahrefs", "WordPress", "Email Marketing"],
8+
"stack": [
9+
"SEO",
10+
"Content Strategy",
11+
"Ahrefs",
12+
"WordPress",
13+
"Email Marketing"
14+
],
915
"proofUrl": "https://github.com/AR10Dev",
1016
"proofLabel": "See content results"
1117
}

src/content/portfolio/paid-social-campaigns.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,13 @@
55
"summary": "Managed $45K+ monthly ad spend across Meta, LinkedIn, and Twitter with audience segmentation, creative testing, and conversion optimization.",
66
"impact": "Achieved 3.2x ROAS, reduced CAC by 58%, scaled spend 4x while maintaining profitability targets.",
77
"timeframe": "2024-2025",
8-
"stack": ["Meta Ads", "LinkedIn Campaign Manager", "Google Analytics", "Looker Studio", "A/B Testing"],
8+
"stack": [
9+
"Meta Ads",
10+
"LinkedIn Campaign Manager",
11+
"Google Analytics",
12+
"Looker Studio",
13+
"A/B Testing"
14+
],
915
"proofUrl": "https://github.com/AR10Dev",
1016
"proofLabel": "View campaign data"
1117
}

src/content/portfolio/social-media-management.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,13 @@
55
"summary": "Developed and executed multi-platform social media strategy with data-driven content calendar, engagement tactics, and influencer partnerships.",
66
"impact": "Grew combined following by 340% in 6 months, achieved 8.2% avg. engagement rate vs. 2.1% industry baseline.",
77
"timeframe": "2024-2025",
8-
"stack": ["Meta Business Suite", "LinkedIn Analytics", "Buffer", "Canva", "Instagram Growth"],
8+
"stack": [
9+
"Meta Business Suite",
10+
"LinkedIn Analytics",
11+
"Buffer",
12+
"Canva",
13+
"Instagram Growth"
14+
],
915
"proofUrl": "https://github.com/AR10Dev",
1016
"proofLabel": "View growth metrics"
1117
}

src/lib/constants.ts

Lines changed: 32 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,18 @@ export const TYPOGRAPHY_CLASSES = {
1010
"font-['Sora',-apple-system,BlinkMacSystemFont,'Segoe_UI',sans-serif] text-[clamp(1.7rem,3vw,2.35rem)] leading-[1.2] tracking-[-0.02em] font-bold",
1111
heroTitle:
1212
"mt-4 text-balance font-['Sora',-apple-system,BlinkMacSystemFont,'Segoe_UI',sans-serif] text-[clamp(2.1rem,5vw,4.3rem)] leading-[1.08] tracking-[-0.03em] font-extrabold",
13-
subheading: "text-2xl font-semibold text-[var(--text-strong)] md:text-3xl leading-[1.3] tracking-[-0.015em]",
14-
sectionTitle: "font-['Sora',-apple-system,BlinkMacSystemFont,'Segoe_UI',sans-serif] text-[clamp(1.5rem,2.5vw,2rem)] leading-[1.25] tracking-[-0.02em] font-bold",
13+
subheading:
14+
"text-2xl font-semibold text-[var(--text-strong)] md:text-3xl leading-[1.3] tracking-[-0.015em]",
15+
sectionTitle:
16+
"font-['Sora',-apple-system,BlinkMacSystemFont,'Segoe_UI',sans-serif] text-[clamp(1.5rem,2.5vw,2rem)] leading-[1.25] tracking-[-0.02em] font-bold",
1517
body: "text-[clamp(1rem,2vw,1.15rem)] leading-[1.75] text-[var(--text-muted)] font-normal",
1618
label: "text-sm text-[var(--accent-strong)] font-semibold leading-[1.5]",
17-
labelXs: "text-xs font-semibold text-[var(--accent-strong)] leading-[1.4] tracking-[0.02em]",
18-
cardTitle: "text-xl font-semibold text-[var(--text-strong)] leading-[1.3] tracking-[-0.01em]",
19-
cardTitleBold: "text-xl font-bold leading-[1.25] text-[var(--text-strong)] tracking-[-0.01em]",
19+
labelXs:
20+
"text-xs font-semibold text-[var(--accent-strong)] leading-[1.4] tracking-[0.02em]",
21+
cardTitle:
22+
"text-xl font-semibold text-[var(--text-strong)] leading-[1.3] tracking-[-0.01em]",
23+
cardTitleBold:
24+
"text-xl font-bold leading-[1.25] text-[var(--text-strong)] tracking-[-0.01em]",
2025
cardText: "text-base font-normal text-[var(--text-muted)] leading-[1.65]",
2126
cardBody: "text-base font-normal text-[var(--text-strong)] leading-[1.65]",
2227
cardBodySm: "text-sm text-[var(--text-muted)] leading-[1.6]",
@@ -34,9 +39,12 @@ export const BUTTON_CLASSES = {
3439
export const CARD_CLASSES = {
3540
base: "rounded-[var(--card-radius)] border border-[var(--card-uniform-border)] bg-[var(--card-uniform-bg)] shadow-[var(--card-shadow)]",
3641
compact: "p-5",
37-
glass: "rounded-lg border border-[var(--border-strong)] bg-[color-mix(in_srgb,var(--surface-panel)_80%,transparent)] shadow-[0_10px_26px_rgba(0,0,0,0.2)] backdrop-blur-sm",
38-
glassVariant: "rounded-lg border border-[var(--border-strong)] bg-[color-mix(in_srgb,var(--surface-panel)_88%,transparent)] shadow-[0_8px_18px_rgba(0,0,0,0.16)] backdrop-blur-sm",
39-
portfolio: "rounded-lg border border-[var(--border-strong)] bg-[color-mix(in_srgb,var(--surface-panel)_80%,transparent)] p-4 shadow-[0_12px_30px_rgba(0,0,0,0.22)] backdrop-blur-sm hover:shadow-[0_14px_36px_rgba(0,0,0,0.28)]",
42+
glass:
43+
"rounded-lg border border-[var(--border-strong)] bg-[color-mix(in_srgb,var(--surface-panel)_80%,transparent)] shadow-[0_10px_26px_rgba(0,0,0,0.2)] backdrop-blur-sm",
44+
glassVariant:
45+
"rounded-lg border border-[var(--border-strong)] bg-[color-mix(in_srgb,var(--surface-panel)_88%,transparent)] shadow-[0_8px_18px_rgba(0,0,0,0.16)] backdrop-blur-sm",
46+
portfolio:
47+
"rounded-lg border border-[var(--border-strong)] bg-[color-mix(in_srgb,var(--surface-panel)_80%,transparent)] p-4 shadow-[0_12px_30px_rgba(0,0,0,0.22)] backdrop-blur-sm hover:shadow-[0_14px_36px_rgba(0,0,0,0.28)]",
4048
};
4149

4250
export const FORM_CLASSES = {
@@ -61,24 +69,32 @@ export const SKIP_LINK_CLASSES =
6169
export const CONTAINER_CLASSES = {
6270
horizontal: "mx-auto max-w-screen-xl px-6",
6371
section: "mx-auto w-full max-w-screen-xl px-6",
64-
sectionLg: "section-content max-w-screen-lg mx-auto xl:max-w-screen-xl w-full",
72+
sectionLg:
73+
"section-content max-w-screen-lg mx-auto xl:max-w-screen-xl w-full",
6574
};
6675

6776
export const LINK_CLASSES = {
68-
underlined: "inline-block border-b border-[var(--accent-strong)] pb-0.5 text-xs font-semibold text-[var(--accent-strong)]",
69-
ctaButton: "inline-block rounded-lg bg-[var(--accent-strong)] px-6 py-3 font-semibold text-[var(--accent-contrast)] hover:opacity-90",
77+
underlined:
78+
"inline-block border-b border-[var(--accent-strong)] pb-0.5 text-xs font-semibold text-[var(--accent-strong)]",
79+
ctaButton:
80+
"inline-block rounded-lg bg-[var(--accent-strong)] px-6 py-3 font-semibold text-[var(--accent-contrast)] hover:opacity-90",
7081
};
7182

7283
export const LAYOUT_CLASSES = {
7384
siteBg: "fixed inset-0 -z-10 pointer-events-none site-bg",
7485
mainContent: "h-screen overflow-y-auto scroll-smooth-snap",
75-
slideSection: "min-h-screen snap-start snap-always flex items-center md:min-h-screen max-md:min-h-0 max-md:snap-normal",
86+
slideSection:
87+
"min-h-screen snap-start snap-always flex items-center md:min-h-screen max-md:min-h-0 max-md:snap-normal",
7688
slideSectionChild: "w-full",
7789
homeSlide: "block",
78-
sectionSizeHome: "pt-[clamp(5.6rem,10vh,8rem)] pb-[clamp(2.5rem,6vh,5rem)] max-md:pt-[6.2rem] max-md:pb-10",
79-
sectionSizeWork: "pt-[clamp(4.5rem,8vh,6.5rem)] pb-[clamp(3rem,7vh,5.5rem)] max-md:pt-[6.2rem] max-md:pb-10",
80-
sectionSizeBlog: "pt-[clamp(4.2rem,7.5vh,6rem)] pb-[clamp(3rem,7vh,5.2rem)] max-md:pt-[6.2rem] max-md:pb-10",
81-
homeStack: "min-h-[clamp(35rem,calc(100vh-7rem),56rem)] flex flex-col justify-center gap-[clamp(1.5rem,3vh,2.5rem)] max-md:min-h-0 max-md:justify-start",
90+
sectionSizeHome:
91+
"pt-[clamp(5.6rem,10vh,8rem)] pb-[clamp(2.5rem,6vh,5rem)] max-md:pt-[6.2rem] max-md:pb-10",
92+
sectionSizeWork:
93+
"pt-[clamp(4.5rem,8vh,6.5rem)] pb-[clamp(3rem,7vh,5.5rem)] max-md:pt-[6.2rem] max-md:pb-10",
94+
sectionSizeBlog:
95+
"pt-[clamp(4.2rem,7.5vh,6rem)] pb-[clamp(3rem,7vh,5.2rem)] max-md:pt-[6.2rem] max-md:pb-10",
96+
homeStack:
97+
"min-h-[clamp(35rem,calc(100vh-7rem),56rem)] flex flex-col justify-center gap-[clamp(1.5rem,3vh,2.5rem)] max-md:min-h-0 max-md:justify-start",
8298
};
8399

84100
export const TYPING_CLASSES = {

0 commit comments

Comments
 (0)