generated from Seekra/repository-template
Compare commits
18 Commits
946251799b
...
7bf44ca720
| Author | SHA1 | Date | |
|---|---|---|---|
|
7bf44ca720
|
|||
|
53c7cb1c79
|
|||
|
368747f323
|
|||
|
a46a4da005
|
|||
|
5e15c01ed6
|
|||
|
c64539539d
|
|||
|
fea440edaa
|
|||
|
47744e7be6
|
|||
|
6a31373b7d
|
|||
|
a824ee57df
|
|||
|
9ed8790649
|
|||
|
dd678fb393
|
|||
|
17570d400d
|
|||
|
cabebfb9fe
|
|||
|
9b175e3923
|
|||
|
873bd74804
|
|||
|
0df77ef6ee
|
|||
|
4daf550568
|
@@ -15,6 +15,8 @@ limitations under the License.
|
|||||||
-->
|
-->
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
|
import LanguageSwitchButton from '@/features/i18n/components/LanguageSwitchButton.vue';
|
||||||
|
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
@@ -36,11 +38,10 @@ const copyrightPeriod =
|
|||||||
<RouterLink to="settings" class="link">
|
<RouterLink to="settings" class="link">
|
||||||
{{ t('preferences.settings') }}
|
{{ t('preferences.settings') }}
|
||||||
</RouterLink>
|
</RouterLink>
|
||||||
|
<LanguageSwitchButton />
|
||||||
</div>
|
</div>
|
||||||
<div class="footer-segment">
|
<div class="footer-segment">
|
||||||
<div class="copyright-note">
|
© {{ copyrightPeriod }} Seekra
|
||||||
© {{ copyrightPeriod }} Seekra
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</footer>
|
</footer>
|
||||||
</template>
|
</template>
|
||||||
@@ -51,6 +52,9 @@ const copyrightPeriod =
|
|||||||
}
|
}
|
||||||
|
|
||||||
.footer-segment {
|
.footer-segment {
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
gap: 32px;
|
||||||
padding: var(--padding-y);
|
padding: var(--padding-y);
|
||||||
background-color: var(--light-bg);
|
background-color: var(--light-bg);
|
||||||
border-top: 1px solid var(--border);
|
border-top: 1px solid var(--border);
|
||||||
@@ -59,9 +63,4 @@ const copyrightPeriod =
|
|||||||
.global-footer a {
|
.global-footer a {
|
||||||
color: var(--dark);
|
color: var(--dark);
|
||||||
}
|
}
|
||||||
|
|
||||||
.copyright-note {
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
@@ -71,7 +71,15 @@ const open = function () {
|
|||||||
</span>
|
</span>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<ul v-if="isOpen" ref="languageDropdown" class="language-dropdown" role="listbox">
|
<ul
|
||||||
|
v-if="isOpen"
|
||||||
|
ref="languageDropdown"
|
||||||
|
class="language-dropdown"
|
||||||
|
role="listbox"
|
||||||
|
:style="{
|
||||||
|
bottom: 'calc(var(--offset) + 2 * var(--trigger-padding-y) + 1em)' // easier to add auto adaption to the available space
|
||||||
|
}"
|
||||||
|
>
|
||||||
<li
|
<li
|
||||||
v-for="lang in SUPPORTED_LANGUAGES"
|
v-for="lang in SUPPORTED_LANGUAGES"
|
||||||
:key="lang"
|
:key="lang"
|
||||||
@@ -88,6 +96,7 @@ const open = function () {
|
|||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.language-switch {
|
.language-switch {
|
||||||
|
--trigger-padding-y: 4px;
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -98,7 +107,7 @@ const open = function () {
|
|||||||
background: none;
|
background: none;
|
||||||
border: 1px solid var(--border);
|
border: 1px solid var(--border);
|
||||||
border-radius: 6px;
|
border-radius: 6px;
|
||||||
padding: 4px 10px;
|
padding: var(--trigger-padding-y) 10px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
color: var(--dark);
|
color: var(--dark);
|
||||||
}
|
}
|
||||||
@@ -118,9 +127,9 @@ const open = function () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.language-dropdown {
|
.language-dropdown {
|
||||||
|
--offset: 6px;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
right: 0;
|
right: 0;
|
||||||
top: calc(100% + 6px);
|
|
||||||
background-color: var(--light-bg);
|
background-color: var(--light-bg);
|
||||||
border: 1px solid var(--border);
|
border: 1px solid var(--border);
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
|
|||||||
@@ -15,25 +15,9 @@ limitations under the License.
|
|||||||
-->
|
-->
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref, watch } from 'vue';
|
|
||||||
import { useRoute } from 'vue-router';
|
|
||||||
import ColorSchemeButton from '@/features/colorScheme/components/ColorSchemeButton.vue';
|
import ColorSchemeButton from '@/features/colorScheme/components/ColorSchemeButton.vue';
|
||||||
import LanguageSwitchButton from '@/features/i18n/components/LanguageSwitchButton.vue';
|
|
||||||
import logo from '@/assets/images/logo.svg';
|
import logo from '@/assets/images/logo.svg';
|
||||||
import Searchbar from '@/features/search/components/Searchbar.vue';
|
import NavbarSearchBarWrapper from './NavbarSearchBarWrapper.vue';
|
||||||
|
|
||||||
const route = useRoute();
|
|
||||||
const searchQueryModel = defineModel();
|
|
||||||
|
|
||||||
watch(() => route.name, name => {
|
|
||||||
searchQueryModel.value = name === 'searchResults' ? route.query.q || '' : '';
|
|
||||||
});
|
|
||||||
|
|
||||||
watch(() => route.query.q, q => {
|
|
||||||
if (route.name === 'searchResults') {
|
|
||||||
searchQueryModel.value = q || '';
|
|
||||||
}
|
|
||||||
});
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
@@ -41,21 +25,16 @@ watch(() => route.query.q, q => {
|
|||||||
<RouterLink to="/" class="link button link">
|
<RouterLink to="/" class="link button link">
|
||||||
<img :src="logo" alt="Seekra" class="nav-logo" />
|
<img :src="logo" alt="Seekra" class="nav-logo" />
|
||||||
</RouterLink>
|
</RouterLink>
|
||||||
<Searchbar
|
<NavbarSearchBarWrapper class="navbar-search-bar-wrapper" />
|
||||||
v-if="route.name === 'searchResults'"
|
|
||||||
class="search-bar"
|
|
||||||
v-model="searchQueryModel"
|
|
||||||
auto-submit
|
|
||||||
/>
|
|
||||||
<ul class="right-links">
|
<ul class="right-links">
|
||||||
<li>
|
|
||||||
<LanguageSwitchButton />
|
|
||||||
</li>
|
|
||||||
<li>
|
<li>
|
||||||
<ColorSchemeButton />
|
<ColorSchemeButton />
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</nav>
|
</nav>
|
||||||
|
<div class="navbar-search-bar-wrapper-small-screens-wrapper">
|
||||||
|
<NavbarSearchBarWrapper class="navbar-search-bar-wrapper-small-screens" />
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
@@ -89,7 +68,27 @@ watch(() => route.query.q, q => {
|
|||||||
height: 24px;
|
height: 24px;
|
||||||
width: auto;
|
width: auto;
|
||||||
}
|
}
|
||||||
.search-bar {
|
|
||||||
width: 70%;
|
.navbar-search-bar-wrapper {
|
||||||
|
width: 100%;
|
||||||
|
padding: 0 30px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.navbar-search-bar-wrapper-small-screens-wrapper {
|
||||||
|
padding: 0 15px 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.navbar-search-bar-wrapper-small-screens {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 48rem) {
|
||||||
|
.navbar-search-bar-wrapper {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.navbar-search-bar-wrapper-small-screens {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -0,0 +1,43 @@
|
|||||||
|
<!--
|
||||||
|
Copyright 2026 Seekra
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
-->
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import Searchbar from '@/features/search/components/Searchbar.vue';
|
||||||
|
|
||||||
|
import { watch } from 'vue';
|
||||||
|
import { useRoute } from 'vue-router';
|
||||||
|
|
||||||
|
const route = useRoute();
|
||||||
|
const searchQueryModel = defineModel();
|
||||||
|
|
||||||
|
watch(() => route.name, name => {
|
||||||
|
searchQueryModel.value = name === 'searchResults' ? route.query.q || '' : '';
|
||||||
|
});
|
||||||
|
|
||||||
|
watch(() => route.query.q, q => {
|
||||||
|
if (route.name === 'searchResults') {
|
||||||
|
searchQueryModel.value = q || '';
|
||||||
|
}
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<Searchbar
|
||||||
|
v-if="route.name === 'searchResults'"
|
||||||
|
v-model="searchQueryModel"
|
||||||
|
auto-submit
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
@@ -39,7 +39,7 @@ const submitSearch = function () {
|
|||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<form @submit.prevent="submitSearch">
|
<form @submit.prevent="submitSearch" class="search-form">
|
||||||
<div class="search-wrapper">
|
<div class="search-wrapper">
|
||||||
<input
|
<input
|
||||||
v-model="searchQuery"
|
v-model="searchQuery"
|
||||||
@@ -108,4 +108,8 @@ const submitSearch = function () {
|
|||||||
.search-button:hover {
|
.search-button:hover {
|
||||||
background: var(--primary-color-l-1);
|
background: var(--primary-color-l-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.search-form {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
Reference in New Issue
Block a user