Collection für Content angepasst. Image Components erweitert. Verschiedene CSS Apassungen der Demo Page
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
<script lang="ts">
|
||||
import { generalInfo } from "../../store"
|
||||
import { apiBaseURL } from "../../config"
|
||||
|
||||
export let id: string = null
|
||||
export let cssClass: string = ""
|
||||
@@ -14,6 +15,12 @@
|
||||
alt="{mediaFile.alternateText ? mediaFile.alternateText + ' - ' : ''}"
|
||||
class="{cssClass}"
|
||||
/>
|
||||
{:else}
|
||||
<img
|
||||
src="{`${apiBaseURL}general/${$generalInfo?.id}/${mediaFile.file.src}?filter=l`}"
|
||||
alt="{mediaFile.alternateText ? mediaFile.alternateText : mediaFile.file.path}"
|
||||
class="{cssClass}"
|
||||
/>
|
||||
{/if}
|
||||
{/if}
|
||||
{/each}
|
||||
|
||||
@@ -14,6 +14,8 @@
|
||||
<div class="header-content">
|
||||
<a href="/" use:link>
|
||||
<Image
|
||||
collectionName="general"
|
||||
entryId="{$generalInfo?.id}"
|
||||
file="{$generalInfo?.media?.brand}"
|
||||
alt="{$generalInfo?.meta?.metaTitle}"
|
||||
cssClass="brand"
|
||||
|
||||
@@ -1,9 +1,21 @@
|
||||
<script lang="ts">
|
||||
import { apiBaseURL } from "../../config"
|
||||
|
||||
export let collectionName: string = null
|
||||
export let entryId: string = null
|
||||
export let file: File = null
|
||||
export let alt: string = ""
|
||||
export let cssClass: string = ""
|
||||
</script>
|
||||
|
||||
{#if file}
|
||||
<img src="{file.src}" alt="{alt ? alt + ' - ' : ''}{file.path}" class="{cssClass}" />
|
||||
{#if collectionName && entryId && file}
|
||||
{#if file.src.includes(";base64,")}
|
||||
<img src="{file.src}" alt="{alt ? alt + ' - ' : ''}{file.path}" class="{cssClass}" />
|
||||
{:else}
|
||||
<img
|
||||
src="{`${apiBaseURL}${collectionName}/${entryId}/${file.src}?filter=l`}"
|
||||
alt="{alt ? alt : file.path}"
|
||||
class="{cssClass}"
|
||||
/>
|
||||
{/if}
|
||||
{/if}
|
||||
|
||||
@@ -53,8 +53,6 @@
|
||||
</div>
|
||||
|
||||
<nav class="{ident}-mobile" class:show="{showMobileNav}" use:links>
|
||||
<!-- <img src="img/body-image-left.svg" alt="" class="bg-image" /> -->
|
||||
|
||||
{#each navigation?.items || [] as item}
|
||||
{#if item.settings.url.url}
|
||||
<div class="nav-item">
|
||||
|
||||
Reference in New Issue
Block a user