Collection für Content angepasst. Image Components erweitert. Verschiedene CSS Apassungen der Demo Page

This commit is contained in:
Mario Linz 2022-05-30 13:11:51 +02:00
parent a2bd10453b
commit c67f712280
14 changed files with 42 additions and 79 deletions

Binary file not shown.

View File

@ -120,5 +120,6 @@ fields:
type: object[] type: object[]
meta: meta:
label: { de: "Artikel dieser Seite", en: "Page Articles" } label: { de: "Artikel dieser Seite", en: "Page Articles" }
collapse: { titleFieldName: "article.content.title" }
subFields: subFields:
- !include fields/_article.yml - !include fields/_article.yml

View File

@ -135,21 +135,11 @@ subFields:
meta: meta:
widget: richtext widget: richtext
label: { de: "Teaser-Text des Artikel", en: "Article Teaser Text" } label: { de: "Teaser-Text des Artikel", en: "Article Teaser Text" }
- name: teaserContent
type: string
meta:
widget: uiContentBuilder
label: { de: "Teaser-Inhalt", en: "Article Teaser Content" }
- name: details - name: details
type: string type: string
meta: meta:
widget: richtext widget: richtext
label: { de: "Detail-Text des Artikel", en: "Article Detail Text" } label: { de: "Detail-Text des Artikel", en: "Article Detail Text" }
- name: detailsContent
type: string
meta:
widget: uiContentBuilder
label: { de: "Details-Inhalt", en: "Article Details Content" }
- name: contentMedia - name: contentMedia
type: object type: object
meta: meta:

View File

@ -39,7 +39,7 @@ meta:
label: { de: "Allgemein", en: "General" } label: { de: "Allgemein", en: "General" }
subFields: subFields:
- source: public - source: public
- source: meta.metaDescription # - source: meta.metaDescription
- name: meta - name: meta
meta: meta:
label: { de: "Meta", en: "Meta" } label: { de: "Meta", en: "Meta" }

View File

@ -1,5 +1,6 @@
<script lang="ts"> <script lang="ts">
import { generalInfo } from "../../store" import { generalInfo } from "../../store"
import { apiBaseURL } from "../../config"
export let id: string = null export let id: string = null
export let cssClass: string = "" export let cssClass: string = ""
@ -14,6 +15,12 @@
alt="{mediaFile.alternateText ? mediaFile.alternateText + ' - ' : ''}" alt="{mediaFile.alternateText ? mediaFile.alternateText + ' - ' : ''}"
class="{cssClass}" 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}
{/if} {/if}
{/each} {/each}

View File

@ -14,6 +14,8 @@
<div class="header-content"> <div class="header-content">
<a href="/" use:link> <a href="/" use:link>
<Image <Image
collectionName="general"
entryId="{$generalInfo?.id}"
file="{$generalInfo?.media?.brand}" file="{$generalInfo?.media?.brand}"
alt="{$generalInfo?.meta?.metaTitle}" alt="{$generalInfo?.meta?.metaTitle}"
cssClass="brand" cssClass="brand"

View File

