forked from primefaces/sakai-vue-cli
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAppTopbar.vue
58 lines (56 loc) · 1.49 KB
/
AppTopbar.vue
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
<template>
<div class="layout-topbar">
<router-link to="/" class="layout-topbar-logo">
<img alt="Logo" :src="topbarImage()" />
<span>SAKAI</span>
</router-link>
<button class="p-link layout-menu-button layout-topbar-button" @click="onMenuToggle">
<i class="pi pi-bars"></i>
</button>
<button class="p-link layout-topbar-menu-button layout-topbar-button"
v-styleclass="{ selector: '@next', enterClass: 'hidden', enterActiveClass: 'scalein',
leaveToClass: 'hidden', leaveActiveClass: 'fadeout', hideOnOutsideClick: true}">
<i class="pi pi-ellipsis-v"></i>
</button>
<ul class="layout-topbar-menu hidden lg:flex origin-top">
<li>
<button class="p-link layout-topbar-button">
<i class="pi pi-calendar"></i>
<span>Events</span>
</button>
</li>
<li>
<button class="p-link layout-topbar-button">
<i class="pi pi-cog"></i>
<span>Settings</span>
</button>
</li>
<li>
<button class="p-link layout-topbar-button">
<i class="pi pi-user"></i>
<span>Profile</span>
</button>
</li>
</ul>
</div>
</template>
<script>
export default {
methods: {
onMenuToggle(event) {
this.$emit('menu-toggle', event);
},
onTopbarMenuToggle(event) {
this.$emit('topbar-menu-toggle', event);
},
topbarImage() {
return this.$appState.darkTheme ? 'images/logo-white.svg' : 'images/logo-dark.svg';
}
},
computed: {
darkTheme() {
return this.$appState.darkTheme;
}
}
}
</script>