next bug fixes

This commit is contained in:
2023-07-17 07:35:41 +00:00
parent 0e1de15d7c
commit 9e6dc31811
4 changed files with 23 additions and 14 deletions

View File

@@ -21,6 +21,12 @@
} }
setInterval(() => { setInterval(() => {
getNextPage($navigation.pages) getNextPage($navigation.pages)
if (location.pathname.split("/").filter((s) => s).length >= 2) {
showNext = false
} else {
showNext = true
}
}, 1000) }, 1000)
let showNext = true let showNext = true
$: { $: {
@@ -28,13 +34,13 @@
if (location.pathname != "/") { if (location.pathname != "/") {
getNextPage($navigation.pages) getNextPage($navigation.pages)
} }
if (location.pathname.split("/").length >= 2) { }
if (location.pathname.split("/").filter((s) => s).length >= 2) {
showNext = false showNext = false
} else { } else {
showNext = true showNext = true
} }
} }
}
</script> </script>
<div class="footer"> <div class="footer">

View File

@@ -14,7 +14,7 @@
import TextLink from "../widgets/textLink.svelte" import TextLink from "../widgets/textLink.svelte"
import TopDown from "../widgets/topDown.svelte" import TopDown from "../widgets/topDown.svelte"
import WorldCard from "../widgets/Worldcard/worldcard.svelte" import WorldCard from "../widgets/Worldcard/worldcard.svelte"
import { rerender } from "../../store" import { pages, rerender } from "../../store"
import IconCycleCircle from "../widgets/iconCycleCircle.svelte" import IconCycleCircle from "../widgets/iconCycleCircle.svelte"
import IconCycleBox from "../widgets/iconCycleBox.svelte" import IconCycleBox from "../widgets/iconCycleBox.svelte"
@@ -32,8 +32,7 @@
return "" return ""
} }
$: console.log($pages)
let nestedPath = checkNestedPath() let nestedPath = checkNestedPath()
</script> </script>
@@ -68,7 +67,11 @@
{#if col?.contentType == "text"} {#if col?.contentType == "text"}
<Text text="{col?.text}" /> <Text text="{col?.text}" />
{:else if col?.contentType == "textLink"} {:else if col?.contentType == "textLink"}
<TextLink description="{col?.textLink?.text}" path="{col?.textLink?.link}" bright="{bright}" /> <TextLink
description="{col?.textLink?.text}"
path="{Object.values($pages)?.find((o) => o.id == col.textLink.link)?.path || '/'}"
bright="{bright}"
/>
{:else if col.contentType == "image"} {:else if col.contentType == "image"}
<Image image="{col?.image}" col="{col}" pageId="{pageId}" /> <Image image="{col?.image}" col="{col}" pageId="{pageId}" />
{:else if col.contentType == "iconBlocks"} {:else if col.contentType == "iconBlocks"}

View File

@@ -6,12 +6,12 @@
<div class="link-container"> <div class="link-container">
{#each col.pageLinkBlocks as link} {#each col.pageLinkBlocks as link}
{#if isNaN(link.rowNr)} {#if isNaN(link.extendableRowNr)}
<button <button
class="page-ref" class="page-ref"
on:click="{() => { on:click="{() => {
$rerender = $rerender + 1 $rerender = $rerender + 1
$scrollToRowNr = link.rowNr
navigate(Object.values($pages)?.find((o) => o.id == link.page)?.path || '/') navigate(Object.values($pages)?.find((o) => o.id == link.page)?.path || '/')
}}" }}"
> >