2023-12-30 05:29:53 +00:00
|
|
|
<template>
|
|
|
|
<header class="header">
|
|
|
|
<nav class="nav">
|
2024-02-22 04:08:06 +00:00
|
|
|
<Link href="/">
|
|
|
|
<h1 class="title">
|
|
|
|
<div
|
|
|
|
class="logo"
|
|
|
|
v-html="logo"
|
|
|
|
/>
|
|
|
|
</h1>
|
|
|
|
</Link>
|
|
|
|
|
2023-12-30 05:29:53 +00:00
|
|
|
<ul class="nav-list nolist">
|
|
|
|
<li class="nav-item">
|
|
|
|
<Link
|
|
|
|
class="link"
|
|
|
|
href="/updates"
|
|
|
|
>Updates</Link>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
<li class="nav-item">
|
|
|
|
<Link
|
|
|
|
class="link"
|
|
|
|
href="/actors"
|
|
|
|
>Actors</Link>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
<li class="nav-item">
|
|
|
|
<Link
|
|
|
|
class="link"
|
|
|
|
href="/channels"
|
|
|
|
>Channels</Link>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
<li class="nav-item">
|
|
|
|
<Link
|
|
|
|
class="link"
|
|
|
|
href="/tags"
|
|
|
|
>Tags</Link>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
<li class="nav-item">
|
|
|
|
<Link
|
|
|
|
class="link"
|
|
|
|
href="/movies"
|
|
|
|
>Movies</Link>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</nav>
|
2024-02-22 04:08:06 +00:00
|
|
|
|
|
|
|
<form
|
|
|
|
class="search"
|
|
|
|
@submit.prevent="search"
|
|
|
|
>
|
|
|
|
<input
|
|
|
|
v-model="query"
|
|
|
|
type="search"
|
|
|
|
placeholder="Search"
|
|
|
|
class="input"
|
|
|
|
>
|
|
|
|
|
|
|
|
<Icon icon="search" />
|
|
|
|
</form>
|
2023-12-30 05:29:53 +00:00
|
|
|
</header>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script setup>
|
2024-02-22 04:08:06 +00:00
|
|
|
import { ref, inject } from 'vue';
|
|
|
|
import navigate from '#/src/navigate.js';
|
|
|
|
|
2023-12-30 05:29:53 +00:00
|
|
|
import logo from '../../assets/img/logo.svg?raw'; // eslint-disable-line import/no-unresolved
|
2024-02-22 04:08:06 +00:00
|
|
|
|
|
|
|
const pageContext = inject('pageContext');
|
|
|
|
const query = ref(pageContext.urlParsed.search.q || '');
|
|
|
|
|
|
|
|
function search() {
|
|
|
|
navigate('/search', { q: query.value }, { redirect: true });
|
|
|
|
}
|
2023-12-30 05:29:53 +00:00
|
|
|
</script>
|
|
|
|
|
|
|
|
<style scoped>
|
|
|
|
.header {
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
2024-02-22 04:08:06 +00:00
|
|
|
justify-content: space-between;
|
2024-01-05 23:30:30 +00:00
|
|
|
z-index: 1000; /* make sure shadow shows up above content */
|
2023-12-30 05:29:53 +00:00
|
|
|
box-shadow: 0 0 3px var(--shadow-weak-10);
|
|
|
|
}
|
|
|
|
|
|
|
|
.title {
|
|
|
|
margin: 0;
|
|
|
|
display: inline-block;
|
|
|
|
}
|
|
|
|
|
|
|
|
.logo {
|
|
|
|
display: flex;
|
|
|
|
width: 8rem;
|
|
|
|
height: 3rem;
|
2024-01-03 01:52:41 +00:00
|
|
|
box-sizing: border-box;
|
2023-12-30 05:29:53 +00:00
|
|
|
padding: .75rem;
|
|
|
|
margin-right: 1rem;
|
|
|
|
fill: var(--primary);
|
|
|
|
}
|
|
|
|
|
|
|
|
.nav {
|
2024-02-22 04:08:06 +00:00
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
2023-12-30 05:29:53 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.nav-item .link {
|
|
|
|
font-size: .9rem;
|
|
|
|
color: var(--shadow-strong-10);
|
2024-01-03 01:52:41 +00:00
|
|
|
box-sizing: border-box;
|
2023-12-30 05:29:53 +00:00
|
|
|
padding: 1rem;
|
|
|
|
height: 100%;
|
|
|
|
|
|
|
|
&:hover {
|
|
|
|
text-decoration: none;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.link {
|
|
|
|
font-weight: bold;
|
|
|
|
|
|
|
|
&.active {
|
|
|
|
color: var(--primary);
|
|
|
|
}
|
|
|
|
}
|
2024-02-22 04:08:06 +00:00
|
|
|
|
|
|
|
.search {
|
|
|
|
height: 100%;
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
flex-direction: row-reverse;
|
|
|
|
|
|
|
|
.input {
|
|
|
|
height: 100%;
|
|
|
|
border: none;
|
|
|
|
border-radius: 0;
|
|
|
|
border-left: solid 1px var(--shadow-weak-30);
|
|
|
|
background: var(--background);
|
|
|
|
}
|
|
|
|
|
|
|
|
.icon {
|
|
|
|
margin-right: .75rem;
|
|
|
|
fill: var(--shadow-weak-10);
|
|
|
|
}
|
|
|
|
|
|
|
|
.input:focus + .icon {
|
|
|
|
fill: var(--primary);
|
|
|
|
}
|
|
|
|
}
|
2023-12-30 05:29:53 +00:00
|
|
|
</style>
|