CMS fetching, Main page & members page (#12)
* CMS fetching on main page * Getting council members * Image loading for council member * Placeholder avatar
This commit is contained in:
@@ -1,15 +1,7 @@
|
||||
<script>
|
||||
import Section from 'components/Section.svelte';
|
||||
|
||||
// Getting info from ECSESS CMS
|
||||
// let description =
|
||||
// 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.';
|
||||
const query = '_type:homepage';
|
||||
|
||||
let description = $state();
|
||||
description = fetch(
|
||||
`https://${import.meta.env.SANITY_ID}.api.sanity.io/vX/data/query/production?query=${query}&perspective=drafts`
|
||||
).then((res) => res.json).then((json) => json.toString());
|
||||
/** loading things from the server side */
|
||||
let { data } = $props();
|
||||
</script>
|
||||
|
||||
<title> McGill ECSESS </title>
|
||||
@@ -18,8 +10,7 @@
|
||||
<Section>
|
||||
<div class="flex h-1/2 flex-col items-center justify-center text-center">
|
||||
<p class="page-title">What is ECSESS?</p>
|
||||
|
||||
<p>{description}</p>
|
||||
<p>{data.description}</p>
|
||||
</div>
|
||||
</Section>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user