Skip to content

Commit 813f7fc

Browse files
committed
create navigation bar more compact
1 parent 1a6442a commit 813f7fc

File tree

2 files changed

+13
-7
lines changed

2 files changed

+13
-7
lines changed

frontend/src/assets/css/tailwind.css

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,12 @@
2828
}
2929

3030
@screen md {
31+
.navigation-button-logged-in {
32+
@apply px-2;
33+
}
34+
}
35+
36+
@screen lg {
3137
.navigation-button-logged-in {
3238
@apply px-5;
3339
@apply mx-1;

frontend/src/components/shared/NavBar.vue

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<template>
22
<!-- eslint-disable max-len -->
33
<!-- eslint-disable vue/no-deprecated-v-on-native-modifier -->
4-
<nav class="sm:flex sm:justify-between sm:items-center sm:py-5">
5-
<div class="flex items-center justify-between px-5 py-3 sm:p-0">
4+
<nav class="md:flex md:justify-between md:items-center md:py-5">
5+
<div class="flex items-center justify-between px-5 py-3 md:p-0">
66
<div id="logo">
77
<router-link to="/">
88
<div class="flex justify-center items-center">
@@ -11,7 +11,7 @@
1111
</div>
1212
</router-link>
1313
</div>
14-
<div id="burger" class="sm:hidden">
14+
<div id="burger" class="md:hidden">
1515
<button type="button" class="block text-gray-800 focus:outline-none" v-on:click="isOpen = !isOpen">
1616
<svg class="w-8 h-8 text-purple-matcha fill-current" viewBox="0 0 24 24">
1717
<path v-if="!isOpen" fill-rule="evenodd" d="M4 5h16a1 1 0 0 1 0 2H4a1 1 0 1 1 0-2zm0 6h16a1 1 0 0 1 0 2H4a1 1 0 0 1 0-2zm0 6h16a1 1 0 0 1 0 2H4a1 1 0 0 1 0-2z"/>
@@ -20,10 +20,10 @@
2020
</button>
2121
</div>
2222
</div>
23-
<div id="links" v-on:click="isOpen = !isOpen" v-bind:class="isOpen ? 'block' : 'hidden'" class="px-2 pb-5 text-center sm:p-0 sm:block sm:flex sm:items-center">
24-
<div v-if="!loggedIn" class="sm:flex sm:bg-purple-matcha sm:border-2 sm:border-purple-matcha sm:rounded-lg">
25-
<router-link to="/accounts/signin" class="navigation-button-logged-in sm:hover:bg-white-matcha sm:hover:text-purple-matcha sm:text-purple-matcha sm:bg-white-matcha sm:py-2 sm:px-8 sm:rounded-md mx-0">Sign In</router-link>
26-
<router-link to="/accounts/signup" class="navigation-button-logged-in sm:hover:bg-purple-matcha sm:hover:text-white-matcha sm:text-white-matcha sm:py-2 sm:px-8">Get Started</router-link>
23+
<div id="links" v-on:click="isOpen = !isOpen" v-bind:class="isOpen ? 'block' : 'hidden'" class="px-2 pb-5 text-center md:p-0 md:block md:flex md:items-center">
24+
<div v-if="!loggedIn" class="md:flex md:bg-purple-matcha md:border-2 md:border-purple-matcha md:rounded-lg">
25+
<router-link to="/accounts/signin" class="navigation-button-logged-in md:hover:bg-white-matcha md:hover:text-purple-matcha md:text-purple-matcha md:bg-white-matcha md:py-2 md:px-8 md:rounded-md mx-0">Sign In</router-link>
26+
<router-link to="/accounts/signup" class="navigation-button-logged-in md:hover:bg-purple-matcha md:hover:text-white-matcha md:text-white-matcha md:py-2 md:px-8">Get Started</router-link>
2727
</div>
2828
<router-link v-if="loggedIn" to="/browse" v-bind:class="{'navigation-button-logged-in': true, 'font-black': currentRoute === 'Browse'}">Browse</router-link>
2929
<router-link v-if="loggedIn" to="/search" v-bind:class="{'navigation-button-logged-in': true, 'font-black': currentRoute === 'Search'}">Search</router-link>

0 commit comments

Comments
 (0)