Add base template for website preview route

This commit is contained in:
Thilo Hohlt
2024-08-03 18:07:27 +02:00
parent 0b2a9f2383
commit dfcb129e69
10 changed files with 85 additions and 22 deletions

View File

@@ -50,12 +50,13 @@ export const load = async ({ params, fetch, cookies, url, parent }) => {
});
const articles = await articlesData.json();
const { website } = await parent();
const { website, home } = await parent();
return {
totalArticleCount,
articles,
website
website,
home
};
};

View File

@@ -94,7 +94,7 @@
>
<input type="hidden" name="id" value={id} />
<button type="submit">Permanently delete article</button>
<button type="submit">Delete article</button>
</form>
</Modal>
</div>

View File

@@ -12,7 +12,8 @@
<WebsiteEditor
id={data.website.id}
title={data.website.title}
previewContent={data.article.main_content}
previewContent={data.article.main_content ||
"Put some markdown content in main content to see a live preview here"}
>
<section>
<h2>Edit article</h2>