coloring
All checks were successful
deploy to production / deploy (push) Successful in 42s

This commit is contained in:
2023-12-07 20:24:09 +00:00
parent f85efb3c38
commit fd5af432db
52 changed files with 638 additions and 328 deletions

View File

@@ -27,25 +27,29 @@
Object.assign(swiper, params)
swiper.initialize()
// Add the 'active' class to the h1 of the first slide
const firstSlideH1 = document.querySelector(".swiper-slide-active .titles h1")
if (firstSlideH1) {
firstSlideH1.classList.add("active")
if (typeof window !== "undefined") {
// Add the 'active' class to the h1 of the first slide
const firstSlideH1 = document.querySelector(".swiper-slide-active .titles h1")
if (firstSlideH1) {
firstSlideH1.classList.add("active")
}
}
}
})
function handleSlideChange() {
document.querySelectorAll(".titles h1").forEach((h1) => {
h1.classList.remove("active")
})
if (typeof window !== "undefined") {
document.querySelectorAll(".titles h1").forEach((h1) => {
h1.classList.remove("active")
})
setTimeout(() => {
const activeSlideUnderline = document.querySelector(".swiper-slide-active .titles h1")
if (activeSlideUnderline) {
activeSlideUnderline.classList.add("active")
}
}, 600)
setTimeout(() => {
const activeSlideUnderline = document.querySelector(".swiper-slide-active .titles h1")
if (activeSlideUnderline) {
activeSlideUnderline.classList.add("active")
}
}, 600)
}
}
let teaser = teasers[0]
</script>
@@ -135,6 +139,7 @@
line-height: 1;
font-weight: 500;
position: relative;
color: @signal-color;
}
h2 {

View File

@@ -26,9 +26,11 @@
export let i: number
export let page: Page
export let personPage: boolean
window.addEventListener("popstate", function (event) {
$rerender = $rerender + 1
})
if (typeof window !== "undefined") {
window.addEventListener("popstate", function (event) {
$rerender = $rerender + 1
})
}
</script>
{#if Object.keys(row).length}
@@ -140,6 +142,7 @@
h1 {
font-weight: 500;
font-size: 2rem;
color: @signal-color;
}
.top-header {
img {

View File

@@ -24,21 +24,23 @@
}
onMount(() => {
if ($scrollToRowNr !== -1) {
if (!$scrollToRowNr) {
$scrollToRowNr = -1
return
}
let element = document.getElementById("row-" + $scrollToRowNr)
if (!element) {
$scrollToRowNr = -1
return
}
if (typeof window !== "undefined") {
if ($scrollToRowNr !== -1) {
if (!$scrollToRowNr) {
$scrollToRowNr = -1
return
}
let element = document.getElementById("row-" + $scrollToRowNr)
if (!element) {
$scrollToRowNr = -1
return
}
element?.scrollIntoView({
behavior: "smooth",
})
$scrollToRowNr = -1
element?.scrollIntoView({
behavior: "smooth",
})
$scrollToRowNr = -1
}
}
})