generated from cms/tibi-docs
This commit is contained in:
parent
11062fc0fb
commit
1b8e5fed12
@ -64,54 +64,55 @@
|
||||
{#if row.subTitle}
|
||||
<h3 class="subheading">{row.subTitle}</h3>
|
||||
{/if}
|
||||
<div
|
||||
class="row"
|
||||
class:twoToThree="{row.twoToThree}"
|
||||
class:normalWrap="{row.flexWrapNormal}"
|
||||
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="{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"}
|
||||
<IconBlock pageId="{pageId}" col="{col}" />
|
||||
{:else if col.contentType == "pageLinkBlocks"}
|
||||
<PageLinkBlocks col="{col}" />
|
||||
{:else if col.contentType == "networkEvents"}
|
||||
<Events col="{col}" pageId="{pageId}" />
|
||||
{:else if col.contentType == "publications"}
|
||||
<Publications col="{col}" pageId="{pageId}" />
|
||||
{:else if col.contentType == "topDown"}
|
||||
<TopDown col="{col}" />
|
||||
{:else if col.contentType == "infoBoard"}
|
||||
<InfoBoard col="{col}" pageId="{pageId}" />
|
||||
{:else if col.contentType == "nestedCard"}
|
||||
<NestedCard col="{col}" />
|
||||
{:else if col.contentType == "boxlist"}
|
||||
<Boxlist col="{col}" />
|
||||
{:else if col.contentType == "extendableBoxes"}
|
||||
<ExtendableBox col="{col}" />
|
||||
{:else if col.contentType == "personPreview"}
|
||||
<Persons col="{col}" pageId="{pageId}" />
|
||||
{:else if col.contentType == "iconCycleCircle"}
|
||||
<IconCycleCircle col="{col}" pageId="{pageId}" />
|
||||
{:else if col.contentType == "iconCycleSquare"}
|
||||
<IconCycleBox col="{col}" pageId="{pageId}" />
|
||||
{:else if col.contentType == "worldCard"}
|
||||
<WorldCard col="{col}" pageId="{pageId}" />
|
||||
{/if}
|
||||
</div>
|
||||
{/each}
|
||||
</div>
|
||||
{#if row?.columns?.length}
|
||||
<div
|
||||
class="row"
|
||||
class:twoToThree="{row.twoToThree}"
|
||||
class:normalWrap="{row.flexWrapNormal}"
|
||||
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="{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"}
|
||||
<IconBlock pageId="{pageId}" col="{col}" />
|
||||
{:else if col.contentType == "pageLinkBlocks"}
|
||||
<PageLinkBlocks col="{col}" />
|
||||
{:else if col.contentType == "networkEvents"}
|
||||
<Events col="{col}" pageId="{pageId}" />
|
||||
{:else if col.contentType == "publications"}
|
||||
<Publications col="{col}" pageId="{pageId}" />
|
||||
{:else if col.contentType == "topDown"}
|
||||
<TopDown col="{col}" />
|
||||
{:else if col.contentType == "infoBoard"}
|
||||
<InfoBoard col="{col}" pageId="{pageId}" />
|
||||
{:else if col.contentType == "nestedCard"}
|
||||
<NestedCard col="{col}" />
|
||||
{:else if col.contentType == "boxlist"}
|
||||
<Boxlist col="{col}" />
|
||||
{:else if col.contentType == "extendableBoxes"}
|
||||
<ExtendableBox col="{col}" />
|
||||
{:else if col.contentType == "personPreview"}
|
||||
<Persons col="{col}" pageId="{pageId}" />
|
||||
{:else if col.contentType == "iconCycleCircle"}
|
||||
<IconCycleCircle col="{col}" pageId="{pageId}" />
|
||||
{:else if col.contentType == "iconCycleSquare"}
|
||||
<IconCycleBox col="{col}" pageId="{pageId}" />
|
||||
{:else if col.contentType == "worldCard"}
|
||||
<WorldCard col="{col}" pageId="{pageId}" />
|
||||
{/if}
|
||||
</div>
|
||||
{/each}
|
||||
</div>{/if}
|
||||
{/if}
|
||||
|
||||
<style lang="less">
|
||||
|
@ -39,6 +39,7 @@
|
||||
initPage()
|
||||
}
|
||||
}
|
||||
$: console.log(page?.rows, "==rows")
|
||||
</script>
|
||||
|
||||
<div class="rows" class:HP="{path == '/'}">
|
||||
@ -48,9 +49,10 @@
|
||||
<div
|
||||
class="row"
|
||||
id="row-{i}"
|
||||
style="{path == '/' && i == page.rows.length - 1 ? 'padding-bottom: 300px;' : ''} {row.noBottomMargin
|
||||
? 'margin-bottom: 0px;'
|
||||
: ''} {row.noTopMargin ? 'margin-top: 0px;' : ''}"
|
||||
style="{path == '/' && i == page.rows.length - 1 ? 'padding-bottom: 300px;' : ''} {row.row
|
||||
.noBottomMargin
|
||||
? 'margin-bottom: 0px; padding-bottom: 0px;'
|
||||
: ''} {row.row.noTopMargin ? 'margin-top: 0px; padding-top: 0px;' : ''}"
|
||||
>
|
||||
{#if row.row.backgroundImage}
|
||||
<div class="background-image">
|
||||
|
Loading…
Reference in New Issue
Block a user