generated from cms/tibi-docs
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user