Использование
Компонент Footer отрисовывает элемент <footer>.
Слоты left, default и right настраивают содержимое подвала.
В этом примере ссылки подвала по центру отрисованы компонентом NavigationMenu.
Примеры
В app.vue
Используйте Footer в app.vue или в раскладке:
app.vue
<script setup lang="ts">
import type { NavigationMenuItem } from '@bxshefby/b24ui-nuxt'
import GitHubIcon from '@bitrix24/b24icons-vue/social/GitHubIcon'
import Bitrix24Icon from '@bitrix24/b24icons-vue/common-b24/Bitrix24Icon'
const items: NavigationMenuItem[] = [
{
label: 'REST API',
to: 'https://apidocs.bitrix24.com',
target: '_blank'
},
{
label: 'Releases',
to: 'https://github.com/bitrix24/b24ui/releases',
target: '_blank'
}
]
</script>
<template>
<B24App>
<B24Header />
<B24Main>
<NuxtLayout>
<NuxtPage />
</NuxtLayout>
</B24Main>
<B24Separator type="dashed" class="h-px" />
<B24Footer>
<template #left>
<ProseP small accent="less">
Copyright © {{ new Date().getFullYear() }}
</ProseP>
</template>
<B24NavigationMenu :items="items" variant="link" />
<template #right>
<B24Button
color="air-selection"
:icon="Bitrix24Icon"
to="https://apidocs.bitrix24.com"
target="_blank"
aria-label="Bitrix24 REST API"
/>
<B24Button
:icon="GitHubIcon"
to="https://github.com/bitrix24/b24ui"
target="_blank"
aria-label="GitHub"
/>
</template>
</B24Footer>
</B24App>
</template>
В этом примере рамку над подвалом добавляет компонент Separator.
API
Пропсы
Слоты
Тема
https://github.com/bx-shef/b24-ui/tree/main/src/theme/footer.ts
export default {
slots: {
root: '',
top: 'py-8 lg:py-12',
bottom: 'py-8 lg:py-12',
container: 'py-8 lg:py-4 lg:flex lg:items-center lg:justify-between lg:gap-x-3',
left: 'flex items-center justify-center lg:justify-start lg:flex-1 gap-x-1.5 mt-3 lg:mt-0 lg:order-1',
center: 'mt-3 lg:mt-0 lg:order-2 flex items-center justify-center',
right: 'lg:flex-1 flex items-center justify-center lg:justify-end gap-x-1.5 lg:order-3'
}
}