Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#3380] Add menu button in docs navbar for mobile #3383

Merged
merged 3 commits into from
May 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 6 additions & 9 deletions packages/docs/components/AlgoliaSearch.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<script lang="ts" setup>
import docsearch from '@docsearch/js'
import { useI18n } from 'vue-i18n'
import { onMounted, unref as _unref } from 'vue'
import { onMounted } from 'vue'
import { useRouter } from 'vue-router'

const { locale } = useI18n()
Expand Down Expand Up @@ -120,10 +120,12 @@ onMounted(() => {
flex-grow: 1;
display: flex;

@include xs(flex-grow, 0);

.DocSearch-Button {
margin-left: 0;
flex-grow: 1;
max-width: 320px;
max-width: 20rem;
border-radius: var(--va-input-border-radius);
background-color: var(--va-background-element);

Expand All @@ -136,11 +138,10 @@ onMounted(() => {
}

.DocSearch-Button-Placeholder {
color: v-bind(placeholderColor);

@include md(display, block);
@include xs(display, none);

// TODO: This Vbind breaks build !
color: v-bind(placeholderColor);
}

.DocSearch-Button-Keys {
Expand All @@ -153,10 +154,6 @@ onMounted(() => {
@include sm(color, var(--va-primary));
}
}

@media screen and (max-width: $break_xs) {
flex-grow: 0;
}
}

.DocSearch-Modal {
Expand Down
6 changes: 3 additions & 3 deletions packages/docs/components/landing/Footer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
</template>

<script lang="ts" setup>
import { markRaw } from 'vue'
import { markRaw, computed } from 'vue'

import { useElementTextColor, useBreakpoint } from 'vuestic-ui'

Expand All @@ -100,7 +100,7 @@ const buttons = [
{ href: 'https://github.com/epicmaxco/epic-spinners', icon: IconSpinnersRaw, label: 'landing.footer.buttons.spinners' },
]

const sitemap = [
const sitemap = computed(() => ([
{
title: 'landing.footer.sitemap.resources[0]',
items: [
Expand Down Expand Up @@ -133,7 +133,7 @@ const sitemap = [
{ label: 'landing.footer.sitemap.about[3]', component: 'a', prop: 'href', value: 'mailto:[email protected]?subject=VuesticUI Partnership' },
]
},
]
]))
</script>

<style lang="scss" scoped>
Expand Down
Loading