2019-06-03 03:31:38 +00:00
|
|
|
<template>
|
|
|
|
<header class="header">
|
2020-03-08 03:31:19 +00:00
|
|
|
<div class="header-nav">
|
2020-03-25 01:48:54 +00:00
|
|
|
<Icon
|
2020-03-26 02:32:07 +00:00
|
|
|
icon="menu"
|
2020-03-25 01:48:54 +00:00
|
|
|
class="sidebar-toggle"
|
|
|
|
@click.native.stop="toggleSidebar"
|
|
|
|
/>
|
|
|
|
|
2020-02-26 00:15:50 +00:00
|
|
|
<router-link
|
2020-05-08 23:10:07 +00:00
|
|
|
to="/"
|
2020-02-26 00:15:50 +00:00
|
|
|
class="logo-link"
|
2020-03-25 02:42:46 +00:00
|
|
|
><h1 class="header-logo">
|
|
|
|
<div
|
|
|
|
class="logo"
|
|
|
|
v-html="logo"
|
2020-03-08 16:09:33 +00:00
|
|
|
/>
|
|
|
|
</h1></router-link>
|
2020-02-26 00:15:50 +00:00
|
|
|
|
|
|
|
<nav class="nav">
|
2020-03-25 02:42:46 +00:00
|
|
|
<ul class="nav-list nolist">
|
2020-02-26 00:15:50 +00:00
|
|
|
<li class="nav-item">
|
|
|
|
<router-link
|
|
|
|
v-slot="{ href, isActive, navigate }"
|
|
|
|
to="/actors"
|
2020-02-10 01:05:28 +00:00
|
|
|
>
|
2020-02-26 00:15:50 +00:00
|
|
|
<a
|
|
|
|
class="nav-link"
|
|
|
|
:href="href"
|
|
|
|
:class="{ active: isActive }"
|
|
|
|
@click="navigate"
|
2020-03-07 22:40:38 +00:00
|
|
|
>Actors</a>
|
2020-02-26 00:15:50 +00:00
|
|
|
</router-link>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
<li class="nav-item">
|
|
|
|
<router-link
|
|
|
|
v-slot="{ href, isActive, navigate }"
|
|
|
|
to="/networks"
|
2020-02-10 01:05:28 +00:00
|
|
|
>
|
2020-02-26 00:15:50 +00:00
|
|
|
<a
|
|
|
|
class="nav-link"
|
|
|
|
:href="href"
|
|
|
|
:class="{ active: isActive }"
|
|
|
|
@click="navigate"
|
2020-03-07 22:40:38 +00:00
|
|
|
>Networks</a>
|
2020-02-26 00:15:50 +00:00
|
|
|
</router-link>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
<li class="nav-item">
|
|
|
|
<router-link
|
|
|
|
v-slot="{ href, isActive, navigate }"
|
|
|
|
to="/tags"
|
2020-02-10 01:05:28 +00:00
|
|
|
>
|
2020-02-26 00:15:50 +00:00
|
|
|
<a
|
|
|
|
class="nav-link"
|
|
|
|
:href="href"
|
|
|
|
:class="{ active: isActive }"
|
|
|
|
@click="navigate"
|
2020-03-07 22:40:38 +00:00
|
|
|
>Tags</a>
|
2020-02-26 00:15:50 +00:00
|
|
|
</router-link>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</nav>
|
|
|
|
</div>
|
|
|
|
|
2020-03-23 00:43:49 +00:00
|
|
|
<div class="header-section">
|
|
|
|
<div class="header-toggles">
|
|
|
|
<Icon
|
|
|
|
v-show="!sfw"
|
|
|
|
icon="flower"
|
|
|
|
class="toggle noselect"
|
|
|
|
@click.native="setSfw(true)"
|
|
|
|
/>
|
|
|
|
|
|
|
|
<Icon
|
|
|
|
v-show="sfw"
|
|
|
|
icon="flower"
|
|
|
|
class="toggle active noselect"
|
|
|
|
@click.native="setSfw(false)"
|
|
|
|
/>
|
|
|
|
|
|
|
|
<Icon
|
|
|
|
v-show="theme === 'light'"
|
|
|
|
icon="moon"
|
|
|
|
class="toggle noselect"
|
|
|
|
@click.native="setTheme('dark')"
|
|
|
|
/>
|
|
|
|
|
|
|
|
<Icon
|
|
|
|
v-show="theme === 'dark'"
|
|
|
|
icon="sun"
|
|
|
|
class="toggle noselect"
|
|
|
|
@click.native="setTheme('light')"
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<Search class="search-full" />
|
|
|
|
|
|
|
|
<v-popover
|
|
|
|
class="search-compact"
|
|
|
|
:open="searching"
|
|
|
|
@show="searching = true"
|
|
|
|
@hide="searching = false"
|
|
|
|
>
|
|
|
|
<button
|
|
|
|
type="button"
|
|
|
|
class="search-button"
|
|
|
|
><Icon
|
|
|
|
icon="search"
|
|
|
|
/></button>
|
|
|
|
|
|
|
|
<Search
|
|
|
|
slot="popover"
|
|
|
|
:searching="searching"
|
|
|
|
class="compact"
|
|
|
|
@search="searching = false"
|
|
|
|
/>
|
|
|
|
</v-popover>
|
|
|
|
</div>
|
2019-06-03 03:31:38 +00:00
|
|
|
</header>
|
|
|
|
</template>
|
|
|
|
|
2020-02-26 00:15:50 +00:00
|
|
|
<script>
|
2020-03-23 00:43:49 +00:00
|
|
|
import { mapState } from 'vuex';
|
|
|
|
|
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';
|
|
|
|
|
2020-03-23 00:43:49 +00:00
|
|
|
function sfw(state) {
|
|
|
|
return state.ui.sfw;
|
|
|
|
}
|
|
|
|
|
|
|
|
function theme(state) {
|
|
|
|
return state.ui.theme;
|
|
|
|
}
|
|
|
|
|
|
|
|
function setTheme(newTheme) {
|
|
|
|
this.$store.dispatch('setTheme', newTheme);
|
|
|
|
}
|
|
|
|
|
|
|
|
function setSfw(enabled) {
|
|
|
|
this.$store.dispatch('setSfw', enabled);
|
|
|
|
}
|
|
|
|
|
2020-02-26 00:15:50 +00:00
|
|
|
export default {
|
2020-02-26 03:07:35 +00:00
|
|
|
components: {
|
|
|
|
Search,
|
|
|
|
},
|
2020-03-25 01:48:54 +00:00
|
|
|
props: {
|
|
|
|
toggleSidebar: {
|
|
|
|
type: Function,
|
|
|
|
default: null,
|
|
|
|
},
|
|
|
|
},
|
2020-02-29 23:21:54 +00:00
|
|
|
data() {
|
|
|
|
return {
|
2020-03-25 02:42:46 +00:00
|
|
|
logo,
|
2020-02-29 23:21:54 +00:00
|
|
|
searching: false,
|
|
|
|
};
|
|
|
|
},
|
2020-03-23 00:43:49 +00:00
|
|
|
computed: {
|
|
|
|
...mapState({
|
|
|
|
sfw,
|
|
|
|
theme,
|
|
|
|
}),
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
setSfw,
|
|
|
|
setTheme,
|
|
|
|
},
|
2020-02-26 00:15:50 +00:00
|
|
|
};
|
|
|
|
</script>
|
|
|
|
|
2019-06-03 03:31:38 +00:00
|
|
|
<style lang="scss" scoped>
|
|
|
|
@import 'theme';
|
|
|
|
|
|
|
|
.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-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-03-25 02:42:46 +00:00
|
|
|
box-shadow: 0 1px 0 var(--darken-hint);
|
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-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-03-25 02:42:46 +00:00
|
|
|
fill: var(--shadow-modest);
|
2020-03-26 02:32:07 +00:00
|
|
|
padding: 0 1rem;
|
|
|
|
width: 1.5rem;
|
2020-03-25 01:48:54 +00:00
|
|
|
height: 100%;
|
|
|
|
|
|
|
|
&:hover {
|
|
|
|
fill: var(--primary);
|
|
|
|
cursor: pointer;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
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-03-25 02:42:46 +00:00
|
|
|
margin: 0 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-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);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.header-toggles {
|
|
|
|
margin: 0 .5rem 0 0;
|
|
|
|
|
|
|
|
.icon {
|
|
|
|
padding: 1rem .75rem;
|
|
|
|
fill: var(--shadow);
|
|
|
|
|
|
|
|
&:hover {
|
|
|
|
fill: var(--shadow-strong);
|
|
|
|
cursor: pointer;
|
|
|
|
}
|
|
|
|
|
|
|
|
&.active {
|
|
|
|
fill: var(--primary);
|
2019-12-01 04:32:47 +00:00
|
|
|
}
|
2019-11-30 04:55:32 +00:00
|
|
|
}
|
2019-06-03 03:31:38 +00:00
|
|
|
}
|
2019-12-04 20:58:08 +00:00
|
|
|
|
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-02-26 03:07:35 +00:00
|
|
|
@media(max-width: $breakpoint2) {
|
|
|
|
.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
|
|
|
|
|
|
|
.header-toggles {
|
|
|
|
margin: 0;
|
|
|
|
}
|
2020-02-26 00:15:50 +00:00
|
|
|
}
|
|
|
|
|
2019-12-04 20:58:08 +00:00
|
|
|
@media(max-width: $breakpoint0) {
|
2020-03-25 01:48:54 +00:00
|
|
|
.nav {
|
2019-12-04 20:58:08 +00:00
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
|
2020-03-25 01:48:54 +00:00
|
|
|
.sidebar-toggle {
|
|
|
|
display: inline-block;
|
2020-03-08 03:23:10 +00:00
|
|
|
}
|
2020-03-25 02:42:46 +00:00
|
|
|
|
|
|
|
.header-logo {
|
|
|
|
padding: 0 0 0 .5rem;
|
|
|
|
}
|
2019-12-04 20:58:08 +00:00
|
|
|
}
|
2019-06-03 03:31:38 +00:00
|
|
|
</style>
|