generated from Seekra/repository-template
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
8de1e946f8
|
|||
|
f3e663b88f
|
@@ -15,8 +15,6 @@ 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();
|
||||||
@@ -38,10 +36,11 @@ 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">
|
||||||
© {{ copyrightPeriod }} Seekra
|
<div class="copyright-note">
|
||||||
|
© {{ copyrightPeriod }} Seekra
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</footer>
|
</footer>
|
||||||
</template>
|
</template>
|
||||||
@@ -52,9 +51,6 @@ 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);
|
||||||
@@ -63,4 +59,9 @@ const copyrightPeriod =
|
|||||||
.global-footer a {
|
.global-footer a {
|
||||||
color: var(--dark);
|
color: var(--dark);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.copyright-note {
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
@@ -71,15 +71,7 @@ const open = function () {
|
|||||||
</span>
|
</span>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<ul
|
<ul v-if="isOpen" ref="languageDropdown" class="language-dropdown" role="listbox">
|
||||||
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"
|
||||||
@@ -96,7 +88,6 @@ const open = function () {
|
|||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.language-switch {
|
.language-switch {
|
||||||
--trigger-padding-y: 4px;
|
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -107,7 +98,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: var(--trigger-padding-y) 10px;
|
padding: 4px 10px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
color: var(--dark);
|
color: var(--dark);
|
||||||
}
|
}
|
||||||
@@ -127,9 +118,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,9 +15,25 @@ 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 NavbarSearchBarWrapper from './NavbarSearchBarWrapper.vue';
|
import Searchbar from '@/features/search/components/Searchbar.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>
|
||||||
@@ -25,16 +41,21 @@ import NavbarSearchBarWrapper from './NavbarSearchBarWrapper.vue';
|
|||||||
<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>
|
||||||
<NavbarSearchBarWrapper class="navbar-search-bar-wrapper" />
|
<Searchbar
|
||||||
|
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>
|
||||||
@@ -68,27 +89,7 @@ import NavbarSearchBarWrapper from './NavbarSearchBarWrapper.vue';
|
|||||||
height: 24px;
|
height: 24px;
|
||||||
width: auto;
|
width: auto;
|
||||||
}
|
}
|
||||||
|
.search-bar {
|
||||||
.navbar-search-bar-wrapper {
|
width: 70%;
|
||||||
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>
|
||||||
|
|||||||
@@ -1,43 +0,0 @@
|
|||||||
<!--
|
|
||||||
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" class="search-form">
|
<form @submit.prevent="submitSearch">
|
||||||
<div class="search-wrapper">
|
<div class="search-wrapper">
|
||||||
<input
|
<input
|
||||||
v-model="searchQuery"
|
v-model="searchQuery"
|
||||||
@@ -108,8 +108,4 @@ 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