blob: ceabfec8ac67c44d702ca8fa8c4e2ed471004537 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
<script lang="ts">
import { getI18n } from '~/stores/i18n';
import Footer, {
type Translate,
} from '@amp/web-app-components/src/components/Footer/Footer.svelte';
import LocaleSwitcherButton from '@amp/web-app-components/src/components/buttons/LocaleSwitcherButton/LocaleSwitcherButton.svelte';
import { items } from '~/constants/footer-items';
import { getLocale } from '~/utils/locale';
import {
regions,
languages,
storefrontNameTranslations,
} from '~/utils/storefront-data';
const i18n = getI18n();
const locale = getLocale();
const translate: Translate = (key, options) => $i18n.t(key, options);
</script>
<section class="footer-container">
<Footer footerItems={items} translateFn={translate}>
<LocaleSwitcherButton
slot="secondary-content"
translateFn={translate}
{regions}
{languages}
{locale}
{storefrontNameTranslations}
defaultRoute="iphone/today"
/>
</Footer>
</section>
<style lang="scss">
@use 'ac-sasskit/modules/viewportcontent/core' as *;
@use 'amp/stylekit/core/viewports' as *;
.footer-container {
background-color: var(--footerBg);
}
.footer-container :global(footer) {
max-width: calc(viewport-content-for(xlarge));
margin: 0 auto;
}
</style>
|