chore: merge components and stylesheets in same directory name

This commit is contained in:
2024-07-24 10:59:34 +02:00
parent a9d937a2b5
commit cb7d83978d
92 changed files with 533 additions and 531 deletions

View File

@@ -0,0 +1,128 @@
.footer {
background-color: $color-primary-darker;
padding: 24px 0 40px;
@include bp (sm) {
padding: 24px 0;
}
@include bp (md) {
padding: 0;
height: 120px;
}
.container {
justify-content: center;
height: 100%;
@include bp (sm) {
align-items: center;
}
}
// Site title
&__title {
grid-column: 1 / -1;
display: block;
margin: 0 auto 40px;
text-decoration: none;
@include bp (sm) {
grid-column: 2 / span 5;
grid-row: 1;
margin: auto 0 auto calc(var(--switcher-offset) + clamp(24px, 6vw, 8px));
}
:global(.site-title) {
line-height: 1;
}
// Hover
&:hover {
:global(strong), :global(span) {
color: #fff !important;
}
}
}
// Links
&__links {
grid-column: 1 / -1;
margin: 0 auto;
@include bp (sm) {
grid-column: 6 / span 18;
width: 100%;
grid-row: 1;
margin-top: 0.15em;
}
ul {
@include bp (sm) {
display: flex;
justify-content: flex-end;
}
}
li {
display: block;
@include bp (sm) {
margin-left: 4px;
}
@include bp (md) {
margin-left: 8px;
}
&:not(:last-child) {
margin-bottom: 12px;
@include bp (sm) {
margin-right: 4px;
margin-bottom: 0;
}
@include bp (md) {
margin-right: 8px;
}
}
}
a {
position: relative;
display: flex;
align-items: center;
justify-content: center;
padding: 0 8px;
color: #fff;
text-decoration: none;
font-size: rem(14px);
line-height: 1.3;
font-weight: 300;
@include bp (md) {
font-size: rem(16px);
justify-content: flex-end;
}
}
svg {
margin-right: 8px;
@include bp (md) {
margin-right: 12px;
}
}
// Instagram link
.instagram {
:global(svg) {
width: 1.2em;
height: auto;
transition: color 0.35s;
}
// Hover
a:hover {
svg {
color: $color-secondary;
}
}
}
}
}

View File

@@ -0,0 +1,45 @@
<style lang="scss">
@import "./Footer";
</style>
<script lang="ts">
import { getContext } from 'svelte'
// Components
import SplitText from '$components/SplitText.svelte'
import SiteTitle from '$components/atoms/SiteTitle/SiteTitle.svelte'
const { settings: { instagram, footer_links } }: any = getContext('global')
</script>
<footer class="footer">
<div class="container grid">
<a href="/" class="footer__title" tabindex="0" data-sveltekit-noscroll>
<SiteTitle tag="div" />
</a>
<nav class="footer__links">
<ul data-sveltekit-noscroll>
{#each footer_links as { title, slug }}
<li>
<a href="/{slug}" class="link-3d" tabindex="0">
<SplitText text={title} clone={true} />
</a>
</li>
{/each}
<li class="instagram">
<a href="https://www.instagram.com/{instagram}" target="_blank" rel="noopener noreferrer external" class="link-3d">
<svg width="20" height="20" viewBox="0 0 20 20" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
<path 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>
<SplitText
class="instagram__text"
text="Instagram"
clone={true}
/>
</a>
</li>
</ul>
</nav>
</div>
</footer>