2019-06-03 03:31:38 +00:00
|
|
|
<template>
|
2020-05-17 23:22:56 +00:00
|
|
|
<header class="header">
|
|
|
|
<div class="header-nav">
|
|
|
|
<router-link
|
|
|
|
to="/"
|
|
|
|
class="logo-link"
|
|
|
|
><h1 class="header-logo">
|
|
|
|
<div
|
|
|
|
class="logo"
|
|
|
|
v-html="logo"
|
|
|
|
/>
|
|
|
|
</h1></router-link>
|
|
|
|
|
|
|
|
<nav class="nav">
|
|
|
|
<ul class="nav-list nolist">
|
|
|
|
<li class="nav-item">
|
|
|
|
<router-link
|
|
|
|
v-slot="{ href, isActive, navigate }"
|
|
|
|
to="/actors"
|
2020-12-26 23:40:35 +00:00
|
|
|
custom
|
2020-05-17 23:22:56 +00:00
|
|
|
>
|
|
|
|
<a
|
|
|
|
class="nav-link"
|
|
|
|
:href="href"
|
|
|
|
:class="{ active: isActive }"
|
|
|
|
@click="navigate"
|
|
|
|
>Actors</a>
|
|
|
|
</router-link>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
<li class="nav-item">
|
|
|
|
<router-link
|
|
|
|
v-slot="{ href, isActive, navigate }"
|
2021-01-03 22:32:09 +00:00
|
|
|
to="/channels"
|
2020-12-26 23:40:35 +00:00
|
|
|
custom
|
2020-05-17 23:22:56 +00:00
|
|
|
>
|
|
|
|
<a
|
|
|
|
class="nav-link"
|
|
|
|
:href="href"
|
|
|
|
:class="{ active: isActive }"
|
|
|
|
@click="navigate"
|
2020-06-27 02:50:13 +00:00
|
|
|
>Channels</a>
|
2020-05-17 23:22:56 +00:00
|
|
|
</router-link>
|
|
|
|
</li>
|
|
|
|
|
2020-07-25 01:44:19 +00:00
|
|
|
<li class="nav-item">
|
|
|
|
<router-link
|
|
|
|
v-slot="{ href, isActive, navigate }"
|
2020-09-11 01:13:51 +00:00
|
|
|
to="/tags"
|
2020-12-26 23:40:35 +00:00
|
|
|
custom
|
2020-07-25 01:44:19 +00:00
|
|
|
>
|
|
|
|
<a
|
|
|
|
class="nav-link"
|
|
|
|
:href="href"
|
|
|
|
:class="{ active: isActive }"
|
|
|
|
@click="navigate"
|
2020-09-11 01:13:51 +00:00
|
|
|
>Tags</a>
|
2020-07-25 01:44:19 +00:00
|
|
|
</router-link>
|
|
|
|
</li>
|
|
|
|
|
2020-05-17 23:22:56 +00:00
|
|
|
<li class="nav-item">
|
|
|
|
<router-link
|
|
|
|
v-slot="{ href, isActive, navigate }"
|
2020-09-11 01:13:51 +00:00
|
|
|
to="/movies"
|
2020-12-26 23:40:35 +00:00
|
|
|
custom
|
2020-05-17 23:22:56 +00:00
|
|
|
>
|
|
|
|
<a
|
|
|
|
class="nav-link"
|
|
|
|
:href="href"
|
|
|
|
:class="{ active: isActive }"
|
|
|
|
@click="navigate"
|
2020-09-11 01:13:51 +00:00
|
|
|
>Movies</a>
|
2020-05-17 23:22:56 +00:00
|
|
|
</router-link>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</nav>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="header-section">
|
2020-09-11 01:13:51 +00:00
|
|
|
<div
|
|
|
|
class="sidebar-toggle noselect"
|
2021-01-03 22:32:09 +00:00
|
|
|
@click.stop="$emit('toggleSidebar')"
|
2020-09-11 01:13:51 +00:00
|
|
|
><Icon icon="menu" /></div>
|
|
|
|
|
2021-04-04 19:52:19 +00:00
|
|
|
<Tooltip v-if="me">
|
|
|
|
<div
|
|
|
|
class="header-button header-notifications"
|
2021-04-22 17:44:23 +00:00
|
|
|
:class="{ unseen: notifications.length > 0 }"
|
2021-04-04 19:52:19 +00:00
|
|
|
>
|
2021-04-22 17:44:23 +00:00
|
|
|
<Icon icon="bell2" />
|
|
|
|
|
|
|
|
<span
|
|
|
|
v-if="notifications.length > 0"
|
|
|
|
class="notifications-count"
|
|
|
|
>{{ notifications.length }}</span>
|
2021-04-04 19:52:19 +00:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<template v-slot:tooltip>
|
2021-04-22 17:44:23 +00:00
|
|
|
<Notifications />
|
2021-04-04 19:52:19 +00:00
|
|
|
</template>
|
|
|
|
</Tooltip>
|
|
|
|
|
2020-12-27 01:15:06 +00:00
|
|
|
<Tooltip>
|
2021-04-04 19:52:19 +00:00
|
|
|
<div class="header-button header-account">
|
2020-12-20 22:20:41 +00:00
|
|
|
<div class="account">
|
|
|
|
<Icon
|
|
|
|
icon="user3-long"
|
|
|
|
class="avatar"
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
</div>
|
2020-05-17 23:22:56 +00:00
|
|
|
|
2020-12-27 01:15:06 +00:00
|
|
|
<template v-slot:tooltip>
|
2021-03-18 18:44:23 +00:00
|
|
|
<Menu @show-filters="state => $emit('showFilters', state)" />
|
2020-12-26 22:51:27 +00:00
|
|
|
</template>
|
2020-12-27 01:15:06 +00:00
|
|
|
</Tooltip>
|
2020-05-17 23:22:56 +00:00
|
|
|
|
|
|
|
<Search class="search-full" />
|
|
|
|
|
2020-12-27 01:15:06 +00:00
|
|
|
<Tooltip
|
2020-05-17 23:22:56 +00:00
|
|
|
class="search-compact"
|
|
|
|
:open="searching"
|
2020-12-28 23:42:02 +00:00
|
|
|
@open="searching = true"
|
|
|
|
@close="searching = false"
|
2020-05-17 23:22:56 +00:00
|
|
|
>
|
|
|
|
<button
|
|
|
|
type="button"
|
|
|
|
class="search-button"
|
|
|
|
><Icon
|
|
|
|
icon="search"
|
|
|
|
/></button>
|
|
|
|
|
2020-12-28 23:42:02 +00:00
|
|
|
<template v-slot:tooltip>
|
|
|
|
<Search
|
|
|
|
:searching="searching"
|
|
|
|
class="compact"
|
|
|
|
@search="searching = false"
|
|
|
|
@click.stop
|
|
|
|
/>
|
|
|
|
</template>
|
2020-12-27 01:15:06 +00:00
|
|
|
</Tooltip>
|
2020-05-17 23:22:56 +00:00
|
|
|
</div>
|
|
|
|
</header>
|
2019-06-03 03:31:38 +00:00
|
|
|
</template>
|
|
|
|
|
2020-02-26 00:15:50 +00:00
|
|
|
<script>
|
2021-03-14 03:54:43 +00:00
|
|
|
import Menu from './menu.vue';
|
2021-04-22 17:44:23 +00:00
|
|
|
import Notifications from './notifications.vue';
|
2020-02-26 03:07:35 +00:00
|
|
|
import Search from './search.vue';
|
2020-02-26 00:15:50 +00:00
|
|
|
|
2020-03-25 02:42:46 +00:00
|
|
|
import logo from '../../img/logo.svg';
|
|
|
|
|
2021-04-04 19:52:19 +00:00
|
|
|
function me() {
|
|
|
|
return this.$store.state.auth.user;
|
|
|
|
}
|
|
|
|
|
2021-04-22 17:44:23 +00:00
|
|
|
function notifications() {
|
|
|
|
return this.$store.state.ui.notifications;
|
|
|
|
}
|
|
|
|
|
2020-02-26 00:15:50 +00:00
|
|
|
export default {
|
2020-05-17 23:22:56 +00:00
|
|
|
components: {
|
2021-03-14 03:54:43 +00:00
|
|
|
Menu,
|
2021-04-22 17:44:23 +00:00
|
|
|
Notifications,
|
2020-05-17 23:22:56 +00:00
|
|
|
Search,
|
|
|
|
},
|
2021-01-03 22:32:09 +00:00
|
|
|
emits: ['toggleSidebar', 'showFilters'],
|
2020-05-17 23:22:56 +00:00
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
logo,
|
|
|
|
searching: false,
|
2021-01-03 21:53:51 +00:00
|
|
|
showFilters: false,
|
2020-05-17 23:22:56 +00:00
|
|
|
};
|
|
|
|
},
|
2021-04-04 19:52:19 +00:00
|
|
|
computed: {
|
|
|
|
me,
|
2021-04-22 17:44:23 +00:00
|
|
|
notifications,
|
2021-04-04 19:52:19 +00:00
|
|
|
},
|
2020-02-26 00:15:50 +00:00
|
|
|
};
|
|
|
|
</script>
|
|
|
|
|
2019-06-03 03:31:38 +00:00
|
|
|
<style lang="scss" scoped>
|
2020-07-05 02:40:57 +00:00
|
|
|
@import 'breakpoints';
|
2019-06-03 03:31:38 +00:00
|
|
|
|
|
|
|
.header {
|
2020-03-25 01:48:54 +00:00
|
|
|
height: 3rem;
|
2019-11-30 04:55:32 +00:00
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
2020-05-25 00:02:28 +00:00
|
|
|
z-index: 2;
|
2020-02-26 00:15:50 +00:00
|
|
|
justify-content: space-between;
|
2020-03-23 00:43:49 +00:00
|
|
|
background: var(--background);
|
|
|
|
color: var(--primary);
|
2020-05-25 00:02:28 +00:00
|
|
|
box-shadow: 0 0 3px var(--darken-weak);
|
2019-11-30 04:55:32 +00:00
|
|
|
font-size: 0;
|
2019-06-03 03:31:38 +00:00
|
|
|
}
|
|
|
|
|
2020-03-08 03:31:19 +00:00
|
|
|
.header-nav {
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
2020-03-25 01:48:54 +00:00
|
|
|
height: 100%;
|
2020-09-11 01:13:51 +00:00
|
|
|
overflow: hidden;
|
2020-03-08 03:31:19 +00:00
|
|
|
}
|
|
|
|
|
2020-03-23 00:43:49 +00:00
|
|
|
.header-section {
|
|
|
|
height: 100%;
|
|
|
|
align-items: center;
|
|
|
|
display: flex;
|
|
|
|
flex-direction: row;
|
|
|
|
}
|
|
|
|
|
2020-03-25 01:48:54 +00:00
|
|
|
.sidebar-toggle {
|
|
|
|
display: none;
|
2020-07-16 13:55:03 +00:00
|
|
|
align-items: center;
|
2020-07-14 22:15:00 +00:00
|
|
|
height: 100%;
|
|
|
|
|
|
|
|
.icon {
|
|
|
|
display: inline-block;
|
|
|
|
fill: var(--shadow-modest);
|
|
|
|
padding: 0 1rem;
|
|
|
|
width: 1.5rem;
|
|
|
|
height: 100%;
|
|
|
|
}
|
2020-03-25 01:48:54 +00:00
|
|
|
|
|
|
|
&:hover {
|
2020-07-14 22:15:00 +00:00
|
|
|
cursor: pointer;
|
|
|
|
|
|
|
|
.icon {
|
|
|
|
fill: var(--primary);
|
|
|
|
}
|
2020-03-25 01:48:54 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-07-06 03:29:12 +00:00
|
|
|
.logo-link {
|
2020-03-25 02:42:46 +00:00
|
|
|
height: 100%;
|
2019-11-30 04:55:32 +00:00
|
|
|
display: inline-block;
|
2019-07-06 03:29:12 +00:00
|
|
|
text-decoration: none;
|
2020-09-11 01:13:51 +00:00
|
|
|
margin: -.25rem 1rem 0 0;
|
2019-07-06 03:29:12 +00:00
|
|
|
}
|
|
|
|
|
2020-03-25 02:42:46 +00:00
|
|
|
.header-logo {
|
2020-03-25 01:48:54 +00:00
|
|
|
height: 100%;
|
2020-03-25 02:42:46 +00:00
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
2020-03-25 01:48:54 +00:00
|
|
|
padding: 0 0 0 1rem;
|
2020-05-25 00:02:28 +00:00
|
|
|
fill: var(--primary);
|
2020-03-25 02:42:46 +00:00
|
|
|
}
|
2020-01-06 20:49:37 +00:00
|
|
|
|
2020-03-25 02:42:46 +00:00
|
|
|
.logo {
|
|
|
|
width: 6rem;
|
|
|
|
display: flex;
|
2019-11-30 04:55:32 +00:00
|
|
|
}
|
|
|
|
|
2020-03-25 02:42:46 +00:00
|
|
|
.nav,
|
|
|
|
.nav-list {
|
2019-11-30 04:55:32 +00:00
|
|
|
display: inline-block;
|
2020-03-25 02:42:46 +00:00
|
|
|
height: 100%;
|
|
|
|
}
|
|
|
|
|
|
|
|
.nav-item {
|
|
|
|
height: 100%;
|
2019-11-30 04:55:32 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.nav-link {
|
2020-03-25 02:42:46 +00:00
|
|
|
height: 100%;
|
2019-12-04 20:58:08 +00:00
|
|
|
display: flex;
|
2019-12-01 04:32:47 +00:00
|
|
|
align-items: center;
|
2019-12-04 20:58:08 +00:00
|
|
|
justify-content: center;
|
2020-03-25 02:42:46 +00:00
|
|
|
padding: 0 1rem;
|
2020-03-23 00:43:49 +00:00
|
|
|
color: var(--shadow);
|
2019-11-30 04:55:32 +00:00
|
|
|
text-decoration: none;
|
2019-12-01 04:32:47 +00:00
|
|
|
font-size: .9rem;
|
2019-11-30 04:55:32 +00:00
|
|
|
font-weight: bold;
|
2020-02-10 01:05:28 +00:00
|
|
|
cursor: pointer;
|
2019-11-30 04:55:32 +00:00
|
|
|
|
2019-12-01 04:32:47 +00:00
|
|
|
&.active {
|
2020-03-23 00:43:49 +00:00
|
|
|
color: var(--primary);
|
2019-12-01 04:32:47 +00:00
|
|
|
|
|
|
|
.icon {
|
2020-03-23 00:43:49 +00:00
|
|
|
fill: var(--primary);
|
2019-12-01 04:32:47 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&:hover:not(.active) {
|
2020-03-23 00:43:49 +00:00
|
|
|
color: var(--primary);
|
2019-12-01 04:32:47 +00:00
|
|
|
|
|
|
|
.icon {
|
2020-03-23 00:43:49 +00:00
|
|
|
fill: var(--primary);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-04-04 19:52:19 +00:00
|
|
|
.header-button {
|
|
|
|
padding: 1rem .75rem;
|
2020-03-23 00:43:49 +00:00
|
|
|
|
2021-04-04 19:52:19 +00:00
|
|
|
.icon {
|
|
|
|
fill: var(--shadow);
|
|
|
|
}
|
2020-12-20 22:20:41 +00:00
|
|
|
|
|
|
|
&:hover {
|
|
|
|
cursor: pointer;
|
|
|
|
|
|
|
|
.account {
|
|
|
|
border-color: var(--primary);
|
|
|
|
}
|
|
|
|
|
2021-04-04 19:52:19 +00:00
|
|
|
.icon {
|
2020-12-20 22:20:41 +00:00
|
|
|
fill: var(--primary);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-04-04 19:52:19 +00:00
|
|
|
.header-account {
|
|
|
|
padding: 1rem 1rem 1rem .75rem;
|
|
|
|
}
|
|
|
|
|
|
|
|
.header-notifications {
|
2021-04-22 17:44:23 +00:00
|
|
|
position: relative;
|
2021-04-04 19:52:19 +00:00
|
|
|
padding: 1rem .75rem 1rem 1rem;
|
2021-04-22 17:44:23 +00:00
|
|
|
|
|
|
|
&.unseen .icon {
|
|
|
|
fill: var(--primary);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.notifications-count {
|
|
|
|
width: 100%;
|
|
|
|
height: 100%;
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
justify-content: center;
|
|
|
|
position: absolute;
|
|
|
|
bottom: .05rem;
|
|
|
|
left: .1rem;
|
|
|
|
color: var(--text-light);
|
|
|
|
font-size: .6rem;
|
|
|
|
font-weight: bold;
|
2021-04-04 19:52:19 +00:00
|
|
|
}
|
|
|
|
|
2020-12-20 22:20:41 +00:00
|
|
|
.account {
|
|
|
|
width: 1.25rem;
|
|
|
|
height: 1.25rem;
|
|
|
|
display: flex;
|
|
|
|
justify-content: center;
|
|
|
|
border: solid 2px var(--shadow);
|
|
|
|
border-radius: 1.5rem;
|
|
|
|
overflow: hidden;
|
|
|
|
|
|
|
|
.avatar {
|
|
|
|
width: 1rem;
|
|
|
|
height: 1rem;
|
|
|
|
margin: .3rem 0 0 0;
|
|
|
|
fill: var(--shadow);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-03-25 01:48:54 +00:00
|
|
|
.search-compact {
|
|
|
|
display: none;
|
|
|
|
height: 100%;
|
|
|
|
}
|
|
|
|
|
2020-02-26 03:07:35 +00:00
|
|
|
.search-button {
|
2020-02-26 00:15:50 +00:00
|
|
|
height: 100%;
|
2020-03-25 01:48:54 +00:00
|
|
|
padding: .25rem 1rem 0 1rem;
|
2020-02-26 03:07:35 +00:00
|
|
|
background: none;
|
2020-02-26 00:15:50 +00:00
|
|
|
border: none;
|
|
|
|
outline: none;
|
|
|
|
|
2020-02-26 03:07:35 +00:00
|
|
|
.icon {
|
2020-03-23 00:43:49 +00:00
|
|
|
fill: var(--shadow);
|
2020-02-26 00:15:50 +00:00
|
|
|
}
|
|
|
|
|
2020-03-25 01:48:54 +00:00
|
|
|
&:hover {
|
|
|
|
cursor: pointer;
|
|
|
|
|
|
|
|
.icon {
|
|
|
|
fill: var(--shadow-strong);
|
|
|
|
}
|
|
|
|
}
|
2020-02-26 03:07:35 +00:00
|
|
|
}
|
2020-02-26 00:15:50 +00:00
|
|
|
|
2020-07-05 02:40:57 +00:00
|
|
|
@media(max-width: $breakpoint-kilo) {
|
2020-02-26 03:07:35 +00:00
|
|
|
.search-full {
|
|
|
|
display: none;
|
2020-02-26 00:15:50 +00:00
|
|
|
}
|
|
|
|
|
2020-02-26 03:07:35 +00:00
|
|
|
.search-compact {
|
|
|
|
display: flex;
|
2020-02-26 00:15:50 +00:00
|
|
|
}
|
2020-03-25 01:48:54 +00:00
|
|
|
|
2020-12-20 22:20:41 +00:00
|
|
|
.header-account {
|
|
|
|
padding: 1rem .5rem 1rem 1rem;
|
2020-03-25 01:48:54 +00:00
|
|
|
}
|
2020-02-26 00:15:50 +00:00
|
|
|
}
|
|
|
|
|
2020-09-11 01:13:51 +00:00
|
|
|
@media(max-width: $breakpoint-small) {
|
2020-03-25 01:48:54 +00:00
|
|
|
.sidebar-toggle {
|
2020-07-14 22:15:00 +00:00
|
|
|
display: flex;
|
2020-03-25 02:42:46 +00:00
|
|
|
}
|
2020-07-20 02:20:33 +00:00
|
|
|
|
2020-09-11 01:13:51 +00:00
|
|
|
.logo-link {
|
2021-01-17 22:43:00 +00:00
|
|
|
margin: -.25rem 1.25rem 0 0;
|
2020-09-11 01:13:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.nav-link {
|
2021-01-17 22:43:00 +00:00
|
|
|
padding: 0.05rem .75rem 0 .75rem;
|
2020-09-11 01:13:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.search-compact {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
|
2021-04-04 19:52:19 +00:00
|
|
|
.header-account,
|
|
|
|
.header-notifications {
|
2020-07-05 02:40:57 +00:00
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
}
|
2019-06-03 03:31:38 +00:00
|
|
|
</style>
|