refactor: simplify and streamline navigation layout

This commit is contained in:
Kerby Martino authored and Kerby Martino (aider) committed 2025-05-12 14:13:36 +08:00
1 parent 4cc667f157
commit befc8bdc9e
1 file changed
+38 -63
+38 -63
View File
@@ -1,68 +1,43 @@
<nav class="sticky top-0 z-50 w-full flex flex-wrap items-center justify-between h-auto navbar-expand-lg bg-indigo-700">
<div class="container mx-auto md:mb-3 md:mt-3 flex flex-wrap items-center justify-between px-4 sm:px-16 md:px-10 lg:px-12 xl:px-24 xxl:px-32">
<div class="relative flex flex-col justify-between w-auto static block justify-start xs:hidden">
<a class="inline-block py-1 whitespace-no-wrap text-gray-100 font-heading text-2xl" href="#">
resharespace
</a>
<div class="relative w-full text-gray-200 mt-2">
<input
class="relative w-full max-w-[18rem] sm:max-w-[20rem] md:max-w-[22rem] lg:max-w-[24rem] bg-indigo-800 opacity-75 h-8 sm:h-10 pb-1 px-2 pr-10 rounded-lg text-sm lg:tracking-tight focus:outline-none font-sans"
name="search"
onclick="toggleNavbar('example-collapse-navbar');toggleOverlay('example-collapse-overlay');toggleOverlay('example-collapse-dropdown')"
placeholder="Where do you want to work today?"
style="transition: all .15s ease"
type="search"
/>
<button class="absolute right-0 top-0 mt-2 sm:mt-3 md:mt-3 mr-2" onclick="toggleDropdown('example-collapse-dropdown')" type="submit">
<img alt="" class="text-indigo-700 h-5 w-5" src="assets/svg/icon_search.svg">
</button>
<!--search bar dropdown-->
<div class="z-10 origin-top-right absolute w-full pt-2 hidden" id="example-collapse-dropdown">
<div class="bg-white rounded-lg py-1">
<a class="flex items-center px-2 text-md leading-5 hover:bg-green-300 text-gray-900 hover:text-white focus:outline-none" href="#">
<svg class="h-7 w-5 mr-1" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
<path clip-rule="evenodd" d="M5.05 4.05a7 7 0 119.9 9.9L10 18.9l-4.95-4.95a7 7 0 010-9.9zM10 11a2 2 0 100-4 2 2 0 000 4z" fill-rule="evenodd"/>
</svg>
Incub8 Space, Bacoor, Kawit, Cavite
</a>
<a class="flex items-center px-2 text-md leading-5 hover:bg-green-300 text-gray-900 hover:text-white focus:outline-none" href="#">
<svg class="h-7 w-5 mr-1" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
<path clip-rule="evenodd" d="M5.05 4.05a7 7 0 119.9 9.9L10 18.9l-4.95-4.95a7 7 0 010-9.9zM10 11a2 2 0 100-4 2 2 0 000 4z" fill-rule="evenodd"/>
</svg>
Incub8 Space, Bacoor, Kawit, Cavite
</a>
<a class="flex items-center px-2 text-md leading-5 hover:bg-green-300 text-gray-900 hover:text-white focus:outline-none" href="#">
<svg class="h-7 w-5 mr-1" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
<path clip-rule="evenodd" d="M5.05 4.05a7 7 0 119.9 9.9L10 18.9l-4.95-4.95a7 7 0 010-9.9zM10 11a2 2 0 100-4 2 2 0 000 4z" fill-rule="evenodd"/>
</svg>
Incub8 Space, Bacoor, Kawit, Cavite
</a>
<a class="flex items-center px-2 text-md leading-5 hover:bg-green-300 text-gray-900 hover:text-white focus:outline-none" href="#">
<svg class="h-7 w-5 mr-1" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
<path clip-rule="evenodd" d="M5.05 4.05a7 7 0 119.9 9.9L10 18.9l-4.95-4.95a7 7 0 010-9.9zM10 11a2 2 0 100-4 2 2 0 000 4z" fill-rule="evenodd"/>
</svg>
Incub8 Space, Bacoor, Kawit, Cavite
</a>
<a class="flex items-center px-2 text-md leading-5 hover:bg-green-300 text-gray-900 hover:text-white focus:outline-none" href="#">
<svg class="h-7 w-5 mr-1" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
<path clip-rule="evenodd" d="M5.05 4.05a7 7 0 119.9 9.9L10 18.9l-4.95-4.95a7 7 0 010-9.9zM10 11a2 2 0 100-4 2 2 0 000 4z" fill-rule="evenodd"/>
</svg>
Incub8 Space, Bacoor, Kawit, Cavite
</a>
</div>
</div>
<!--end search bar dropdown-->
</div>
</div>
<div class="flex flex-grow items-center lg:shadow-none">
<ul class="flex flex-row items-center ml-auto space-x-2"> <!-- Added items-center and space-x-2 for potential spacing if needed -->
<!-- Desktop Post Space button -->
<li class="flex items-center">
<button class="bg-indigo-900 text-gray-100 font-heading text-lg p-2 font-semibold tracking-normal capitalize px-5 py-2 rounded-base focus:outline-none" onclick="toggleNavbar('post-modal');toggleOverlay('collapse-overlay')" style="transition: all .15s ease" type="button">
<nav class="sticky top-0 z-50 w-full bg-indigo-700">
<div class="container mx-auto px-4 sm:px-6 lg:px-12 xl:px-24 xxl:px-32 py-3">
<!-- Mobile & Tablet: Logo + Post Button (Top Stack) -->
<!-- Desktop: Flex Row -->
<div class="flex flex-col md:flex-row md:items-center md:justify-between gap-2 md:gap-4">
<!-- Left: Logo -->
<div class="flex justify-between items-center md:w-auto w-full">
<a href="#" class="text-2xl font-heading text-gray-100">resharespace</a>
<!-- Post Space button (mobile visible only inline with logo) -->
<div class="md:hidden">
<button class="bg-indigo-900 text-gray-100 font-heading text-base px-4 py-2 rounded-base ml-auto" onclick="toggleNavbar('post-modal');toggleOverlay('collapse-overlay')">
Post Space
</button>
</li>
</ul>
</div>
</div>
<!-- Search Input (Full width on mobile, center on desktop) -->
<div class="w-full md:flex-1 md:px-4">
<div class="relative">
<input
type="search"
placeholder="Where do you want to work today?"
class="w-full bg-indigo-800 opacity-75 h-10 px-3 pr-10 rounded-lg text-sm text-gray-200 focus:outline-none"
/>
<button type="submit" class="absolute right-0 top-1.5 mr-2">
<img alt="Search" src="assets/svg/icon_search.svg" class="h-5 w-5 text-indigo-700">
</button>
</div>
</div>
<!-- Right: Post Space button (desktop only) -->
<div class="hidden md:flex md:items-center">
<button class="bg-indigo-900 text-gray-100 font-heading text-lg px-5 py-2 rounded-base" onclick="toggleNavbar('post-modal');toggleOverlay('collapse-overlay')">
Post Space
</button>
</div>
</div>
</div>
</nav>