Skip to content

Instantly share code, notes, and snippets.

@waldrupm
Last active August 17, 2022 15:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save waldrupm/db881d15dbda81deddb80ecbebdefc9c to your computer and use it in GitHub Desktop.
Save waldrupm/db881d15dbda81deddb80ecbebdefc9c to your computer and use it in GitHub Desktop.
Navbar Code for LevelUpTuts Rails Course
<header class="mb-4">
<nav class="flex flex-wrap items-center justify-between px-3 py-3 text-gray-700 bg-gray-100 lg:px-10">
<div class="flex items-center mr-6 flex-no-shrink">
<a href="#" class="link text-xl tracking-tight font-black">Eventz</a>
</div>
<div class="block lg:hidden">
<button class="flex items-center px-3 py-2 border border-gray-500 rounded text-grey hover:text-gray-600 hover:border-gray-600">
<svg class="w-3 h-3 fill-current" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><title>Menu</title><path d="M0 3h20v2H0V3zm0 6h20v2H0V9zm0 6h20v2H0v-2z"/></svg>
</button>
</div>
<div class="items-center block w-full text-center lg:flex-1 lg:flex lg:text-left">
<div class="lg:flex-grow">
<a href="/about" class="block mt-4 lg:inline-block lg:mt-0 lg:mr-4 mb-2 lg:mb-0 link">About</a>
</div>
<div class="items-center block w-full mt-2 text-center lg:flex lg:flex-row lg:flex-1 lg:mt-0 lg:text-left lg:justify-end">
<button href="#" class="btn btn-default mb-2 lg:mb-0 block">Login</button>
<button href="#" class="btn btn-default block ml-4">Sign up</button>
</div>
</div>
</nav>
</header>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment