source: ReserveNGo-frontend/src/components/Project/Nav_bar_new.vue@ b77dbe8

Last change on this file since b77dbe8 was dad25fc, checked in by Aleksandarj03 <138524804+Aleksandarj03@…>, 42 hours ago

Rewrote logic for login and register and added Add Restaurant functionality for the admin

  • Property mode set to 100644
File size: 3.0 KB
Line 
1<script>
2
3
4import { userStore } from '@/PiniaStores/UserStore.js'
5import logout_ from '@/components/Project/logout_.vue'
6
7
8export default {
9 data() {
10 return {
11 userStore_: userStore()
12 }
13 },
14 components: {
15 logout_
16 }
17
18}
19
20
21
22</script>
23
24<template>
25
26<!-- <div class="container-fluid bg-primary">
27 <div class="row align-items-center">
28
29 <div class="col-8">
30 <img src="/src/assets/logo.png" alt="Logo could not be found." />
31 </div>
32
33
34 <div class="col-4">
35
36
37 <a href="" class="btn btn-danger btn-sm ">Омилени Локали</a>
38
39
40
41 <a href="" class="btn btn-danger btn-sm ">Твојте Резервации</a>
42
43
44
45 <a href="" class="btn btn-danger btn-sm ">Login</a>
46
47
48
49 </div>
50&lt;!&ndash; <p class="text">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Eaque.</p>
51 <p class="lead text-end">Lorem ipsum dolor sit amet, consectetur adipisicing elit.</p>
52 <p class="lead text-center text-warning bg-primary">Lorem ipsum dolor sit amet, consectetur adipisicing elit.</p>&ndash;&gt;
53
54&lt;!&ndash; <p class="container-lg">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Est, quos?</p>&ndash;&gt;
55 </div>
56 </div>-->
57 <!-- navbar -->
58
59 <nav class="navbar navbar-expand-md navbar-light pt-1 pb-1 ">
60 <div class="container-xxl">
61 <!-- navbar brand / title -->
62
63 <router-link to="/" class="navbar-brand">
64 <img src="/src/assets/rng_logo.png" alt="Logo could not be found." />
65 <span class="fw-bold ms-2">
66 Reserve And Go
67 </span>
68 </router-link>
69
70
71
72 <!-- navbar links -->
73 <div class="collapse navbar-collapse justify-content-end align-center" id="main-nav">
74
75 <ul class="navbar-nav">
76
77 <li class="nav-item">
78 <router-link v-if="this.userStore_.data.role==='ROLE_CUSTOMER'" to="/favourite_locals" class="nav-link">Favourite locals </router-link>
79 </li>
80 <li class="nav-item">
81 <router-link v-if="this.userStore_.data.role==='ROLE_CUSTOMER'" to="/my_reservations" class="nav-link">My reservations </router-link>
82 </li>
83
84 <li class="nav-item ms-2 d-none d-md-inline">
85 <router-link to="/login" >
86 <a v-if="userStore_.data.role==='UN_AUTHENTICATED'" class="btn btn-dark">Login</a>
87 </router-link>
88 <router-link to="/register">
89 <a v-if="userStore_.data.role==='UN_AUTHENTICATED'" class="btn btn-dark ms-2">Register</a>
90 </router-link>
91 <router-link to="/addRestaurant">
92 <a v-if="userStore_.data.role==='ROLE_LOCAL_MANAGER' || userStore_.data.role==='ROLE_ADMIN'" class="btn btn-dark me-2">Add Restaurant</a>
93 </router-link>
94 <logout_></logout_>
95 </li>
96
97 </ul>
98 </div>
99 </div>
100 </nav>
101</template>
102
103<style scoped>
104
105#login {
106 float: right;
107 padding: 2%;
108
109}
110
111
112nav{
113 background: #8377D1;
114 height: 80px;
115}
116
117.btn{
118 height: 40px;
119 margin-top: 5px;
120}
121
122img{
123 height: 70px;
124}
125
126
127
128</style>
Note: See TracBrowser for help on using the repository browser.