Add weight to individual docs articles

This commit is contained in:
thiloho
2024-08-29 12:05:02 +02:00
parent 816df44bd3
commit e5b55baaef
6 changed files with 204 additions and 32 deletions

View File

@@ -66,7 +66,8 @@ export const actions: Actions = {
cover_image: uploadedImage.file_id,
publication_date: data.get("publication-date"),
main_content: data.get("main-content"),
category: data.get("category")
category: data.get("category"),
article_weight: data.get("article-weight") ? data.get("article-weight") : null
})
});

View File

@@ -52,6 +52,11 @@
}}
>
{#if data.website.content_type === "Docs"}
<label>
Weight:
<input type="number" name="article-weight" value={data.article.article_weight} min="0" />
</label>
<label>
Category:
<select name="category">