Weitere Verbesserungen des Starter Projekts für neue Projekte.

This commit is contained in:
2022-05-25 12:10:29 +02:00
parent 47fdee2396
commit 516c35dcb4
17 changed files with 398 additions and 301 deletions

View File

@@ -1,7 +1,6 @@
<script lang="ts">
import { getContent } from "../../api"
// import { apiBaseURL } from "../../config"
import { generalInfo } from "../../store"
import { generalInfo, currentLang } from "../../store"
export let path: string
@@ -10,7 +9,7 @@
function load() {
loading = true
getContent(path)
getContent(path, $currentLang)
.then((c) => {
content = c
})
@@ -24,10 +23,6 @@
<svelte:head>
<title>{content?.name ? content?.name + " - " : ""}{$generalInfo?.meta?.metaTitle}</title>
<meta name="description" content="{$generalInfo?.meta?.metaDescription}" />
<meta name="keywords" content="{$generalInfo?.meta?.metaKeywords.replaceAll(' ', '')}" />
<meta name="author" content="{$generalInfo?.person?.firstname} {$generalInfo?.person?.lastname}" />
<meta name="robots" content="{$generalInfo?.meta?.metaTagRobots}" />
</svelte:head>
<div class="container">
@@ -37,12 +32,8 @@
<!-- Loader -->
{:else if content}
{#each content.blocks || [] as b}
<h2>{b.title}</h2>
<div>{@html b.text}</div>
{JSON.stringify(b)}
{/each}
{:else}
<h1>Seite nicht gefunden</h1>
<div>Pfad: {path}</div>
{/if}
</div>
</div>