Skip to content

Commit 405c989

Browse files
authored
🚀 Refactor service pages to use consistent container classes; add theme initialization script; enhance global styles for prose and transitions; update TypeScript configuration for improved module resolution
1 parent 87299c5 commit 405c989

59 files changed

Lines changed: 625 additions & 1092 deletions

Some content is hidden

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

‎.gitignore‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,7 @@ dist
3333
.astro/
3434

3535
# Typescript mcp cache
36-
.lsmcp/
36+
.lsmcp/
37+
38+
# Playwright mcp cache
39+
.playwright-mcp/

‎.vscode/mcp.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,4 +57,4 @@
5757
"args": ["@playwright/mcp@latest"]
5858
}
5959
}
60-
}
60+
}

‎astro.config.ts‎

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,17 @@
11
import mdx from "@astrojs/mdx";
22
import partytown from "@astrojs/partytown";
3-
import sitemap, { ChangeFreqEnum } from "@astrojs/sitemap";
3+
import sitemap from "@astrojs/sitemap";
44
import solid from "@astrojs/solid-js";
55
import tailwindcss from "@tailwindcss/vite";
66
import AstroPWA from "@vite-pwa/astro";
77
import { defineConfig } from "astro/config";
88

9-
const tailwindPlugin = tailwindcss() as unknown as never;
10-
119
// https://astro.build/config
1210
export default defineConfig({
1311
site: "https://avaabrazzaq.com", // Used to generate canonical URLs and sitemap entries.
1412
trailingSlash: "always", // Consistent URL format - all URLs end with /
1513
vite: {
16-
plugins: [tailwindPlugin],
14+
plugins: [tailwindcss()],
1715
},
1816
integrations: [
1917
solid(),
@@ -28,52 +26,52 @@ export default defineConfig({
2826
// Enhanced sitemap with priority and changefreq
2927
const url = item.url;
3028
let priority = 0.5;
31-
let changefreq = ChangeFreqEnum.MONTHLY;
29+
let changefreq = "monthly";
3230

3331
// Homepage gets highest priority
3432
if (url === "https://avaabrazzaq.com/") {
3533
priority = 1.0;
36-
changefreq = ChangeFreqEnum.WEEKLY;
34+
changefreq = "weekly";
3735
}
3836
// Blog posts - high priority, updated occasionally
3937
else if (url.includes("/blog/") && !url.endsWith("/blog/")) {
4038
priority = 0.8;
41-
changefreq = ChangeFreqEnum.MONTHLY;
39+
changefreq = "monthly";
4240
}
4341
// Blog index
4442
else if (url.endsWith("/blog/")) {
4543
priority = 0.9;
46-
changefreq = ChangeFreqEnum.WEEKLY;
44+
changefreq = "weekly";
4745
}
4846
// Service pages - high priority
4947
else if (url.includes("/services/") && !url.endsWith("/services/")) {
5048
priority = 0.8;
51-
changefreq = ChangeFreqEnum.MONTHLY;
49+
changefreq = "monthly";
5250
}
5351
// Services index
5452
else if (url.endsWith("/services/")) {
5553
priority = 0.9;
56-
changefreq = ChangeFreqEnum.MONTHLY;
54+
changefreq = "monthly";
5755
}
5856
// Portfolio items
5957
else if (url.includes("/portfolio/") && !url.endsWith("/portfolio/")) {
6058
priority = 0.7;
61-
changefreq = ChangeFreqEnum.YEARLY;
59+
changefreq = "yearly";
6260
}
6361
// Portfolio index
6462
else if (url.endsWith("/portfolio/")) {
6563
priority = 0.8;
66-
changefreq = ChangeFreqEnum.MONTHLY;
64+
changefreq = "monthly";
6765
}
6866
// About and contact
6967
else if (url.includes("/about/") || url.includes("/contact/")) {
7068
priority = 0.7;
71-
changefreq = ChangeFreqEnum.MONTHLY;
69+
changefreq = "monthly";
7270
}
7371

7472
return {
7573
...item,
76-
changefreq,
74+
changefreq: changefreq as typeof item.changefreq,
7775
priority,
7876
// Note: lastmod is automatically added by Astro sitemap when available
7977
};
@@ -94,17 +92,19 @@ export default defineConfig({
9492
src: "/pwa-192x192.png",
9593
sizes: "192x192",
9694
type: "image/png",
95+
purpose: "any",
9796
},
9897
{
9998
src: "/pwa-512x512.png",
10099
sizes: "512x512",
101100
type: "image/png",
101+
purpose: "any",
102102
},
103103
{
104-
src: "/pwa-192x192.png",
105-
sizes: "192x192",
104+
src: "/pwa-512x512.png",
105+
sizes: "512x512",
106106
type: "image/png",
107-
purpose: "any maskable",
107+
purpose: "maskable",
108108
},
109109
],
110110
},

‎src/components/Contact.astro‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ const { homepage } = Astro.props as Props;
6363
<a
6464
href={homepage.githubUrl}
6565
data-track="open_github_profile"
66-
class={`${CARD_CLASSES.glassVariant} px-6 py-3 font-semibold text-[var(--text-strong)]`}
66+
class={`${CARD_CLASSES.glass} px-6 py-3 font-semibold text-[var(--text-strong)]`}
6767
>
6868
GitHub
6969
</a>

‎src/components/Footer.astro‎

Lines changed: 0 additions & 37 deletions
This file was deleted.
Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
---
2+
type Props = {
3+
title: string;
4+
description: string;
5+
canonicalUrl: string;
6+
ogImage: string;
7+
ogType?: string;
8+
author?: string;
9+
robots?: string;
10+
keywords?: string;
11+
publishedTime?: string;
12+
modifiedTime?: string;
13+
twitterHandle?: string;
14+
structuredData?: Record<string, unknown>;
15+
};
16+
17+
const {
18+
title,
19+
description,
20+
canonicalUrl,
21+
ogImage,
22+
ogType = "website",
23+
author = "Avaab Razzaq",
24+
robots = "index, follow, max-image-preview:large, max-snippet:-1, max-video-preview:-1",
25+
keywords,
26+
publishedTime,
27+
modifiedTime,
28+
twitterHandle = "@itsmeAvaab",
29+
structuredData,
30+
} = Astro.props as Props;
31+
---
32+
33+
<meta charset="UTF-8" />
34+
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=5.0" />
35+
<meta name="description" content={description} />
36+
<meta name="author" content={author} />
37+
<meta name="robots" content={robots} />
38+
{keywords && <meta name="keywords" content={keywords} />}
39+
40+
<link rel="icon" type="image/x-icon" href="/favicon.ico" />
41+
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png" />
42+
<link rel="canonical" href={canonicalUrl} />
43+
<link rel="sitemap" href="/sitemap-index.xml" />
44+
<link
45+
rel="alternate"
46+
type="application/rss+xml"
47+
title="Avaab Razzaq Blog RSS Feed"
48+
href="/blog/rss.xml"
49+
/>
50+
51+
<link rel="preconnect" href="https://fonts.googleapis.com" />
52+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
53+
<link
54+
href="https://fonts.googleapis.com/css2?family=Manrope:wght@300..800&family=Sora:wght@300..800&display=swap"
55+
rel="stylesheet"
56+
/>
57+
58+
<title>{title}</title>
59+
60+
<meta property="og:type" content={ogType} />
61+
<meta property="og:title" content={title} />
62+
<meta property="og:description" content={description} />
63+
<meta property="og:url" content={canonicalUrl} />
64+
<meta property="og:image" content={ogImage} />
65+
<meta property="og:image:alt" content={title} />
66+
<meta property="og:image:width" content="1200" />
67+
<meta property="og:image:height" content="630" />
68+
<meta property="og:site_name" content="Avaab Razzaq - AI Growth Engineer" />
69+
<meta property="og:locale" content="en_US" />
70+
71+
{publishedTime && <meta property="article:published_time" content={publishedTime} />}
72+
{modifiedTime && <meta property="article:modified_time" content={modifiedTime} />}
73+
74+
<meta name="twitter:card" content="summary_large_image" />
75+
<meta name="twitter:site" content={twitterHandle} />
76+
<meta name="twitter:creator" content={twitterHandle} />
77+
<meta name="twitter:title" content={title} />
78+
<meta name="twitter:description" content={description} />
79+
<meta name="twitter:image" content={ogImage} />
80+
81+
<meta name="theme-color" content="#0e2a47" />
82+
83+
{structuredData && (
84+
<script
85+
is:inline
86+
type="application/ld+json"
87+
set:html={JSON.stringify(structuredData)}
88+
/>
89+
)}

‎src/components/Header.astro‎

Lines changed: 0 additions & 65 deletions
This file was deleted.

‎src/components/HeaderNav.astro‎

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,12 @@ import { ICON_BUTTON_CLASSES } from "@lib/constants";
55
import type { NavLink } from "@solid-components/Navigation";
66
import Navigation from "@solid-components/Navigation";
77
8-
export interface Props {
8+
type Props = {
99
background?: string;
10-
currentPath?: string;
11-
}
10+
currentPath: string;
11+
};
1212
13-
const { background = "", currentPath = Astro.url.pathname } =
14-
Astro.props as Props;
13+
const { background = "", currentPath } = Astro.props as Props;
1514
1615
const navLinks: NavLink[] = [
1716
{ label: "Home", href: "/" },

‎src/components/Portfolio.astro‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ const techBadgeClass =
2727
<div class="mb-3 flex justify-between items-start">
2828
<div>
2929
<p class={TYPOGRAPHY_CLASSES.labelXs}>{item.data.category}</p>
30-
<h3 class={`mt-1 ${TYPOGRAPHY_CLASSES.cardTitleBold}`}>{item.data.title}</h3>
30+
<h3 class={`mt-1 ${TYPOGRAPHY_CLASSES.cardTitle} font-bold`}>{item.data.title}</h3>
3131
</div>
3232
</div>
3333

‎src/components/SocialLinks.astro‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
import { SOCIAL_LINK_CLASSES } from "@lib/constants";
2+
import { ICON_BUTTON_CLASSES, SOCIAL_LINK_CLASSES } from "@lib/constants";
33
44
export type SocialKind = "linkedin" | "github";
55
export type SocialVariant = "icon" | "text";
@@ -21,6 +21,7 @@ const { links, variant = "icon", className = "" } = Astro.props as Props;
2121
2222
const listBaseClass = "m-0 flex list-none flex-wrap items-center p-0";
2323
const listVariantClass = "gap-3";
24+
const iconVariantClass = `${ICON_BUTTON_CLASSES.base} ${ICON_BUTTON_CLASSES.elevated} h-[2.4rem] w-[2.4rem]`;
2425
2526
const iconPathByKind: Record<SocialKind, string> = {
2627
linkedin:
@@ -37,7 +38,7 @@ const iconPathByKind: Record<SocialKind, string> = {
3738
href={link.href}
3839
target="_blank"
3940
rel="noopener noreferrer"
40-
class={variant === "icon" ? SOCIAL_LINK_CLASSES.icon : SOCIAL_LINK_CLASSES.text}
41+
class={variant === "icon" ? iconVariantClass : SOCIAL_LINK_CLASSES.text}
4142
data-track={link.trackId}
4243
aria-label={variant === "icon" ? `Open ${link.label}` : undefined}
4344
title={link.label}

0 commit comments

Comments
 (0)