forked from cms/tibi-svelte-starter
Update and rework project structure with new pagebuilder concept. (based on RK Architekten and SFU Politik configs and sources)
This commit is contained in:
@@ -1,18 +1,38 @@
|
||||
<script lang="ts">
|
||||
import * as animateScroll from "svelte-scrollto"
|
||||
// import { _ } from "svelte-i18n"
|
||||
import { currentLang } from "../../store"
|
||||
import { getContent } from "../../api"
|
||||
|
||||
// import { generalInfo } from "../../store"
|
||||
let loading = true
|
||||
let projects: Content[]
|
||||
let currentImpressionsProject: Content
|
||||
|
||||
// import ContactForm from "../widgets/ContactForm.svelte"
|
||||
// import GoogleMaps from "../widgets/GoogleMaps.svelte"
|
||||
// import GeneralMediaImage from "../widgets/GeneralMediaImage.svelte"
|
||||
import ArticlesList from "../widgets/ArticlesList.svelte"
|
||||
const loadContent = async () => {
|
||||
let apiParams: APIParams = {
|
||||
filter: {
|
||||
public: true,
|
||||
locale: $currentLang,
|
||||
type: "project",
|
||||
},
|
||||
}
|
||||
|
||||
loading = true
|
||||
const c = await getContent(apiParams)
|
||||
if (c) {
|
||||
projects = c
|
||||
currentImpressionsProject = projects[Math.floor(Math.random() * projects.length)]
|
||||
}
|
||||
|
||||
loading = false
|
||||
}
|
||||
|
||||
loadContent()
|
||||
|
||||
$: console.log(projects)
|
||||
</script>
|
||||
|
||||
<ArticlesList pages="{['/']}" />
|
||||
|
||||
<!-- <GeneralMediaImage id="test1" /> -->
|
||||
|
||||
<!-- <ContactForm type="recipe" collapsed="{expandedForm !== 'recipe'}" /> -->
|
||||
<!-- <ContactForm type="contact" collapsed="{expandedForm !== 'contact'}" /> -->
|
||||
<!-- <GoogleMaps /> -->
|
||||
{#if projects}
|
||||
<section>
|
||||
{JSON.stringify(projects)}
|
||||
</section>
|
||||
{/if}
|
||||
|
||||
Reference in New Issue
Block a user