next bug fixes

This commit is contained in:
Robin Grenzdörfer 2023-07-17 07:35:41 +00:00
parent 0e1de15d7c
commit 9e6dc31811
4 changed files with 23 additions and 14 deletions
api/collections/fieldLists
frontend/src/lib/components

@ -405,5 +405,5 @@
sort: path
projection: navigation
mapping:
id: id
id: id
name: path

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

@ -14,7 +14,7 @@
import TextLink from "../widgets/textLink.svelte"
import TopDown from "../widgets/topDown.svelte"
import WorldCard from "../widgets/Worldcard/worldcard.svelte"
import { rerender } from "../../store"
import { pages, rerender } from "../../store"
import IconCycleCircle from "../widgets/iconCycleCircle.svelte"
import IconCycleBox from "../widgets/iconCycleBox.svelte"
@ -31,9 +31,8 @@
}
return ""
}
}
$: console.log($pages)
let nestedPath = checkNestedPath()
</script>
@ -62,13 +61,17 @@
{#if row.subTitle}
<h3>{row.subTitle}</h3>
{/if}
<div class="row" class:dominant="{row.columns.some((col) => col.contentType == 'iconCycleCircle')}" >
<div class="row" class:dominant="{row.columns.some((col) => col.contentType == 'iconCycleCircle')}">
{#each row?.columns as col}
<div class="col" class:dominant="{col.contentType == 'iconCycleCircle'}">
{#if col?.contentType == "text"}
<Text text="{col?.text}" />
{: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"}
<Image image="{col?.image}" col="{col}" pageId="{pageId}" />
{:else if col.contentType == "iconBlocks"}

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