adds trail difficulty property

This commit is contained in:
Christian Beutel
2024-03-10 21:02:49 +01:00
parent 4b8e740730
commit a2819f3b45
15 changed files with 152 additions and 29 deletions

View File

@@ -6,6 +6,7 @@ export const load: Load = async ({ params, fetch }) => {
const filter: TrailFilter = {
q: "",
category: [],
difficulty: ["easy", "moderate", "difficult"],
near: {
radius: 2000,
},

View File

@@ -452,6 +452,16 @@
label={$_("describe-your-trail")}
bind:value={$form.description}
></Textarea>
<Select
name="difficulty"
label={$_("difficulty")}
bind:value={$form.difficulty}
items={[
{ text: $_('easy'), value: "easy" },
{ text: $_('moderate'), value: "moderate" },
{ text: $_('difficult'), value: "difficult" },
]}
></Select>
{#if $form.expand.category}
<Select
name="category"

View File

@@ -7,6 +7,7 @@ export const load: ServerLoad = async ({ params, locals, url, fetch }) => {
const filter: TrailFilter = {
q: "",
category: [],
difficulty: ["easy", "moderate", "difficult"],
near: {
radius: 2000,
},