2023-07-13 22:45:49 +02:00
|
|
|
<script lang="ts">
|
2023-07-16 08:21:49 +02:00
|
|
|
import { navigate } from "svelte-routing/src/history"
|
|
|
|
import { navigation, pages, rerender } from "../store"
|
|
|
|
let nextpage = $navigation?.pages[0]
|
2023-07-16 13:50:53 +02:00
|
|
|
$: nextpage = $navigation?.pages[0]
|
2023-07-16 08:21:49 +02:00
|
|
|
function getNextPage(pages) {
|
2023-07-16 13:50:53 +02:00
|
|
|
if (location.pathname == "/" || location.pathname == "") return
|
2023-07-17 09:24:08 +02:00
|
|
|
|
2023-07-16 08:21:49 +02:00
|
|
|
let currPage = pages.find(
|
|
|
|
(page) => Object.values($pages)?.find((o) => o.id == page.page)?.path == location.pathname
|
|
|
|
)
|
|
|
|
|
|
|
|
let currIndex = pages.indexOf(currPage)
|
|
|
|
let nextIndex
|
|
|
|
if (pages.length - 1 == currIndex) {
|
|
|
|
nextIndex = 0
|
|
|
|
} else {
|
|
|
|
nextIndex = currIndex + 1
|
|
|
|
}
|
|
|
|
nextpage = pages[nextIndex]
|
|
|
|
}
|
2023-08-17 10:01:56 +02:00
|
|
|
let blackBg = false
|
2023-07-16 08:21:49 +02:00
|
|
|
setInterval(() => {
|
2023-08-17 10:01:56 +02:00
|
|
|
if (location.pathname == "/") {
|
|
|
|
blackBg = true
|
|
|
|
} else {
|
|
|
|
blackBg = false
|
|
|
|
}
|
2023-07-16 08:21:49 +02:00
|
|
|
getNextPage($navigation.pages)
|
2023-07-17 09:35:41 +02:00
|
|
|
|
|
|
|
if (location.pathname.split("/").filter((s) => s).length >= 2) {
|
|
|
|
showNext = false
|
|
|
|
} else {
|
|
|
|
showNext = true
|
|
|
|
}
|
2023-07-16 08:21:49 +02:00
|
|
|
}, 1000)
|
2023-07-17 09:24:08 +02:00
|
|
|
let showNext = true
|
2023-07-16 08:21:49 +02:00
|
|
|
$: {
|
|
|
|
if ($rerender) {
|
|
|
|
if (location.pathname != "/") {
|
|
|
|
getNextPage($navigation.pages)
|
|
|
|
}
|
2023-07-17 09:35:41 +02:00
|
|
|
}
|
|
|
|
if (location.pathname.split("/").filter((s) => s).length >= 2) {
|
|
|
|
showNext = false
|
|
|
|
} else {
|
|
|
|
showNext = true
|
2023-07-16 08:21:49 +02:00
|
|
|
}
|
|
|
|
}
|
2023-07-13 22:45:49 +02:00
|
|
|
</script>
|
|
|
|
|
2023-08-17 10:01:56 +02:00
|
|
|
<div class="footer" class:black-bg="{blackBg}">
|
2023-07-17 09:24:08 +02:00
|
|
|
{#if showNext}
|
|
|
|
<button
|
|
|
|
class="upper-part"
|
|
|
|
on:click="{() => {
|
|
|
|
$rerender = $rerender + 1
|
|
|
|
navigate(Object.values($pages)?.find((o) => o.id == nextpage.page)?.path || '/')
|
|
|
|
}}"
|
|
|
|
>
|
|
|
|
<div class="upper"><img src="/media/arrow-right.svg" alt="arrow" /> nächstes Thema</div>
|
|
|
|
<div class="lower">{nextpage?.name}</div>
|
|
|
|
</button>{/if}
|
2023-07-13 22:45:49 +02:00
|
|
|
<div class="lower-part">
|
2023-08-15 14:48:43 +02:00
|
|
|
<div class="container">
|
|
|
|
<div class="links">
|
2023-08-17 10:49:24 +02:00
|
|
|
<button
|
|
|
|
on:click="{() => {
|
|
|
|
$rerender = $rerender + 1
|
|
|
|
navigate('/datenschutz')
|
|
|
|
}}">Datenschutz</button
|
|
|
|
>
|
|
|
|
<button
|
|
|
|
on:click="{() => {
|
|
|
|
$rerender = $rerender + 1
|
|
|
|
navigate('/impressum')
|
|
|
|
}}">Impressum</button
|
|
|
|
>
|
2023-08-15 14:48:43 +02:00
|
|
|
</div>
|
|
|
|
<div class="contact">
|
|
|
|
<button>0711 644 700-0</button>
|
2023-07-16 13:50:53 +02:00
|
|
|
|
2023-08-15 14:48:43 +02:00
|
|
|
<button> <a href="mailto:info@fontis.de" class="button"> info@fontis.de</a></button>
|
|
|
|
</div>
|
2023-07-13 22:45:49 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<style lang="less">
|
|
|
|
@import "../assets/css/main.less";
|
|
|
|
.footer {
|
2023-08-17 10:01:56 +02:00
|
|
|
padding-top: 80px;
|
2023-07-13 22:45:49 +02:00
|
|
|
display: flex;
|
2023-07-19 17:22:20 +02:00
|
|
|
position: relative;
|
|
|
|
z-index: 1000;
|
2023-07-13 22:45:49 +02:00
|
|
|
flex-direction: column;
|
|
|
|
align-items: flex-end;
|
|
|
|
color: @font-color-secondary;
|
2023-08-17 10:01:56 +02:00
|
|
|
&.black-bg {
|
2023-08-17 10:46:02 +02:00
|
|
|
margin-top: -10px;
|
2023-08-17 10:01:56 +02:00
|
|
|
background-color: @bg-color-secondary;
|
|
|
|
}
|
2023-07-13 22:45:49 +02:00
|
|
|
.upper-part {
|
2023-07-16 08:21:49 +02:00
|
|
|
background-color: @bg-color-secondary;
|
2023-07-13 22:45:49 +02:00
|
|
|
padding: 10px 40px;
|
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
|
|
|
width: fit-content;
|
|
|
|
.upper {
|
|
|
|
color: @font-color-secondary;
|
|
|
|
font-size: 12px;
|
|
|
|
display: flex;
|
|
|
|
gap: 10px;
|
|
|
|
@media @tablet {
|
|
|
|
font-size: 14px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
.lower {
|
|
|
|
color: @font-color-secondary;
|
|
|
|
font-size: 22px;
|
2023-09-01 15:46:53 +02:00
|
|
|
font-family: "Libre Caslon Text", serif;
|
2023-07-13 22:45:49 +02:00
|
|
|
@media @tablet {
|
|
|
|
font-size: 24px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.lower-part {
|
2023-08-15 14:48:43 +02:00
|
|
|
padding: 40px 20px;
|
2023-07-16 08:21:49 +02:00
|
|
|
background-color: @bg-color-secondary;
|
2023-07-13 22:45:49 +02:00
|
|
|
width: 100%;
|
|
|
|
display: flex;
|
2023-08-15 14:48:43 +02:00
|
|
|
justify-content: center;
|
|
|
|
.container {
|
2023-09-08 15:42:48 +02:00
|
|
|
max-width: 1400px;
|
2023-08-15 14:48:43 +02:00
|
|
|
width: 100%;
|
2023-07-13 22:45:49 +02:00
|
|
|
display: flex;
|
2023-08-15 14:48:43 +02:00
|
|
|
padding: 0px 2.5vw;
|
|
|
|
flex-direction: column;
|
2023-07-13 22:45:49 +02:00
|
|
|
.links,
|
|
|
|
.contact {
|
|
|
|
display: flex;
|
2023-08-15 14:48:43 +02:00
|
|
|
justify-content: space-between;
|
|
|
|
padding: 10px 0px;
|
|
|
|
}
|
|
|
|
button {
|
|
|
|
color: @font-color-secondary;
|
|
|
|
a {
|
|
|
|
color: @font-color-secondary;
|
|
|
|
font-weight: normal;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@media @tablet {
|
|
|
|
padding: 80px 2.5vw;
|
|
|
|
flex-direction: row;
|
|
|
|
justify-content: space-between;
|
|
|
|
.links,
|
|
|
|
.contact {
|
|
|
|
display: flex;
|
|
|
|
justify-content: flex-start;
|
|
|
|
gap: 40px;
|
|
|
|
padding: 0px;
|
|
|
|
}
|
2023-07-13 22:45:49 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</style>
|