Similar navbar code applied to all existing pages

This commit is contained in:
Your Name committed 2025-04-28 02:02:46 +08:00
1 parent fcdaca9e8b
commit 1a4ae3a460
6 files changed
+381 -383

No files matched your search

+1 -1
View File
@@ -52,7 +52,7 @@
</nav> </nav>
<main class="py-4 pb-16"> <main class="py-4 pb-16">
<div class="max-w-xl mx-auto px-4 mt-8"> <div class="max-w-screen-lg mx-auto px-4 mt-8">
<div class="bg-rules-bg p-4 rounded mb-4 text-primary"> <div class="bg-rules-bg p-4 rounded mb-4 text-primary">
<p><strong>Quick Tips:</strong> Keep it brief, keep it real. Share your desk moments, finds, or frustrations. Upvote what resonates!</p> <p><strong>Quick Tips:</strong> Keep it brief, keep it real. Share your desk moments, finds, or frustrations. Upvote what resonates!</p>
</div> </div>
+7 -6
View File
@@ -8,14 +8,14 @@
</head> </head>
<body class="font-sans text-text-default pt-navbar-height"> <body class="font-sans text-text-default pt-navbar-height">
<nav class="fixed top-0 left-0 right-0 bg-navbar-bg border-b border-navbar-border z-10" role="navigation" aria-label="main navigation"> <nav class="fixed top-0 left-0 right-0 bg-navbar-bg border-b border-navbar-border z-10" role="navigation" aria-label="main navigation">
<div class="container mx-auto px-4"> <div class="max-w-screen-lg mx-auto px-4">
<div class="flex justify-between items-center"> <div class="flex justify-between">
<div class="flex items-center"> <div class="flex">
<a class="py-4 px-3 font-bold text-primary" href="/"> <a class="py-4 px-3 font-bold text-primary" href="/">
Behind the Desk Behind the Desk
</a> </a>
<div class="hidden md:flex"> <div class="hidden md:flex">
<a class="py-4 px-3 text-primary hover:bg-opacity-5 hover:bg-primary" href="/">top 🔥</a> <a class="py-4 px-3 text-primary hover:bg-opacity-5 hover:bg-primary font-semibold" href="#">top 🔥</a>
<a class="py-4 px-3 text-primary hover:bg-opacity-5 hover:bg-primary" href="#">new</a> <a class="py-4 px-3 text-primary hover:bg-opacity-5 hover:bg-primary" href="#">new</a>
<a class="py-4 px-3 text-primary hover:bg-opacity-5 hover:bg-primary" href="#">nearby</a> <a class="py-4 px-3 text-primary hover:bg-opacity-5 hover:bg-primary" href="#">nearby</a>
<a class="py-4 px-3 text-primary hover:bg-opacity-5 hover:bg-primary" href="#">past</a> <a class="py-4 px-3 text-primary hover:bg-opacity-5 hover:bg-primary" href="#">past</a>
@@ -29,6 +29,7 @@
<a href="/login.html" class="text-primary hover:bg-opacity-5 hover:bg-primary">login</a> <a href="/login.html" class="text-primary hover:bg-opacity-5 hover:bg-primary">login</a>
</div> </div>
</div> </div>
<!-- Mobile menu button -->
<div class="md:hidden flex items-center"> <div class="md:hidden flex items-center">
<button id="menuButton" class="text-primary p-3" aria-label="menu" aria-expanded="false"> <button id="menuButton" class="text-primary p-3" aria-label="menu" aria-expanded="false">
<svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
@@ -37,8 +38,9 @@
</button> </button>
</div> </div>
</div> </div>
<!-- Mobile Menu -->
<div id="mobileMenu" class="hidden md:hidden"> <div id="mobileMenu" class="hidden md:hidden">
<a class="block py-2 px-3 text-primary hover:bg-opacity-5 hover:bg-primary" href="/">top 🔥</a> <a class="block py-2 px-3 text-primary hover:bg-opacity-5 hover:bg-primary font-semibold" href="#">top 🔥</a>
<a class="block py-2 px-3 text-primary hover:bg-opacity-5 hover:bg-primary" href="#">new</a> <a class="block py-2 px-3 text-primary hover:bg-opacity-5 hover:bg-primary" href="#">new</a>
<a class="block py-2 px-3 text-primary hover:bg-opacity-5 hover:bg-primary" href="#">nearby</a> <a class="block py-2 px-3 text-primary hover:bg-opacity-5 hover:bg-primary" href="#">nearby</a>
<a class="block py-2 px-3 text-primary hover:bg-opacity-5 hover:bg-primary" href="#">past</a> <a class="block py-2 px-3 text-primary hover:bg-opacity-5 hover:bg-primary" href="#">past</a>
@@ -48,7 +50,6 @@
</div> </div>
</div> </div>
</nav> </nav>
<main class="py-4 pb-16"> <main class="py-4 pb-16">
<div class="max-w-md mx-auto px-4 mt-8"> <div class="max-w-md mx-auto px-4 mt-8">
-1
View File
@@ -50,7 +50,6 @@
</div> </div>
</div> </div>
</nav> </nav>
<main class="py-4 pb-16"> <main class="py-4 pb-16">
<div class="max-w-xl mx-auto px-4 mt-8"> <div class="max-w-xl mx-auto px-4 mt-8">
<!-- Filter Container --> <!-- Filter Container -->
+211 -207
View File
@@ -7,257 +7,262 @@
<link href="/src/styles.css" rel="stylesheet"> <link href="/src/styles.css" rel="stylesheet">
</head> </head>
<body class="font-sans text-text-default pt-navbar-height"> <body class="font-sans text-text-default pt-navbar-height">
<nav class="fixed top-0 left-0 right-0 bg-navbar-bg border-b border-navbar-border z-10" role="navigation" aria-label="main navigation"> <nav class="fixed top-0 left-0 right-0 bg-navbar-bg border-b border-navbar-border z-10" role="navigation" aria-label="main navigation">
<div class="max-w-screen-lg mx-auto px-4"> <div class="max-w-screen-lg mx-auto px-4">
<div class="flex justify-between"> <div class="flex justify-between">
<div class="flex"> <div class="flex">
<a class="py-4 px-3 font-bold text-primary" href="/">Behind the Desk</a> <a class="py-4 px-3 font-bold text-primary" href="/">
<div class="hidden md:flex"> Behind the Desk
<a class="py-4 px-3 text-primary hover:bg-opacity-5 hover:bg-primary" href="/">top 🔥</a> </a>
<a class="py-4 px-3 text-primary hover:bg-opacity-5 hover:bg-primary" href="#">new</a> <div class="hidden md:flex">
<a class="py-4 px-3 text-primary hover:bg-opacity-5 hover:bg-primary" href="#">nearby</a> <a class="py-4 px-3 text-primary hover:bg-opacity-5 hover:bg-primary font-semibold" href="#">top 🔥</a>
<a class="py-4 px-3 text-primary hover:bg-opacity-5 hover:bg-primary" href="#">past</a> <a class="py-4 px-3 text-primary hover:bg-opacity-5 hover:bg-primary" href="#">new</a>
<a class="py-4 px-3 text-primary hover:bg-opacity-5 hover:bg-primary" href="#">ask</a> <a class="py-4 px-3 text-primary hover:bg-opacity-5 hover:bg-primary" href="#">nearby</a>
<a class="py-4 px-3 text-primary hover:bg-opacity-5 hover:bg-primary" href="#">show</a> <a class="py-4 px-3 text-primary hover:bg-opacity-5 hover:bg-primary" href="#">past</a>
<a class="py-4 px-3 text-primary hover:bg-opacity-5 hover:bg-primary" href="#">submit</a> <a class="py-4 px-3 text-primary hover:bg-opacity-5 hover:bg-primary" href="#">ask</a>
<a class="py-4 px-3 text-primary hover:bg-opacity-5 hover:bg-primary" href="#">show</a>
<a class="py-4 px-3 text-primary hover:bg-opacity-5 hover:bg-primary" href="#">submit</a>
</div>
</div>
<div class="flex items-center">
<div class="py-4 px-3">
<a href="/login.html" class="text-primary hover:bg-opacity-5 hover:bg-primary">login</a>
</div>
</div>
<!-- Mobile menu button -->
<div class="md:hidden flex items-center">
<button id="menuButton" class="text-primary p-3" aria-label="menu" aria-expanded="false">
<svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 12h16M4 18h16"></path>
</svg>
</button>
</div> </div>
</div> </div>
<div class="flex items-center"> <!-- Mobile Menu -->
<div class="py-4 px-3"> <div id="mobileMenu" class="hidden md:hidden">
<a href="/login.html" class="text-primary hover:bg-opacity-5 hover:bg-primary">login</a> <a class="block py-2 px-3 text-primary hover:bg-opacity-5 hover:bg-primary font-semibold" href="#">top 🔥</a>
</div> <a class="block py-2 px-3 text-primary hover:bg-opacity-5 hover:bg-primary" href="#">new</a>
</div> <a class="block py-2 px-3 text-primary hover:bg-opacity-5 hover:bg-primary" href="#">nearby</a>
<div class="md:hidden flex items-center"> <a class="block py-2 px-3 text-primary hover:bg-opacity-5 hover:bg-primary" href="#">past</a>
<button id="menuButton" class="text-primary p-3" aria-label="menu" aria-expanded="false"> <a class="block py-2 px-3 text-primary hover:bg-opacity-5 hover:bg-primary" href="#">ask</a>
<svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <a class="block py-2 px-3 text-primary hover:bg-opacity-5 hover:bg-primary" href="#">show</a>
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 12h16M4 18h16"></path> <a class="block py-2 px-3 text-primary hover:bg-opacity-5 hover:bg-primary" href="#">submit</a>
</svg>
</button>
</div> </div>
</div> </div>
<div id="mobileMenu" class="hidden md:hidden"> </nav>
<a class="block py-2 px-3 text-primary hover:bg-opacity-5 hover:bg-primary" href="/">top 🔥</a>
<a class="block py-2 px-3 text-primary hover:bg-opacity-5 hover:bg-primary" href="#">new</a>
<a class="block py-2 px-3 text-primary hover:bg-opacity-5 hover:bg-primary" href="#">nearby</a>
<a class="block py-2 px-3 text-primary hover:bg-opacity-5 hover:bg-primary" href="#">past</a>
<a class="block py-2 px-3 text-primary hover:bg-opacity-5 hover:bg-primary" href="#">ask</a>
<a class="block py-2 px-3 text-primary hover:bg-opacity-5 hover:bg-primary" href="#">show</a>
<a class="block py-2 px-3 text-primary hover:bg-opacity-5 hover:bg-primary" href="#">submit</a>
</div>
</div>
</nav>
<main class="py-4 pb-16"> <main class="py-4 pb-16">
<div class="max-w-xl mx-auto px-4 mt-8"> <div class="max-w-xl mx-auto px-4 mt-8">
<article class="flex"> <article class="flex">
<div class="mr-2"> <div class="mr-2">
<a href="#" class="text-text-muted no-underline text-sm leading-none inline-block pt-0.5 hover:text-link-hover" title="Upvote">▲</a> <a href="#" class="text-text-muted no-underline text-sm leading-none inline-block pt-0.5 hover:text-link-hover" title="Upvote">▲</a>
</div>
<div class="flex-1 text-left">
<div>
<p>
<strong><a href="#" class="text-text-title font-normal text-base hover:underline">[Ask] The saga of the disappearing ergonomic chair continues. ✏️</a></strong>
</p>
<!-- Post title header -->
<div class="mt-0.5 mb-2 text-sm">
<small class="text-text-muted ml-2 text-base">@deskdetective</small>
<small class="text-text-muted ml-2 text-base">1h ago</small>
<a href="#" class="ml-2 text-sm text-primary hover:underline">report</a>
<a href="#" class="ml-2 text-sm text-primary hover:underline">next</a>
</div>
<p>
Every time I leave my desk, it seems to vanish. Suspecting foul play at this point. Anyone else faced something like this?
</p>
</div> </div>
</div> <div class="flex-1 text-left">
</article>
<div class="mt-8">
<form>
<div class="mb-4">
<label class="block font-medium text-sm mb-1" for="comment-body">Comment:</label>
<div> <div>
<textarea class="w-full px-3 py-2 bg-bg-light border border-gray-300 rounded" id="comment-body" name="body" placeholder="Enter your comment" required></textarea> <p>
<strong><a href="#" class="text-text-title font-normal text-base hover:underline">[Ask] The saga of the disappearing ergonomic chair continues. ✏️</a></strong>
</p>
<!-- Post title header -->
<div class="mt-0.5 mb-2 text-sm">
<small class="text-text-muted ml-2 text-base">@deskdetective</small>
<small class="text-text-muted ml-2 text-base">1h ago</small>
<a href="#" class="ml-2 text-sm text-primary hover:underline">report</a>
<a href="#" class="ml-2 text-sm text-primary hover:underline">next</a>
</div>
<p>
Every time I leave my desk, it seems to vanish. Suspecting foul play at this point. Anyone else faced something like this?
</p>
</div> </div>
</div> </div>
<div> </article>
<button class="px-4 py-2 bg-primary text-white rounded hover:bg-primary-dark" type="submit">Add Comment</button>
</div>
</form>
<h3 class="mt-4 text-lg font-medium">Comments</h3> <div class="mt-8">
<form>
<div class="mt-4"> <div class="mb-4">
<!-- Main Comment --> <label class="block font-medium text-sm mb-1" for="comment-body">Comment:</label>
<div class="mt-6 px-0 text-sm"> <div>
<div class="mb-1"> <textarea class="w-full px-3 py-2 bg-bg-light border border-gray-300 rounded" id="comment-body" name="body" placeholder="Enter your comment" required></textarea>
<a href="#" class="text-text-muted no-underline text-sm leading-none inline-block pt-0.5 hover:text-link-hover">▲</a> </div>
<small class="text-text-muted ml-2 text-sm">@commenter1</small>
<small class="text-text-muted ml-2 text-sm">2h ago</small>
<a href="#" class="ml-2 text-xs text-primary hover:underline">parent</a>
<a href="#" class="ml-2 text-xs text-primary hover:underline">next</a>
<small class="underline text-xs cursor-pointer ml-2 inline-block">reply</small>
</div> </div>
<div> <div>
<p class="mb-2">Haha, this totally happened to me last year. We had a phantom chair thief at work and it became an ongoing office joke for months!</p> <button class="px-4 py-2 bg-primary text-white rounded hover:bg-primary-dark" type="submit">Add Comment</button>
</div> </div>
</form>
<!-- Nested Comment --> <h3 class="mt-4 text-lg font-medium">Comments</h3>
<div class="ml-6 mt-4 border-l-2 border-gray-200 pl-4 text-sm">
<div class="mt-4">
<!-- Main Comment -->
<div class="mt-6 px-0 text-sm">
<div class="mb-1"> <div class="mb-1">
<a href="#" class="text-text-muted no-underline text-sm leading-none inline-block pt-0.5 hover:text-link-hover">▲</a> <a href="#" class="text-text-muted no-underline text-sm leading-none inline-block pt-0.5 hover:text-link-hover">▲</a>
<small class="text-text-muted ml-2 text-sm">@nestedcommenter1</small> <small class="text-text-muted ml-2 text-sm">@commenter1</small>
<small class="text-text-muted ml-2 text-sm">1h ago</small> <small class="text-text-muted ml-2 text-sm">2h ago</small>
<a href="#" class="ml-2 text-xs text-primary hover:underline">parent</a> <a href="#" class="ml-2 text-xs text-primary hover:underline">parent</a>
<a href="#" class="ml-2 text-xs text-primary hover:underline">next</a> <a href="#" class="ml-2 text-xs text-primary hover:underline">next</a>
<small class="underline text-xs cursor-pointer ml-2 inline-block">reply</small> <small class="underline text-xs cursor-pointer ml-2 inline-block">reply</small>
</div> </div>
<div> <div>
<p class="mb-2">Did they ever catch who it was? 😂 I'd totally set up a hidden camera if it kept happening that much.</p> <p class="mb-2">Haha, this totally happened to me last year. We had a phantom chair thief at work and it became an ongoing office joke for months!</p>
</div> </div>
<!-- Reply Box --> <!-- Nested Comment -->
<div class="ml-8 mt-4">
<textarea class="w-full px-3 py-2 bg-bg-light border border-gray-300 rounded text-sm mb-2" placeholder="Reply to this comment..."></textarea>
<button class="px-3 py-1 text-xs bg-primary text-white rounded hover:bg-primary-dark">Reply</button>
</div>
</div>
</div>
<!-- Another Comment -->
<div class="mt-6 px-0 text-sm">
<div class="mb-1">
<a href="#" class="text-text-muted no-underline text-sm leading-none inline-block pt-0.5 hover:text-link-hover">▲</a>
<small class="text-text-muted ml-2 text-sm">@commenter2</small>
<small class="text-text-muted ml-2 text-sm">3h ago</small>
<a href="#" class="ml-2 text-xs text-primary hover:underline">parent</a>
<a href="#" class="ml-2 text-xs text-primary hover:underline">next</a>
<small class="underline text-xs cursor-pointer ml-2 inline-block">reply</small>
</div>
<div>
<p class="mb-2">At my old job, chairs were so bad people would "borrow" a good one whenever someone went on vacation. A real survival of the fittest situation!</p>
</div>
</div>
<!-- Third Comment -->
<div class="mt-6 px-0 text-sm">
<div class="mb-1">
<a href="#" class="text-text-muted no-underline text-sm leading-none inline-block pt-0.5 hover:text-link-hover">▲</a>
<small class="text-text-muted ml-2 text-sm">@commenter3</small>
<small class="text-text-muted ml-2 text-sm">5h ago</small>
<a href="#" class="ml-2 text-xs text-primary hover:underline">parent</a>
<a href="#" class="ml-2 text-xs text-primary hover:underline">next</a>
<small class="underline text-xs cursor-pointer ml-2 inline-block">reply</small>
</div>
<div>
<p class="mb-2">I recommend putting a bright sticker with your name on the chair. Makes it harder for people to pretend they didn't know it wasn't theirs.</p>
</div>
</div>
<!-- Main Comment with Deeply Nested Replies -->
<div class="mt-6 px-0 text-sm">
<div class="mb-1">
<a href="#" class="text-text-muted no-underline text-sm leading-none inline-block pt-0.5 hover:text-link-hover">▲</a>
<small class="text-text-muted ml-2 text-sm">@commenter1</small>
<small class="text-text-muted ml-2 text-sm">2h ago</small>
<a href="#" class="ml-2 text-xs text-primary hover:underline">parent</a>
<a href="#" class="ml-2 text-xs text-primary hover:underline">next</a>
<small class="underline text-xs cursor-pointer ml-2 inline-block">reply</small>
</div>
<div>
<p class="mb-2">Haha, this totally happened to me last year. It was hilarious and annoying at the same time.</p>
</div>
<!-- Level 1 Nested Comment -->
<div class="ml-6 mt-4 border-l-2 border-gray-200 pl-4 text-sm">
<div class="mb-1">
<a href="#" class="text-text-muted no-underline text-sm leading-none inline-block pt-0.5 hover:text-link-hover">▲</a>
<small class="text-text-muted ml-2 text-sm">@nested1</small>
<small class="text-text-muted ml-2 text-sm">1h 50m ago</small>
<a href="#" class="ml-2 text-xs text-primary hover:underline">parent</a>
<a href="#" class="ml-2 text-xs text-primary hover:underline">next</a>
<small class="underline text-xs cursor-pointer ml-2 inline-block">reply</small>
</div>
<div>
<p class="mb-2">Honestly, office pranks can either build great vibes or cause chaos if not handled well 😂</p>
</div>
<!-- Level 2 Nested Comment -->
<div class="ml-6 mt-4 border-l-2 border-gray-200 pl-4 text-sm"> <div class="ml-6 mt-4 border-l-2 border-gray-200 pl-4 text-sm">
<div class="mb-1"> <div class="mb-1">
<a href="#" class="text-text-muted no-underline text-sm leading-none inline-block pt-0.5 hover:text-link-hover">▲</a> <a href="#" class="text-text-muted no-underline text-sm leading-none inline-block pt-0.5 hover:text-link-hover">▲</a>
<small class="text-text-muted ml-2 text-sm">@nested2</small> <small class="text-text-muted ml-2 text-sm">@nestedcommenter1</small>
<small class="text-text-muted ml-2 text-sm">1h 40m ago</small> <small class="text-text-muted ml-2 text-sm">1h ago</small>
<a href="#" class="ml-2 text-xs text-primary hover:underline">parent</a> <a href="#" class="ml-2 text-xs text-primary hover:underline">parent</a>
<a href="#" class="ml-2 text-xs text-primary hover:underline">next</a> <a href="#" class="ml-2 text-xs text-primary hover:underline">next</a>
<small class="underline text-xs cursor-pointer ml-2 inline-block">reply</small> <small class="underline text-xs cursor-pointer ml-2 inline-block">reply</small>
</div> </div>
<div> <div>
<p class="mb-2">Yeah, in our team it turned into an inside joke that lasted months. No HR complaints thankfully!</p> <p class="mb-2">Did they ever catch who it was? 😂 I'd totally set up a hidden camera if it kept happening that much.</p>
</div> </div>
<!-- Level 3 Nested Comment --> <!-- Reply Box -->
<div class="ml-8 mt-4">
<textarea class="w-full px-3 py-2 bg-bg-light border border-gray-300 rounded text-sm mb-2" placeholder="Reply to this comment..."></textarea>
<button class="px-3 py-1 text-xs bg-primary text-white rounded hover:bg-primary-dark">Reply</button>
</div>
</div>
</div>
<!-- Another Comment -->
<div class="mt-6 px-0 text-sm">
<div class="mb-1">
<a href="#" class="text-text-muted no-underline text-sm leading-none inline-block pt-0.5 hover:text-link-hover">▲</a>
<small class="text-text-muted ml-2 text-sm">@commenter2</small>
<small class="text-text-muted ml-2 text-sm">3h ago</small>
<a href="#" class="ml-2 text-xs text-primary hover:underline">parent</a>
<a href="#" class="ml-2 text-xs text-primary hover:underline">next</a>
<small class="underline text-xs cursor-pointer ml-2 inline-block">reply</small>
</div>
<div>
<p class="mb-2">At my old job, chairs were so bad people would "borrow" a good one whenever someone went on vacation. A real survival of the fittest situation!</p>
</div>
</div>
<!-- Third Comment -->
<div class="mt-6 px-0 text-sm">
<div class="mb-1">
<a href="#" class="text-text-muted no-underline text-sm leading-none inline-block pt-0.5 hover:text-link-hover">▲</a>
<small class="text-text-muted ml-2 text-sm">@commenter3</small>
<small class="text-text-muted ml-2 text-sm">5h ago</small>
<a href="#" class="ml-2 text-xs text-primary hover:underline">parent</a>
<a href="#" class="ml-2 text-xs text-primary hover:underline">next</a>
<small class="underline text-xs cursor-pointer ml-2 inline-block">reply</small>
</div>
<div>
<p class="mb-2">I recommend putting a bright sticker with your name on the chair. Makes it harder for people to pretend they didn't know it wasn't theirs.</p>
</div>
</div>
<!-- Main Comment with Deeply Nested Replies -->
<div class="mt-6 px-0 text-sm">
<div class="mb-1">
<a href="#" class="text-text-muted no-underline text-sm leading-none inline-block pt-0.5 hover:text-link-hover">▲</a>
<small class="text-text-muted ml-2 text-sm">@commenter1</small>
<small class="text-text-muted ml-2 text-sm">2h ago</small>
<a href="#" class="ml-2 text-xs text-primary hover:underline">parent</a>
<a href="#" class="ml-2 text-xs text-primary hover:underline">next</a>
<small class="underline text-xs cursor-pointer ml-2 inline-block">reply</small>
</div>
<div>
<p class="mb-2">Haha, this totally happened to me last year. It was hilarious and annoying at the same time.</p>
</div>
<!-- Level 1 Nested Comment -->
<div class="ml-6 mt-4 border-l-2 border-gray-200 pl-4 text-sm">
<div class="mb-1">
<a href="#" class="text-text-muted no-underline text-sm leading-none inline-block pt-0.5 hover:text-link-hover">▲</a>
<small class="text-text-muted ml-2 text-sm">@nested1</small>
<small class="text-text-muted ml-2 text-sm">1h 50m ago</small>
<a href="#" class="ml-2 text-xs text-primary hover:underline">parent</a>
<a href="#" class="ml-2 text-xs text-primary hover:underline">next</a>
<small class="underline text-xs cursor-pointer ml-2 inline-block">reply</small>
</div>
<div>
<p class="mb-2">Honestly, office pranks can either build great vibes or cause chaos if not handled well 😂</p>
</div>
<!-- Level 2 Nested Comment -->
<div class="ml-6 mt-4 border-l-2 border-gray-200 pl-4 text-sm"> <div class="ml-6 mt-4 border-l-2 border-gray-200 pl-4 text-sm">
<div class="mb-1"> <div class="mb-1">
<a href="#" class="text-text-muted no-underline text-sm leading-none inline-block pt-0.5 hover:text-link-hover">▲</a> <a href="#" class="text-text-muted no-underline text-sm leading-none inline-block pt-0.5 hover:text-link-hover">▲</a>
<small class="text-text-muted ml-2 text-sm">@nested3</small> <small class="text-text-muted ml-2 text-sm">@nested2</small>
<small class="text-text-muted ml-2 text-sm">1h 30m ago</small> <small class="text-text-muted ml-2 text-sm">1h 40m ago</small>
<a href="#" class="ml-2 text-xs text-primary hover:underline">parent</a> <a href="#" class="ml-2 text-xs text-primary hover:underline">parent</a>
<a href="#" class="ml-2 text-xs text-primary hover:underline">next</a> <a href="#" class="ml-2 text-xs text-primary hover:underline">next</a>
<small class="underline text-xs cursor-pointer ml-2 inline-block">reply</small> <small class="underline text-xs cursor-pointer ml-2 inline-block">reply</small>
</div> </div>
<div> <div>
<p class="mb-2">Ours got so bad management had to install chair locks (yes, seriously!).</p> <p class="mb-2">Yeah, in our team it turned into an inside joke that lasted months. No HR complaints thankfully!</p>
</div> </div>
<!-- Reply Box --> <!-- Level 3 Nested Comment -->
<div class="ml-8 mt-4">
<textarea class="w-full px-3 py-2 bg-bg-light border border-gray-300 rounded text-sm mb-2" placeholder="Reply to this comment..."></textarea>
<button class="px-3 py-1 text-xs bg-primary text-white rounded hover:bg-primary-dark">Reply</button>
</div>
<!-- Level 4 Nested Comment -->
<div class="ml-6 mt-4 border-l-2 border-gray-200 pl-4 text-sm"> <div class="ml-6 mt-4 border-l-2 border-gray-200 pl-4 text-sm">
<div class="mb-1"> <div class="mb-1">
<a href="#" class="text-text-muted no-underline text-sm leading-none inline-block pt-0.5 hover:text-link-hover">▲</a> <a href="#" class="text-text-muted no-underline text-sm leading-none inline-block pt-0.5 hover:text-link-hover">▲</a>
<small class="text-text-muted ml-2 text-sm">@nested4</small> <small class="text-text-muted ml-2 text-sm">@nested3</small>
<small class="text-text-muted ml-2 text-sm">1h 20m ago</small> <small class="text-text-muted ml-2 text-sm">1h 30m ago</small>
<a href="#" class="ml-2 text-xs text-primary hover:underline">parent</a> <a href="#" class="ml-2 text-xs text-primary hover:underline">parent</a>
<a href="#" class="ml-2 text-xs text-primary hover:underline">next</a> <a href="#" class="ml-2 text-xs text-primary hover:underline">next</a>
<small class="underline text-xs cursor-pointer ml-2 inline-block">reply</small> <small class="underline text-xs cursor-pointer ml-2 inline-block">reply</small>
</div> </div>
<div> <div>
<p class="mb-2">😂 Chair locks?! That's next level commitment to stopping thefts.</p> <p class="mb-2">Ours got so bad management had to install chair locks (yes, seriously!).</p>
</div> </div>
<!-- Level 5 Nested Comment --> <!-- Reply Box -->
<div class="ml-8 mt-4">
<textarea class="w-full px-3 py-2 bg-bg-light border border-gray-300 rounded text-sm mb-2" placeholder="Reply to this comment..."></textarea>
<button class="px-3 py-1 text-xs bg-primary text-white rounded hover:bg-primary-dark">Reply</button>
</div>
<!-- Level 4 Nested Comment -->
<div class="ml-6 mt-4 border-l-2 border-gray-200 pl-4 text-sm"> <div class="ml-6 mt-4 border-l-2 border-gray-200 pl-4 text-sm">
<div class="mb-1"> <div class="mb-1">
<a href="#" class="text-text-muted no-underline text-sm leading-none inline-block pt-0.5 hover:text-link-hover">▲</a> <a href="#" class="text-text-muted no-underline text-sm leading-none inline-block pt-0.5 hover:text-link-hover">▲</a>
<small class="text-text-muted ml-2 text-sm">@nested5</small> <small class="text-text-muted ml-2 text-sm">@nested4</small>
<small class="text-text-muted ml-2 text-sm">1h 10m ago</small> <small class="text-text-muted ml-2 text-sm">1h 20m ago</small>
<a href="#" class="ml-2 text-xs text-primary hover:underline">parent</a> <a href="#" class="ml-2 text-xs text-primary hover:underline">parent</a>
<a href="#" class="ml-2 text-xs text-primary hover:underline">next</a> <a href="#" class="ml-2 text-xs text-primary hover:underline">next</a>
<small class="underline text-xs cursor-pointer ml-2 inline-block">reply</small> <small class="underline text-xs cursor-pointer ml-2 inline-block">reply</small>
</div> </div>
<div> <div>
<p class="mb-2">I would LOVE to see the memo that went out announcing chair locks to employees 😆</p> <p class="mb-2">😂 Chair locks?! That's next level commitment to stopping thefts.</p>
</div> </div>
<!-- Level 6 Nested Comment --> <!-- Level 5 Nested Comment -->
<div class="ml-6 mt-4 border-l-2 border-gray-200 pl-4 text-sm"> <div class="ml-6 mt-4 border-l-2 border-gray-200 pl-4 text-sm">
<div class="mb-1"> <div class="mb-1">
<a href="#" class="text-text-muted no-underline text-sm leading-none inline-block pt-0.5 hover:text-link-hover">▲</a> <a href="#" class="text-text-muted no-underline text-sm leading-none inline-block pt-0.5 hover:text-link-hover">▲</a>
<small class="text-text-muted ml-2 text-sm">@nested6</small> <small class="text-text-muted ml-2 text-sm">@nested5</small>
<small class="text-text-muted ml-2 text-sm">1h 5m ago</small> <small class="text-text-muted ml-2 text-sm">1h 10m ago</small>
<a href="#" class="ml-2 text-xs text-primary hover:underline">parent</a> <a href="#" class="ml-2 text-xs text-primary hover:underline">parent</a>
<a href="#" class="ml-2 text-xs text-primary hover:underline">next</a> <a href="#" class="ml-2 text-xs text-primary hover:underline">next</a>
<small class="underline text-xs cursor-pointer ml-2 inline-block">reply</small> <small class="underline text-xs cursor-pointer ml-2 inline-block">reply</small>
</div> </div>
<div> <div>
<p class="mb-2">Imagine coming into work one day and finding your chair padlocked to the floor 😅</p> <p class="mb-2">I would LOVE to see the memo that went out announcing chair locks to employees 😆</p>
</div>
<!-- Level 6 Nested Comment -->
<div class="ml-6 mt-4 border-l-2 border-gray-200 pl-4 text-sm">
<div class="mb-1">
<a href="#" class="text-text-muted no-underline text-sm leading-none inline-block pt-0.5 hover:text-link-hover">▲</a>
<small class="text-text-muted ml-2 text-sm">@nested6</small>
<small class="text-text-muted ml-2 text-sm">1h 5m ago</small>
<a href="#" class="ml-2 text-xs text-primary hover:underline">parent</a>
<a href="#" class="ml-2 text-xs text-primary hover:underline">next</a>
<small class="underline text-xs cursor-pointer ml-2 inline-block">reply</small>
</div>
<div>
<p class="mb-2">Imagine coming into work one day and finding your chair padlocked to the floor 😅</p>
</div>
</div> </div>
</div> </div>
</div> </div>
@@ -268,37 +273,36 @@
</div> </div>
</div> </div>
</div> </div>
</div> </main>
</main>
<footer class="bg-gray-200 py-8 px-6 text-text-muted"> <footer class="bg-gray-200 py-8 px-6 text-text-muted">
<div class="text-center"> <div class="text-center">
<p> <p>
Seen something today? Don't let it go to waste. <a href="#" class="text-primary hover:underline">Submit it</a>. Seen something today? Don't let it go to waste. <a href="#" class="text-primary hover:underline">Submit it</a>.
</p> </p>
<div class="mt-4 text-sm"> <div class="mt-4 text-sm">
<a href="#" class="text-text-muted mx-2 no-underline hover:underline">Guidelines</a> | <a href="#" class="text-text-muted mx-2 no-underline hover:underline">Guidelines</a> |
<a href="#" class="text-text-muted mx-2 no-underline hover:underline">Tips</a> | <a href="#" class="text-text-muted mx-2 no-underline hover:underline">Tips</a> |
<a href="#" class="text-text-muted mx-2 no-underline hover:underline">Privacy</a> | <a href="#" class="text-text-muted mx-2 no-underline hover:underline">Privacy</a> |
<a href="#" class="text-text-muted mx-2 no-underline hover:underline">DMCA</a> <a href="#" class="text-text-muted mx-2 no-underline hover:underline">DMCA</a>
</div>
<div class="mt-4 text-center">
<input type="text" placeholder="Search..." class="px-3 py-2 border border-gray-300 rounded w-48">
</div>
</div> </div>
<div class="mt-4 text-center"> </footer>
<input type="text" placeholder="Search..." class="px-3 py-2 border border-gray-300 rounded w-48">
</div>
</div>
</footer>
<script> <script>
document.addEventListener('DOMContentLoaded', () => { document.addEventListener('DOMContentLoaded', () => {
const menuButton = document.getElementById('menuButton'); const menuButton = document.getElementById('menuButton');
const mobileMenu = document.getElementById('mobileMenu'); const mobileMenu = document.getElementById('mobileMenu');
menuButton.addEventListener('click', () => { menuButton.addEventListener('click', () => {
mobileMenu.classList.toggle('hidden'); mobileMenu.classList.toggle('hidden');
const expanded = menuButton.getAttribute('aria-expanded') === 'true'; const expanded = menuButton.getAttribute('aria-expanded') === 'true';
menuButton.setAttribute('aria-expanded', !expanded); menuButton.setAttribute('aria-expanded', !expanded);
});
}); });
}); </script>
</script>
</body> </body>
</html> </html>
+84 -82
View File
@@ -7,97 +7,99 @@
<link href="/src/styles.css" rel="stylesheet"> <link href="/src/styles.css" rel="stylesheet">
</head> </head>
<body class="font-sans text-text-default pt-navbar-height"> <body class="font-sans text-text-default pt-navbar-height">
<nav class="fixed top-0 left-0 right-0 bg-navbar-bg border-b border-navbar-border z-10" role="navigation" aria-label="main navigation"> <nav class="fixed top-0 left-0 right-0 bg-navbar-bg border-b border-navbar-border z-10" role="navigation" aria-label="main navigation">
<div class="max-w-screen-lg mx-auto px-4"> <div class="max-w-screen-lg mx-auto px-4">
<div class="flex justify-between"> <div class="flex justify-between">
<div class="flex"> <div class="flex">
<a class="py-4 px-3 font-bold text-primary" href="/"> <a class="py-4 px-3 font-bold text-primary" href="/">
Behind the Desk Behind the Desk
</a> </a>
<div class="hidden md:flex"> <div class="hidden md:flex">
<a class="py-4 px-3 text-primary hover:bg-opacity-5 hover:bg-primary" href="/">top 🔥</a> <a class="py-4 px-3 text-primary hover:bg-opacity-5 hover:bg-primary font-semibold" href="#">top 🔥</a>
<a class="py-4 px-3 text-primary hover:bg-opacity-5 hover:bg-primary" href="#">new</a> <a class="py-4 px-3 text-primary hover:bg-opacity-5 hover:bg-primary" href="#">new</a>
<a class="py-4 px-3 text-primary hover:bg-opacity-5 hover:bg-primary" href="#">nearby</a> <a class="py-4 px-3 text-primary hover:bg-opacity-5 hover:bg-primary" href="#">nearby</a>
<a class="py-4 px-3 text-primary hover:bg-opacity-5 hover:bg-primary" href="#">past</a> <a class="py-4 px-3 text-primary hover:bg-opacity-5 hover:bg-primary" href="#">past</a>
<a class="py-4 px-3 text-primary hover:bg-opacity-5 hover:bg-primary" href="#">ask</a> <a class="py-4 px-3 text-primary hover:bg-opacity-5 hover:bg-primary" href="#">ask</a>
<a class="py-4 px-3 text-primary hover:bg-opacity-5 hover:bg-primary" href="#">show</a> <a class="py-4 px-3 text-primary hover:bg-opacity-5 hover:bg-primary" href="#">show</a>
<a class="py-4 px-3 text-primary hover:bg-opacity-5 hover:bg-primary" href="#">submit</a> <a class="py-4 px-3 text-primary hover:bg-opacity-5 hover:bg-primary" href="#">submit</a>
</div>
</div>
<div class="flex items-center">
<div class="py-4 px-3">
<a href="/login.html" class="text-primary hover:bg-opacity-5 hover:bg-primary">login</a>
</div>
</div>
<!-- Mobile menu button -->
<div class="md:hidden flex items-center">
<button id="menuButton" class="text-primary p-3" aria-label="menu" aria-expanded="false">
<svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 12h16M4 18h16"></path>
</svg>
</button>
</div> </div>
</div> </div>
<div class="flex items-center"> <!-- Mobile Menu -->
<div class="py-4 px-3"> <div id="mobileMenu" class="hidden md:hidden">
<a href="/login.html" class="text-primary hover:bg-opacity-5 hover:bg-primary">login</a> <a class="block py-2 px-3 text-primary hover:bg-opacity-5 hover:bg-primary font-semibold" href="#">top 🔥</a>
</div> <a class="block py-2 px-3 text-primary hover:bg-opacity-5 hover:bg-primary" href="#">new</a>
</div> <a class="block py-2 px-3 text-primary hover:bg-opacity-5 hover:bg-primary" href="#">nearby</a>
<div class="md:hidden flex items-center"> <a class="block py-2 px-3 text-primary hover:bg-opacity-5 hover:bg-primary" href="#">past</a>
<button id="menuButton" class="text-primary p-3" aria-label="menu" aria-expanded="false"> <a class="block py-2 px-3 text-primary hover:bg-opacity-5 hover:bg-primary" href="#">ask</a>
<svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <a class="block py-2 px-3 text-primary hover:bg-opacity-5 hover:bg-primary" href="#">show</a>
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 12h16M4 18h16"></path> <a class="block py-2 px-3 text-primary hover:bg-opacity-5 hover:bg-primary" href="#">submit</a>
</svg>
</button>
</div> </div>
</div> </div>
<div id="mobileMenu" class="hidden md:hidden"> </nav>
<a class="block py-2 px-3 text-primary hover:bg-opacity-5 hover:bg-primary" href="/">top 🔥</a>
<a class="block py-2 px-3 text-primary hover:bg-opacity-5 hover:bg-primary" href="#">new</a> <main class="py-4 pb-16">
<a class="block py-2 px-3 text-primary hover:bg-opacity-5 hover:bg-primary" href="#">nearby</a> <div class="max-w-md mx-auto px-4 mt-8">
<a class="block py-2 px-3 text-primary hover:bg-opacity-5 hover:bg-primary" href="#">past</a> <div class="mb-8">
<a class="block py-2 px-3 text-primary hover:bg-opacity-5 hover:bg-primary" href="#">ask</a> <h2 class="text-lg mb-4 text-primary">Submit a Post</h2>
<a class="block py-2 px-3 text-primary hover:bg-opacity-5 hover:bg-primary" href="#">show</a> <form>
<a class="block py-2 px-3 text-primary hover:bg-opacity-5 hover:bg-primary" href="#">submit</a> <div class="mb-4">
<label class="block text-sm font-medium mb-1" for="submit-title">Title:</label>
<input class="w-full px-3 py-2 border border-gray-300 rounded" type="text" id="submit-title" name="title" required>
</div>
<div class="mb-4">
<label class="block text-sm font-medium mb-1" for="submit-body">Body:</label>
<textarea class="w-full px-3 py-2 border border-gray-300 rounded" id="submit-body" name="body" required></textarea>
</div>
<div class="mb-4">
<label class="block text-sm font-medium mb-1" for="submit-category">Category:</label>
<select class="w-full px-3 py-2 border border-gray-300 rounded" id="submit-category" name="category" required>
<option value="ask">Ask</option>
<option value="show">Show</option>
</select>
</div>
<div class="mb-4">
<button class="px-4 py-2 bg-primary text-white rounded hover:bg-primary-dark" type="submit">Submit</button>
</div>
</form>
</div>
</div> </div>
</div> </main>
</nav>
<main class="py-4 pb-16"> <footer class="bg-gray-200 py-8 px-6 text-text-muted">
<div class="max-w-md mx-auto px-4 mt-8"> <div class="max-w-screen-lg mx-auto">
<div class="mb-8"> <div class="mt-4 text-sm">
<h2 class="text-lg mb-4 text-primary">Submit a Post</h2> <a href="#" class="text-text-muted mx-2 no-underline hover:underline">Privacy</a>
<form> <a href="#" class="text-text-muted mx-2 no-underline hover:underline">Terms</a>
<div class="mb-4"> <a href="#" class="text-text-muted mx-2 no-underline hover:underline">Contact</a>
<label class="block text-sm font-medium mb-1" for="submit-title">Title:</label> </div>
<input class="w-full px-3 py-2 border border-gray-300 rounded" type="text" id="submit-title" name="title" required>
</div>
<div class="mb-4">
<label class="block text-sm font-medium mb-1" for="submit-body">Body:</label>
<textarea class="w-full px-3 py-2 border border-gray-300 rounded" id="submit-body" name="body" required></textarea>
</div>
<div class="mb-4">
<label class="block text-sm font-medium mb-1" for="submit-category">Category:</label>
<select class="w-full px-3 py-2 border border-gray-300 rounded" id="submit-category" name="category" required>
<option value="ask">Ask</option>
<option value="show">Show</option>
</select>
</div>
<div class="mb-4">
<button class="px-4 py-2 bg-primary text-white rounded hover:bg-primary-dark" type="submit">Submit</button>
</div>
</form>
</div> </div>
</div> </footer>
</main>
<footer class="bg-gray-200 py-8 px-6 text-text-muted"> <script>
<div class="max-w-screen-lg mx-auto"> document.addEventListener('DOMContentLoaded', () => {
<div class="mt-4 text-sm"> const menuButton = document.getElementById('menuButton');
<a href="#" class="text-text-muted mx-2 no-underline hover:underline">Privacy</a> const mobileMenu = document.getElementById('mobileMenu');
<a href="#" class="text-text-muted mx-2 no-underline hover:underline">Terms</a>
<a href="#" class="text-text-muted mx-2 no-underline hover:underline">Contact</a>
</div>
</div>
</footer>
<script> menuButton.addEventListener('click', () => {
document.addEventListener('DOMContentLoaded', () => { mobileMenu.classList.toggle('hidden');
const menuButton = document.getElementById('menuButton'); const expanded = menuButton.getAttribute('aria-expanded') === 'true';
const mobileMenu = document.getElementById('mobileMenu'); menuButton.setAttribute('aria-expanded', !expanded);
});
menuButton.addEventListener('click', () => {
mobileMenu.classList.toggle('hidden');
const expanded = menuButton.getAttribute('aria-expanded') === 'true';
menuButton.setAttribute('aria-expanded', !expanded);
}); });
}); </script>
</script>
</body> </body>
</html> </html>
+78 -86
View File
@@ -7,99 +7,91 @@
<link href="/src/styles.css" rel="stylesheet"> <link href="/src/styles.css" rel="stylesheet">
</head> </head>
<body class="font-sans text-text-default pt-navbar-height"> <body class="font-sans text-text-default pt-navbar-height">
<nav class="fixed top-0 left-0 right-0 bg-navbar-bg border-b border-navbar-border z-10" role="navigation" aria-label="main navigation"> <nav class="fixed top-0 left-0 right-0 bg-navbar-bg border-b border-navbar-border z-10" role="navigation" aria-label="main navigation">
<div class="max-w-screen-lg mx-auto px-4"> <div class="max-w-screen-lg mx-auto px-4">
<div class="flex justify-between"> <div class="flex justify-between">
<div class="flex"> <div class="flex">
<a class="py-4 px-3 font-bold text-primary" href="/"> <a class="py-4 px-3 font-bold text-primary" href="/">
Behind the Desk Behind the Desk
</a> </a>
<div class="hidden md:flex"> <div class="hidden md:flex">
<a class="py-4 px-3 text-primary hover:bg-opacity-5 hover:bg-primary" href="/">top 🔥</a> <a class="py-4 px-3 text-primary hover:bg-opacity-5 hover:bg-primary font-semibold" href="#">top 🔥</a>
<a class="py-4 px-3 text-primary hover:bg-opacity-5 hover:bg-primary" href="#">new</a> <a class="py-4 px-3 text-primary hover:bg-opacity-5 hover:bg-primary" href="#">new</a>
<a class="py-4 px-3 text-primary hover:bg-opacity-5 hover:bg-primary" href="#">nearby</a> <a class="py-4 px-3 text-primary hover:bg-opacity-5 hover:bg-primary" href="#">nearby</a>
<a class="py-4 px-3 text-primary hover:bg-opacity-5 hover:bg-primary" href="#">past</a> <a class="py-4 px-3 text-primary hover:bg-opacity-5 hover:bg-primary" href="#">past</a>
<a class="py-4 px-3 text-primary hover:bg-opacity-5 hover:bg-primary" href="#">ask</a> <a class="py-4 px-3 text-primary hover:bg-opacity-5 hover:bg-primary" href="#">ask</a>
<a class="py-4 px-3 text-primary hover:bg-opacity-5 hover:bg-primary" href="#">show</a> <a class="py-4 px-3 text-primary hover:bg-opacity-5 hover:bg-primary" href="#">show</a>
<a class="py-4 px-3 text-primary hover:bg-opacity-5 hover:bg-primary" href="#">submit</a> <a class="py-4 px-3 text-primary hover:bg-opacity-5 hover:bg-primary" href="#">submit</a>
</div>
</div>
<div class="flex items-center">
<div class="py-4 px-3">
<a href="/login.html" class="text-primary hover:bg-opacity-5 hover:bg-primary">login</a>
</div>
</div>
<!-- Mobile menu button -->
<div class="md:hidden flex items-center">
<button id="menuButton" class="text-primary p-3" aria-label="menu" aria-expanded="false">
<svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 12h16M4 18h16"></path>
</svg>
</button>
</div> </div>
</div> </div>
<div class="flex items-center"> <!-- Mobile Menu -->
<div class="py-4 px-3"> <div id="mobileMenu" class="hidden md:hidden">
<a href="/login.html" class="text-primary hover:bg-opacity-5 hover:bg-primary">login</a> <a class="block py-2 px-3 text-primary hover:bg-opacity-5 hover:bg-primary font-semibold" href="#">top 🔥</a>
<a class="block py-2 px-3 text-primary hover:bg-opacity-5 hover:bg-primary" href="#">new</a>
<a class="block py-2 px-3 text-primary hover:bg-opacity-5 hover:bg-primary" href="#">nearby</a>
<a class="block py-2 px-3 text-primary hover:bg-opacity-5 hover:bg-primary" href="#">past</a>
<a class="block py-2 px-3 text-primary hover:bg-opacity-5 hover:bg-primary" href="#">ask</a>
<a class="block py-2 px-3 text-primary hover:bg-opacity-5 hover:bg-primary" href="#">show</a>
<a class="block py-2 px-3 text-primary hover:bg-opacity-5 hover:bg-primary" href="#">submit</a>
</div>
</div>
</nav>
<main class="py-4 pb-16">
<div class="max-w-md mx-auto px-4 mt-8">
<div class="mb-8">
<h2 class="text-lg mb-4 text-primary">User Profile</h2>
<div class="user-profile">
<table class="w-full bg-gray-100 text-primary">
<tr>
<th class="text-left py-2 px-3 font-normal">Username:</th>
<td class="py-2 px-3">@username</td>
</tr>
<tr>
<th class="text-left py-2 px-3 font-normal">Created:</th>
<td class="py-2 px-3">January 1, 2023</td>
</tr>
<tr>
<th class="text-left py-2 px-3 font-normal align-top">About:</th>
<td class="py-2 px-3">
<ul>
<li class="hover:underline cursor-pointer">Submissions: 10</li>
<li class="hover:underline cursor-pointer">Comments: 50</li>
<li class="hover:underline cursor-pointer">Favorites: 20</li>
</ul>
</td>
</tr>
</table>
</div> </div>
</div> </div>
<div class="md:hidden flex items-center">
<button id="menuButton" class="text-primary p-3" aria-label="menu" aria-expanded="false">
<svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 12h16M4 18h16"></path>
</svg>
</button>
</div>
</div> </div>
<div id="mobileMenu" class="hidden md:hidden"> </main>
<a class="block py-2 px-3 text-primary hover:bg-opacity-5 hover:bg-primary" href="/">top 🔥</a>
<a class="block py-2 px-3 text-primary hover:bg-opacity-5 hover:bg-primary" href="#">new</a>
<a class="block py-2 px-3 text-primary hover:bg-opacity-5 hover:bg-primary" href="#">nearby</a>
<a class="block py-2 px-3 text-primary hover:bg-opacity-5 hover:bg-primary" href="#">past</a>
<a class="block py-2 px-3 text-primary hover:bg-opacity-5 hover:bg-primary" href="#">ask</a>
<a class="block py-2 px-3 text-primary hover:bg-opacity-5 hover:bg-primary" href="#">show</a>
<a class="block py-2 px-3 text-primary hover:bg-opacity-5 hover:bg-primary" href="#">submit</a>
</div>
</div>
</nav>
<main class="py-4 pb-16"> <script>
<div class="max-w-md mx-auto px-4 mt-8"> document.addEventListener('DOMContentLoaded', () => {
<div class="mb-8"> const menuButton = document.getElementById('menuButton');
<h2 class="text-lg mb-4 text-primary">User Profile</h2> const mobileMenu = document.getElementById('mobileMenu');
<div class="user-profile">
<table class="w-full bg-gray-100 text-primary">
<tr>
<th class="text-left py-2 px-3 font-normal">Username:</th>
<td class="py-2 px-3">@username</td>
</tr>
<tr>
<th class="text-left py-2 px-3 font-normal">Created:</th>
<td class="py-2 px-3">January 1, 2023</td>
</tr>
<tr>
<th class="text-left py-2 px-3 font-normal align-top">About:</th>
<td class="py-2 px-3">
<ul>
<li class="hover:underline cursor-pointer">Submissions: 10</li>
<li class="hover:underline cursor-pointer">Comments: 50</li>
<li class="hover:underline cursor-pointer">Favorites: 20</li>
</ul>
</td>
</tr>
</table>
</div>
</div>
</div>
</main>
<footer class="bg-gray-200 py-8 px-6 text-text-muted"> menuButton.addEventListener('click', () => {
<div class="max-w-screen-lg mx-auto"> mobileMenu.classList.toggle('hidden');
<div class="mt-4 text-sm"> const expanded = menuButton.getAttribute('aria-expanded') === 'true';
<a href="#" class="text-text-muted mx-2 no-underline hover:underline">Privacy</a> menuButton.setAttribute('aria-expanded', !expanded);
<a href="#" class="text-text-muted mx-2 no-underline hover:underline">Terms</a> });
<a href="#" class="text-text-muted mx-2 no-underline hover:underline">Contact</a>
</div>
</div>
</footer>
<script>
document.addEventListener('DOMContentLoaded', () => {
const menuButton = document.getElementById('menuButton');
const mobileMenu = document.getElementById('mobileMenu');
menuButton.addEventListener('click', () => {
mobileMenu.classList.toggle('hidden');
const expanded = menuButton.getAttribute('aria-expanded') === 'true';
menuButton.setAttribute('aria-expanded', !expanded);
}); });
}); </script>
</script>
</body> </body>
</html> </html>