@ -1,9 +1,21 @@
<script lang="ts"> <script lang="ts">
import { apiBaseURL } from "../../config"
export let collectionName: string = null
export let entryId: string = null
export let file: File = null export let file: File = null
export let alt: string = "" export let alt: string = ""
export let cssClass: string = "" export let cssClass: string = ""
</script> </script>
{#if file} {#if collectionName && entryId && file}
{#if file.src.includes(";base64,")}
<img src="{file.src}" alt="{alt ? alt + ' - ' : ''}{file.path}" class="{cssClass}" /> <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} {/if}

View File

@ -53,8 +53,6 @@
</div> </div>
<nav class="{ident}-mobile" class:show="{showMobileNav}" use:links> <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} {#each navigation?.items || [] as item}
{#if item.settings.url.url} {#if item.settings.url.url}
<div class="nav-item"> <div class="nav-item">

View File

@ -6,7 +6,7 @@ form {
box-shadow: 0 10px 40px 0 rgba(0, 0, 0, 0.1); box-shadow: 0 10px 40px 0 rgba(0, 0, 0, 0.1);
strong { strong {
color: @secondary; color: @primary;
font-weight: 700; font-weight: 700;
} }
@ -30,13 +30,6 @@ form {
flex-shrink: 0; flex-shrink: 0;
border-radius: 100%; border-radius: 100%;
&.contact {
background-color: @secondary-light-green;
}
&.recipe {
background-color: @secondary-light;
}
img { img {
width: 50%; width: 50%;
} }
@ -82,7 +75,7 @@ form {
} }
&:focus { &:focus {
border: 1px solid @secondary; border: 1px solid @primary;
color: @primary; color: @primary;
} }
@ -98,10 +91,10 @@ form {
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
color: @secondary; color: @primary;
&:hover { &:hover {
box-shadow: inset 0 0 10px 0 @secondary; box-shadow: inset 0 0 10px 0 @primary;
} }
} }
@ -111,8 +104,8 @@ form {
button { button {
width: 100%; width: 100%;
background: @secondary; background: @primary;
color: @on-secondary; color: @on-primary;
padding: @space-xs @space-md; padding: @space-xs @space-md;
border-radius: 10px; border-radius: 10px;
border: 1px solid transparent; border: 1px solid transparent;
@ -121,7 +114,7 @@ form {
cursor: pointer; cursor: pointer;
&:hover { &:hover {
border-color: @on-secondary; border-color: @on-primary;
background-color: @primary; background-color: @primary;
color: @on-primary; color: @on-primary;
} }

View File

@ -48,7 +48,7 @@ body {
.circle-email { .circle-email {
width: 60px; width: 60px;
height: 60px; height: 60px;
background-color: @secondary-light; background-color: @secondary;
position: absolute; position: absolute;
top: -20px; top: -20px;
right: -39px; right: -39px;
@ -57,7 +57,7 @@ body {
.circle-contact { .circle-contact {
width: 60px; width: 60px;
height: 60px; height: 60px;
background-color: @secondary-light-green; background-color: @secondary;
position: absolute; position: absolute;
top: 23px; top: 23px;
right: -53px; right: -53px;

View File

@ -31,47 +31,13 @@ header {
.brand { .brand {
display: block; display: block;
margin: @space-md 0; margin: @space-md 0;
max-width: 300px;
@media (max-width: 992px) { @media (max-width: 992px) {
width: 80%; width: 80%;
} }
} }
.tel-box {
display: inline-flex;
align-items: center;
gap: @space-sm;
background: @secondary;
color: @on-secondary;
font-weight: 700;
border-radius: 50px;
height: 40px;
padding-right: @space-md;
margin: @space-md 0 0 auto;
text-decoration: none;
white-space: nowrap;
.icon {
background: @secondary-light;
width: 40px;
height: 40px;
border-radius: 100%;
display: flex;
justify-content: center;
align-items: center;
}
@media (max-width: 992px) {
& {
display: none;
}
&.mobile {
display: inline-flex;
justify-content: center;
}
}
}
nav { nav {
list-style-type: none; list-style-type: none;
margin-top: @space-md; margin-top: @space-md;
@ -86,12 +52,11 @@ header {
& > * { & > * {
text-decoration: none; text-decoration: none;
color: @primary;
transition: @transition-default; transition: @transition-default;
font-weight: 500; font-weight: 500;
&:hover { &:hover {
color: @on-background; color: @primary;
} }
} }
} }

View File

@ -2,7 +2,6 @@
display: flex; display: flex;
justify-content: flex-end; justify-content: flex-end;
align-items: center; align-items: center;
border: 1px solid @secondary;
margin: @space-xs; margin: @space-xs;
.lang { .lang {

View File

@ -19,7 +19,7 @@
width: 50px; width: 50px;
height: 50px; height: 50px;
border-radius: 100%; border-radius: 100%;
background-color: @secondary-light; background-color: @secondary;
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;

View File

@ -3,20 +3,16 @@
@background: #fff; @background: #fff;
@on-background: #575756; @on-background: #575756;
@primary: #2d8e91; @primary: #ff0000;
@on-primary: #fff; @on-primary: #fff;
@secondary: #72efdd; @secondary: #1e7c9e;
@on-secondary: #2d8e91; @on-secondary: #ffffff;
@secondary-light: #dafbf7;
@on-secondary-light: @on-secondary;
@secondary-light-green: #e2fbf0;
@on-secondary-light-green: @on-secondary;
@surface: #fff; @surface: #fff;
@on-surface: #575756; @on-surface: #555555;
@error: #fff0e9; @error: #eebdbd;
@on-error: #eb5757; @on-error: #eb5757;
@font-size-default: 16px; @font-size-default: 16px;