generated from Seekra/repository-template
Search bar below navbar #98
@@ -89,7 +89,14 @@ watch(() => route.query.q, q => {
|
|||||||
height: 24px;
|
height: 24px;
|
||||||
width: auto;
|
width: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.search-bar {
|
.search-bar {
|
||||||
width: 70%;
|
width: 70%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media (max-width: 1000px) {
|
||||||
|
|
|||||||
|
.search-bar {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -16,11 +16,24 @@ limitations under the License.
|
|||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
|
import { ref, watch } from 'vue';
|
||||||
|
import { useRoute } from 'vue-router';
|
||||||
|
import Searchbar from '../components/Searchbar.vue';
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
const route = useRoute();
|
||||||
|
const searchQuery = ref(route.query.q || '');
|
||||||
|
|
||||||
|
watch(() => route.query.q, (newQuery) => {
|
||||||
|
searchQuery.value = newQuery || '';
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
<div class="search-results-view">
|
||||||
|
<div class="search-bar-container main-content-padding">
|
||||||
|
<Searchbar v-model="searchQuery" class="search-bar" auto-submit />
|
||||||
|
</div>
|
||||||
<div class="main-content-padding">
|
<div class="main-content-padding">
|
||||||
<div class="search-results-error-message-container">
|
<div class="search-results-error-message-container">
|
||||||
<div class="search-results-error-message">
|
<div class="search-results-error-message">
|
||||||
@@ -31,11 +44,31 @@ const { t } = useI18n();
|
|||||||
<div class="search-results-container">
|
<div class="search-results-container">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
.search-results-view {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.search-bar-container {
|
||||||
|
display: none;
|
||||||
|
justify-content: center;
|
||||||
|
padding-top: 30px;
|
||||||
|
padding-bottom: 30px;
|
||||||
|
border-bottom: 1px solid var(--border);
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 1000px) {
|
||||||
|
jakob.scheid
commented
Please use Please use `67.5rem` (the width where tablets begin)
|
|||||||
|
.search-bar-container {
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.search-bar {
|
.search-bar {
|
||||||
width: 50%;
|
width: 50%;
|
||||||
|
max-width: 624px;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: 67.5rem) {
|
@media (max-width: 67.5rem) {
|
||||||
|
|||||||
Reference in New Issue
Block a user
That is not a major device width break.
It‘s the critical width where it look bad
Please use
67.5rem(the width where tablets begin)