Add Footer component

This commit is contained in:
2021-09-27 13:17:31 +02:00
parent 8744f05a95
commit 21862fd629
3 changed files with 52 additions and 4 deletions

View File

@@ -0,0 +1,41 @@
<script lang="ts">
import { getContext } from 'svelte'
// Components
import SiteTitle from '$components/atoms/SiteTitle.svelte'
const { settings: { instagram, footer_links }}: any = getContext('global')
</script>
<footer class="footer">
<div class="container">
<SiteTitle />
<nav class="footer__links">
<ul>
{#each footer_links as { title, slug }}
<li>
<a href={slug} sveltekit:prefetch>
{title}
</a>
</li>
{/each}
<li class="instagram">
<a href="https://www.instagram.com/{instagram}" target="_blank" rel="noopener noreferrer external">
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill="#fff" fill-rule="evenodd" clip-rule="evenodd" d="M10 1.8c2.67 0 2.99.01 4.04.06.98.04 1.5.2 1.86.34a3.27 3.27 0 0 1 1.9 1.9c.13.35.3.88.34 1.86.05 1.05.06 1.37.06 4.04s-.01 2.99-.06 4.04c-.04.98-.2 1.5-.34 1.86-.19.46-.4.8-.75 1.15a3.1 3.1 0 0 1-1.15.75c-.35.13-.88.3-1.86.34-1.05.05-1.37.06-4.04.06s-2.99-.01-4.04-.06c-.98-.04-1.5-.2-1.86-.34a3.1 3.1 0 0 1-1.15-.75 3.1 3.1 0 0 1-.75-1.15 5.6 5.6 0 0 1-.34-1.86A69.42 69.42 0 0 1 1.8 10c0-2.67.01-2.99.06-4.04.04-.98.2-1.5.34-1.86.19-.46.4-.8.75-1.15A3.1 3.1 0 0 1 4.1 2.2c.35-.13.88-.3 1.86-.34C7 1.81 7.33 1.8 10 1.8ZM10 0C7.28 0 6.94.01 5.88.06 4.8.11 4.08.28 3.45.52a4.9 4.9 0 0 0-1.77 1.16A4.9 4.9 0 0 0 .52 3.45a7.34 7.34 0 0 0-.46 2.43C.01 6.94 0 7.28 0 10s.01 3.06.06 4.12c.05 1.07.22 1.8.46 2.43.26.66.6 1.22 1.16 1.77.55.56 1.11.9 1.77 1.16a7.6 7.6 0 0 0 2.43.46c1.06.05 1.4.06 4.12.06s3.06-.01 4.12-.06a7.34 7.34 0 0 0 2.43-.46 4.9 4.9 0 0 0 1.77-1.16 4.9 4.9 0 0 0 1.16-1.77 7.6 7.6 0 0 0 .46-2.43c.05-1.06.06-1.4.06-4.12s-.01-3.06-.06-4.12a7.34 7.34 0 0 0-.46-2.43 4.9 4.9 0 0 0-1.16-1.77A4.9 4.9 0 0 0 16.55.52a7.34 7.34 0 0 0-2.43-.46C13.06.01 12.72 0 10 0Zm0 4.86a5.14 5.14 0 1 0 0 10.28 5.14 5.14 0 0 0 0-10.28Zm0 8.47a3.33 3.33 0 1 1 0-6.66 3.33 3.33 0 0 1 0 6.66Zm5.34-7.47a1.2 1.2 0 1 0 0-2.4 1.2 1.2 0 0 0 0 2.4Z" />
</svg>
<span>Instagram</span>
</a>
</li>
</ul>
</nav>
<div class="ctf">
<span>A project from</span>
<a href="https://cetrucflotte.com" target="_blank" rel="noopener external">
<img src="/images/logo-ctf.svg" alt="Cetrucflotte logo" width="140" height="24">
</a>
</div>
</div>
</footer>

View File

@@ -1,8 +1,9 @@
<script lang="ts">
import { setContext } from 'svelte'
// Other
import '$utils/polyfills'
import '../style/style.scss'
import { setContext } from 'svelte'
import '$utils/polyfills'
// Components
import Footer from '$components/organisms/Footer.svelte'
export let data: any
@@ -14,6 +15,8 @@
<slot />
<Footer />
<script context="module" lang="ts">
import { fetchAPI } from '$utils/api'
@@ -50,6 +53,8 @@
seo_name
seo_title
seo_description
instagram
footer_links
}
}
`)