v2.15.0

Footer

Адаптивный подвал для копирайта, ссылок и дополнительной информации.

Использование

Компонент Footer отрисовывает элемент <footer>.

Слоты left, default и right настраивают содержимое подвала.

<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-service/Bitrix24Icon'

const items: NavigationMenuItem[] = [
  {
    label: 'REST API',
    to: 'https://apidocs.bitrix24.com',
    target: '_blank'
  },
  {
    label: 'Релизы',
    to: 'https://github.com/bitrix24/b24ui/releases',
    target: '_blank'
  }
]
</script>

<template>
  <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>
</template>
В этом примере ссылки подвала по центру отрисованы компонентом NavigationMenu.
Список ссылок внутри слота top можно вывести компонентом FooterColumns.

Примеры

В 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

Пропсы

Prop Default Type
as'footer'any

The element or component this component should render as.

b24ui { root?: SlotClass; top?: SlotClass; bottom?: SlotClass; container?: SlotClass; left?: SlotClass; center?: SlotClass; right?: SlotClass; }

Слоты

Slot Type
left{}
default{}
right{}
top{}
bottom{}

Тема

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'
  }
}