Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions morya-techcoder/app/(site)/blog/[slug]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,7 @@ export default async function BlogDetailPage({ params }: Props) {
className="object-cover"
sizes="(max-width: 768px) 100vw, 720px"
preload
fetchPriority="high"
/>
</div>
)}
Expand Down
11 changes: 6 additions & 5 deletions morya-techcoder/app/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -410,17 +410,18 @@
color: var(--tc-text);
}
.hero-title {
max-width: 58rem;
max-width: 60rem;
font-size: clamp(2.75rem, 4.7vw, 4.25rem);
font-weight: 800;
line-height: 0.98;
}
.hero-title-line {
display: block;
}
@media (max-width: 639px) {
.hero-title {
font-size: clamp(2.25rem, 10.5vw, 3rem);
}
.hero-title-line {
display: inline !important;
font-size: clamp(1.375rem, 7vw, 2.1rem);
line-height: 1.02;
}
}
.heading-xl {
Expand Down
35 changes: 25 additions & 10 deletions morya-techcoder/components/layout/Navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -189,15 +189,21 @@ export default function Navbar() {
</>
) : (
<>
<ThemeToggle />
<button
onClick={() => setMenuOpen(!menuOpen)}
className="press focus-ring flex items-center justify-center w-11 h-11 rounded-full border border-tc-border text-tc-text hover:border-tc-primary transition-colors duration-200"
aria-label="Toggle menu"
aria-expanded={menuOpen}
>
{menuOpen ? <X size={19} /> : <Menu size={19} />}
</button>
{!menuOpen && (
<>
<ThemeToggle />
<button
type="button"
onClick={() => setMenuOpen(true)}
className="press focus-ring flex items-center justify-center w-11 h-11 rounded-full border border-tc-border text-tc-text hover:border-tc-primary transition-colors duration-200"
aria-label="Open menu"
title="Open menu"
aria-expanded={false}
>
<Menu size={19} />
</button>
</>
)}
</>
)}
</div>
Expand All @@ -212,6 +218,15 @@ export default function Navbar() {
className="mobile-menu-enter lg:hidden fixed inset-0 top-0 z-40 bg-tc-bg/95"
onClick={() => setMenuOpen(false)}
>
<button
type="button"
onClick={() => setMenuOpen(false)}
aria-label="Close menu"
title="Close menu"
className="press focus-ring absolute top-3 right-3 z-10 flex h-11 w-11 items-center justify-center rounded-full border border-tc-border text-tc-text transition-colors duration-200 hover:border-tc-primary"
>
<X size={19} />
</button>
<nav className="flex flex-col gap-1.5 pt-24 px-5" onClick={(e) => e.stopPropagation()}>
{navLinks.map((link, i) => (
<div
Expand Down Expand Up @@ -240,7 +255,7 @@ export default function Navbar() {
className="btn-primary focus-ring mt-3 w-full py-4 text-base"
>
Join Newsletter
<ArrowUpRight size={17} />
<Mail size={19} />
</Link>
</div>
</nav>
Expand Down
52 changes: 27 additions & 25 deletions morya-techcoder/components/sections/HeroSection.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Link from "next/link";
import Image from "next/image";
import { ArrowRight, Sparkles, Compass, Star, TrendingUp } from "lucide-react";
import { ArrowRight, Compass, Star, TrendingUp } from "lucide-react";
import CategoryBadge from "@/components/ui/CategoryBadge";
import { CATEGORIES } from "@/lib/categories";
import { categoryIcon } from "@/lib/category-icons";
Expand All @@ -9,7 +9,7 @@ import TiltSurface from "@/components/ui/TiltSurface";
/* Representative headlines for the editorial preview — decorative, not live data. */
const previewFeature = {
category: "AI" as const,
title: "The AI models quietly reshaping how we work",
title: "The AI models reshaping how we work",
meta: "6 min read",
};

Expand All @@ -26,7 +26,7 @@ const previewItems = previewList.map((item) => ({

export default function HeroSection() {
return (
<section className="relative px-4 pb-10 pt-20 sm:px-6 sm:pb-20 sm:pt-36 md:pb-28 md:pt-44">
<section className="relative px-4 pb-10 pt-20 sm:px-6 sm:pb-20 sm:pt-28 md:pb-28 md:pt-36">
{/* Ambient mesh — clipped so glow doesn't spill; floats live outside this layer */}
<div className="absolute inset-0 -z-10 pointer-events-none overflow-hidden">
<div className="absolute top-0 left-1/2 h-[700px] w-[1100px] -translate-x-1/2 mesh-glow opacity-80" />
Expand All @@ -40,22 +40,22 @@ export default function HeroSection() {
</div>

<div className="container-wide mx-auto flex flex-col items-center text-center">
{/* Badge */}
<div className="hero-enter-fade" style={{ animationDelay: "80ms" }}>
<Link href="/blog" className="chip hero-badge focus-ring group">
<span className="flex items-center justify-center w-4 h-4 rounded-full bg-tc-primary text-white">
<Sparkles size={9} className="fill-current" />
</span>
<span className="relative">Trustworthy tech insights, every week</span>
<ArrowRight size={12} className="icon-nudge" />
</Link>
</div>
<p
aria-label="Technology, AI, and Reviews"
className="hero-enter-fade flex items-center gap-2 font-mono text-[10px] font-medium uppercase text-tc-primary sm:gap-2.5 sm:text-xs"
style={{ animationDelay: "80ms" }}
>
<span>Technology</span>
<span aria-hidden="true" className="text-tc-primary/50">--</span>
<span>AI</span>
<span aria-hidden="true" className="text-tc-primary/50">--</span>
<span>Reviews</span>
</p>

{/* Headline — no enter animation: this is the LCP element */}
<h1 className="display-xl hero-title mt-4 max-w-5xl sm:mt-7">
<span className="hero-title-line">Discover the </span>
<span className="hero-title-line">technology that&apos;s </span>
<span className="hero-title-line text-gradient">worth knowing.</span>
<h1 className="display-xl hero-title mt-5 w-full sm:mt-6">
<span className="hero-title-line">Discover the technology</span>
<span className="hero-title-line"><span className="text-tc-text-muted">that&apos;s </span><span className="text-gradient">worth knowing.</span></span>
</h1>

{/* Subtitle */}
Expand All @@ -68,22 +68,22 @@ export default function HeroSection() {
that actually matters.
</p> */}

<p className="hero-enter mt-4 max-w-2xl text-[16px] leading-relaxed text-tc-text-muted sm:mt-6 sm:text-lg"
<p className="hero-enter mt-5 max-w-[19rem] text-[14px] leading-[1.45] text-tc-text-muted sm:mt-6 sm:max-w-2xl sm:text-lg sm:leading-relaxed"
style={{ animationDelay: "240ms" }} >
Clear thinking on the technology shaping how we build, work, and live <span className="font-bold"> without the noise.</span>
</p>

{/* CTAs */}
<div
className="hero-enter mt-5 flex w-full flex-row items-center gap-2 sm:mt-9 sm:w-auto sm:gap-3"
className="hero-enter mt-6 flex w-full flex-row flex-wrap items-center justify-center gap-2 max-[359px]:flex-col sm:mt-8 sm:w-auto sm:gap-3"
style={{ animationDelay: "320ms" }}
>
<Link href="/blog" className="btn-primary hero-cta-primary focus-ring group flex-1 justify-center px-4 py-3.5 text-[13.5px] sm:flex-none sm:w-auto sm:px-7 sm:text-[15px]">
<Link href="/blog" className="btn-primary hero-cta-primary focus-ring group flex-none min-h-10 justify-center gap-1.5 px-3 py-2 text-[13px] max-[359px]:w-full sm:min-h-11 sm:w-auto sm:gap-2 sm:px-7 sm:py-3.5 sm:text-[15px]">
Start exploring
<ArrowRight size={16} className="icon-nudge" />
<ArrowRight size={14} className="icon-nudge sm:h-4 sm:w-4" />
</Link>
<Link href="/#topics" className="btn-secondary hero-cta-secondary focus-ring group flex-1 justify-center px-4 py-3.5 text-[13.5px] sm:flex-none sm:w-auto sm:px-7 sm:text-[15px]">
<Compass size={15} className="icon-lift" />
<Link href="/#topics" className="btn-secondary hero-cta-secondary focus-ring group flex-none min-h-10 justify-center gap-1.5 px-3 py-2 text-[13px] max-[359px]:w-full sm:min-h-11 sm:w-auto sm:gap-2 sm:px-7 sm:py-3.5 sm:text-[15px]">
<Compass size={14} className="icon-lift sm:h-[15px] sm:w-[15px]" />
Browse topics
</Link>
</div>
Expand All @@ -93,7 +93,7 @@ export default function HeroSection() {
<div
aria-hidden="true"
style={{ perspective: 1400, animationDelay: "400ms" }}
className="hero-browser-enter container-wide relative mx-auto mt-8 w-[calc(100%-1rem)] max-w-5xl sm:mt-16 sm:w-full md:mt-20"
className="hero-browser-enter container-wide relative mx-auto mt-8 w-[calc(100%-1rem)] max-w-5xl sm:mt-12 sm:w-full md:mt-16"
>
<div className="hero-browser-glow" aria-hidden="true" />
<TiltSurface
Expand All @@ -107,7 +107,7 @@ export default function HeroSection() {
<span className="w-3 h-3 rounded-full bg-[#FEBC2E]" />
<span className="w-3 h-3 rounded-full bg-[#28C840]" />
<span className="mx-auto flex items-center gap-1.5 rounded-md bg-tc-bg-elevated px-3 py-1 text-[11px] font-medium text-tc-text-light">
https://techcoder.tech
techcoder.tech
</span>
</div>

Expand All @@ -122,6 +122,8 @@ export default function HeroSection() {
fill
className="object-cover object-[center_20%]"
sizes="(max-width: 768px) 90vw, 420px"
loading="eager"
fetchPriority="high"
/>
<div className="absolute inset-0 bg-gradient-to-t from-black/60 via-black/10 to-transparent" />
<CategoryBadge
Expand Down
2 changes: 1 addition & 1 deletion morya-techcoder/components/sections/TopicGrid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export default function TopicGrid() {
Everything tech, <span className="text-tc-primary">worth understanding</span>
</h2>
<p className="body-base max-w-lg md:col-span-5 md:pt-2">
From code and AI to the gadgets on your desk — pick a topic and start exploring.
From code and AI to the gadgets on your desk, pick a topic and start exploring.
</p>
</div>
</div>
Expand Down
18 changes: 9 additions & 9 deletions morya-techcoder/components/ui/ArticleCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ function CategoryPill({ category, className }: { category: BlogPostSummary["cate
);
}

function Meta({ post, muted = false }: { post: BlogPostSummary; muted?: boolean }) {
function Meta({ post, muted = false, compact = false }: { post: BlogPostSummary; muted?: boolean; compact?: boolean }) {
return (
<div className={cn("flex items-center gap-2.5 text-[11.5px] font-medium", muted ? "text-tc-text-light" : "text-tc-text-muted")}>
<time dateTime={post.date}>{formatDate(post.date)}</time>
<span className="w-px h-3 bg-current opacity-30" />
<span className="flex items-center gap-1">
<div className={cn("flex items-center font-medium", compact ? "flex-nowrap gap-x-1.5 text-[10px] sm:gap-x-2.5 sm:text-[11.5px]" : "flex-wrap gap-x-2.5 gap-y-1 text-[11.5px]", muted ? "text-tc-text-light" : "text-tc-text-muted")}>
<time className="shrink-0 whitespace-nowrap" dateTime={post.date}>{formatDate(post.date)}</time>
<span className="hidden h-3 w-px bg-current opacity-30 sm:block" />
<span className="flex shrink-0 items-center gap-1 whitespace-nowrap">
<Clock size={11} />
{post.readingTime}
</span>
Expand Down Expand Up @@ -148,10 +148,10 @@ function HorizontalCard({ post, className, index }: { post: BlogPostSummary; cla
<article className={cn("group", className)}>
<Link
href={`/blog/${post.slug}`}
className="card-premium card-premium-flat focus-ring flex gap-4 py-5 px-4 sm:px-5 border-0 rounded-none shadow-none transition-colors duration-200 hover:bg-tc-bg-elevated/40"
className="card-premium card-premium-flat focus-ring flex gap-3 py-5 px-4 sm:gap-4 sm:px-5 border-0 rounded-none shadow-none transition-colors duration-200 hover:bg-tc-bg-elevated/40"
>
{/* Number stamp or image */}
<div className="card-premium-media relative flex-shrink-0 w-24 sm:w-28 aspect-[4/3] rounded-xl bg-tc-bg-elevated overflow-hidden">
<div className="card-premium-media relative flex-shrink-0 w-20 sm:w-28 aspect-[4/3] rounded-xl bg-tc-bg-elevated overflow-hidden">
{post.thumbnail ? (
<Image
src={post.thumbnail}
Expand All @@ -178,13 +178,13 @@ function HorizontalCard({ post, className, index }: { post: BlogPostSummary; cla
{post.title}
</h3>
<div className="mt-2">
<Meta post={post} muted />
<Meta post={post} muted compact />
</div>
</div>

<ArrowUpRight
size={16}
className="flex-shrink-0 self-center text-tc-text-light opacity-0 -translate-x-1 group-hover:opacity-100 group-hover:translate-x-0 transition-[opacity,transform] duration-[var(--tc-dur)]"
className="hidden flex-shrink-0 self-center text-tc-text-light opacity-0 -translate-x-1 transition-[opacity,transform] duration-[var(--tc-dur)] group-hover:opacity-100 group-hover:translate-x-0 sm:block"
/>
</Link>
</article>
Expand Down
1 change: 1 addition & 0 deletions morya-techcoder/components/ui/CardCarousel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,7 @@ export default function CardCarousel({
key={`${copy}-${post.id}-${i}`}
className={cn("shrink-0", cardWidth)}
aria-hidden={isDuplicateContent || undefined}
inert={isDuplicateContent || undefined}
>
<MagicBorderCard post={post} size={size} />
</div>
Expand Down
10 changes: 5 additions & 5 deletions morya-techcoder/components/ui/MagicBorderCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -110,16 +110,16 @@ export default function MagicBorderCard({ post, size = "default", className }: P
</p>
)}

<div className={cn("card-premium-meta flex items-center gap-2 border-t border-tc-border font-medium text-tc-text-light", isCompact ? "mt-1.5 pt-1.5 text-[9px] sm:mt-2 sm:pt-2 sm:text-[10px]" : "pt-2.5 mt-2.5 text-[11px]")}>
<time dateTime={post.date}>{formatDate(post.date)}</time>
<div className={cn("card-premium-meta flex flex-nowrap items-center gap-2 border-t border-tc-border font-medium text-tc-text-light", isCompact ? "mt-1.5 pt-1.5 text-[9px] sm:mt-2 sm:pt-2 sm:text-[10px]" : "pt-2.5 mt-2.5 text-[11px]")}>
<time className="shrink-0 whitespace-nowrap" dateTime={post.date}>{formatDate(post.date)}</time>
{!isCompact && (
<>
<span className="w-0.5 h-0.5 rounded-full bg-tc-text-light/60" />
<span className="flex items-center gap-1">
<span className="w-0.5 h-0.5 shrink-0 rounded-full bg-tc-text-light/60" />
<span className="flex shrink-0 items-center gap-1 whitespace-nowrap">
<Clock size={11} />
{post.readingTime}
</span>
<span className="ml-auto inline-flex items-center gap-1 text-tc-primary opacity-0 -translate-x-1 transition-[opacity,transform] duration-[var(--tc-dur)] group-hover:opacity-100 group-hover:translate-x-0">
<span className="ml-auto hidden items-center gap-1 text-tc-primary opacity-0 -translate-x-1 transition-[opacity,transform] duration-[var(--tc-dur)] group-hover:opacity-100 group-hover:translate-x-0 sm:inline-flex">
Read
<ArrowRight size={12} />
</span>
Expand Down
Loading
Loading