Skip to content

Commit 77e8798

Browse files
committed
nav bar update less bold and dont hide current link
1 parent 06ec567 commit 77e8798

File tree

2 files changed

+17
-7
lines changed

2 files changed

+17
-7
lines changed

frontend/src/assets/css/tailwind.css

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
@apply block;
88
@apply px-2;
99
@apply py-2;
10-
@apply font-semibold;
10+
@apply my-1;
1111
@apply text-purple-matcha;
1212
@apply rounded-md;
1313
}
@@ -21,8 +21,17 @@
2121
@apply text-white-matcha;
2222
}
2323
@screen sm {
24+
.navigation-button-logged-in {
25+
@apply mx-1;
26+
@apply my-0;
27+
}
28+
}
29+
30+
@screen md {
2431
.navigation-button-logged-in {
2532
@apply px-5;
33+
@apply mx-1;
34+
@apply my-0;
2635
}
2736
}
2837

frontend/src/components/shared/NavBar.vue

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
<div id="logo">
77
<router-link to="/">
88
<div class="flex justify-center items-center">
9-
<img src="../../assets/logo.png" class="h-10">
10-
<h1 class="text-purple-matcha text-2xl font-bold ml-2">Matcha</h1>
9+
<img src="../../assets/logo.png" class="h-6">
10+
<h1 class="invisible lg:visible text-purple-matcha text-xl ml-2">Matcha</h1>
1111
</div>
1212
</router-link>
1313
</div>
@@ -25,10 +25,11 @@
2525
<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">Sign In</router-link>
2626
<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>
2727
</div>
28-
<router-link v-if="loggedIn && currentRoute !== 'Browse'" to="/browse" class="navigation-button-logged-in">Browse</router-link>
29-
<router-link v-if="loggedIn && currentRoute !== 'Search'" to="/search" class="navigation-button-logged-in">Search</router-link>
30-
<router-link v-if="loggedIn" to="/" class="navigation-button-logged-in">Matches</router-link>
31-
<router-link v-if="loggedIn && currentRoute !== 'Settings'" to="/settings" class="navigation-button-logged-in">Settings</router-link>
28+
<router-link v-if="loggedIn" to="/browse" v-bind:class="{'navigation-button-logged-in': true, 'bg-purple-matcha': currentRoute === 'Browse', 'text-white-matcha': currentRoute === 'Browse'}">Browse</router-link>
29+
<router-link v-if="loggedIn" to="/search" v-bind:class="{'navigation-button-logged-in': true, 'bg-purple-matcha': currentRoute === 'Search', 'text-white-matcha': currentRoute === 'Search'}">Search</router-link>
30+
<router-link v-if="loggedIn" to="/matches" v-bind:class="{'navigation-button-logged-in': true, 'bg-purple-matcha': currentRoute === 'Matches', 'text-white-matcha': currentRoute === 'Matches'}" class="navigation-button-logged-in">Matches</router-link>
31+
<router-link v-if="loggedIn" to="/settings" v-bind:class="{'navigation-button-logged-in': true, 'bg-purple-matcha': currentRoute === 'Settings', 'text-white-matcha': currentRoute === 'Settings'}">Settings</router-link>
32+
<router-link v-if="loggedIn" to="/history" v-bind:class="{'navigation-button-logged-in': true, 'bg-purple-matcha': currentRoute === 'History', 'text-white-matcha': currentRoute === 'History'}">History</router-link>
3233
<router-link v-if="loggedIn" v-on:click.native="logout()" to="/" class="navigation-button-logged-in">Exit</router-link>
3334
</div>
3435
</nav>

0 commit comments

Comments
 (0)