diff --git a/web/src/lib/components/base/chip.svelte b/web/src/lib/components/base/chip.svelte index 2fdd3f30..70a98454 100644 --- a/web/src/lib/components/base/chip.svelte +++ b/web/src/lib/components/base/chip.svelte @@ -16,7 +16,7 @@ ? 'bg-primary text-white' : 'border border-input-border bg-menu-item-background-hover'} px-2 py-1 rounded-full flex items-center gap-1" > - {text} + {text} {#if closable} + {/if} {/if}
diff --git a/web/src/lib/components/trail/trail_list_item.svelte b/web/src/lib/components/trail/trail_list_item.svelte index 9e812a99..eda907ab 100644 --- a/web/src/lib/components/trail/trail_list_item.svelte +++ b/web/src/lib/components/trail/trail_list_item.svelte @@ -14,6 +14,7 @@ import { _ } from "svelte-i18n"; import ShareInfo from "../share_info.svelte"; import { handleFromRecordWithIRI } from "$lib/util/activitypub_util"; + import Chip from "../base/chip.svelte"; interface Props { trail: Trail; @@ -33,6 +34,14 @@ ? emptyStateTrailLight : emptyStateTrailDark, ); + + let expandedTags = $state(false); + + function toggleExpandTags(e: MouseEvent) { + e.preventDefault(); + e.stopPropagation(); + expandedTags = !expandedTags; + }
  • {trail.name} -
    +
    {#if trail.public && $currentUser} @@ -105,6 +114,27 @@ {handleFromRecordWithIRI(trail)}

    {/if} + {#if trail.tags.length} +
    + {#each expandedTags ? trail.tags : trail.tags.slice(0, 2) as t} + + {/each} + + {#if trail.tags.length > 2} + + {/if} +
    + {/if}
    {#if trail.location}
    {trail.location}
    diff --git a/web/src/lib/i18n/locales/de.json b/web/src/lib/i18n/locales/de.json index 8ff3ae2c..58891396 100644 --- a/web/src/lib/i18n/locales/de.json +++ b/web/src/lib/i18n/locales/de.json @@ -199,6 +199,7 @@ "max-hiking-difficulty": "Max. Schwierigkeit der Wanderung", "metric": "Metrisch", "moderate": "Mittel", + "more": "weitere", "mountain": "Berg", "must-be-at-least-n-characters-long": "Muss mindestens {n} Zeichen lang sein", "must-be-at-most-n-characters-long": "Darf höchstens {n} Zeichen lang sein", @@ -316,6 +317,7 @@ "shared-with": "Geteilt mit", "shortest": "", "show-in-overview": "In der Übersicht anzeigen", + "show-less": "Weniger anzeigen", "show-on-map": "Auf der Karte anzeigen", "slogan": "Speichere deine Abenteuer!", "slope": "Steigung", diff --git a/web/src/lib/i18n/locales/en.json b/web/src/lib/i18n/locales/en.json index ce2c467f..d965306c 100644 --- a/web/src/lib/i18n/locales/en.json +++ b/web/src/lib/i18n/locales/en.json @@ -199,6 +199,7 @@ "max-hiking-difficulty": "Max. Hiking Difficulty", "metric": "Metric", "moderate": "Moderate", + "more": "", "mountain": "Mountain", "must-be-at-least-n-characters-long": "Must be at least {n} characters long", "must-be-at-most-n-characters-long": "Must be at most {n} characters long", @@ -316,6 +317,7 @@ "shared-with": "Shared with", "shortest": "", "show-in-overview": "Show in overview", + "show-less": "", "show-on-map": "Show on map", "slogan": "Save your adventures!", "slope": "Slope", diff --git a/web/src/lib/i18n/locales/es.json b/web/src/lib/i18n/locales/es.json index d48d0617..86b4d85a 100644 --- a/web/src/lib/i18n/locales/es.json +++ b/web/src/lib/i18n/locales/es.json @@ -199,6 +199,7 @@ "max-hiking-difficulty": "Max. Hiking Difficulty", "metric": "Métrica", "moderate": "Medio", + "more": "", "mountain": "Montaña", "must-be-at-least-n-characters-long": "Tiene que tener por lo menos {n} caracteres", "must-be-at-most-n-characters-long": "Must be at most {n} characters long", @@ -316,6 +317,7 @@ "shared-with": "Compartido con", "shortest": "", "show-in-overview": "Mostrar en la panorámica", + "show-less": "", "show-on-map": "Mostrar en mapa", "slogan": "¡Guarda tus aventuras!", "slope": "Pendiente", diff --git a/web/src/lib/i18n/locales/fr.json b/web/src/lib/i18n/locales/fr.json index fefca29d..d0fe82da 100644 --- a/web/src/lib/i18n/locales/fr.json +++ b/web/src/lib/i18n/locales/fr.json @@ -199,6 +199,7 @@ "max-hiking-difficulty": "Max. Hiking Difficulty", "metric": "Métrique", "moderate": "Moyenne", + "more": "", "mountain": "Mountain", "must-be-at-least-n-characters-long": "Doit être composé d'au moins {n} caractères", "must-be-at-most-n-characters-long": "Doit être au maximum de {n} caractères", @@ -316,6 +317,7 @@ "shared-with": "Partagé avec", "shortest": "", "show-in-overview": "Voir dans l'aperçu", + "show-less": "", "show-on-map": "Voir sur la carte", "slogan": "Sauvegarder vos aventures !", "slope": "Pente", diff --git a/web/src/lib/i18n/locales/hu.json b/web/src/lib/i18n/locales/hu.json index a7b70c4b..ed7afb3d 100644 --- a/web/src/lib/i18n/locales/hu.json +++ b/web/src/lib/i18n/locales/hu.json @@ -199,6 +199,7 @@ "max-hiking-difficulty": "Max. Hiking Difficulty", "metric": "Metrikus", "moderate": "Mérsékelt", + "more": "", "mountain": "Mountain", "must-be-at-least-n-characters-long": "Legalább {n} karakter hosszúnak kell lennie", "must-be-at-most-n-characters-long": "Must be at most {n} characters long", @@ -316,6 +317,7 @@ "shared-with": "Shared with", "shortest": "", "show-in-overview": "Áttekintés", + "show-less": "", "show-on-map": "Mutatás térképen", "slogan": "Mentse el a kalandjait!", "slope": "Slope", diff --git a/web/src/lib/i18n/locales/it.json b/web/src/lib/i18n/locales/it.json index 4bc8335d..e87b36c7 100644 --- a/web/src/lib/i18n/locales/it.json +++ b/web/src/lib/i18n/locales/it.json @@ -199,6 +199,7 @@ "max-hiking-difficulty": "Max. Hiking Difficulty", "metric": "Metrico", "moderate": "Moderato", + "more": "", "mountain": "Mountain", "must-be-at-least-n-characters-long": "Deve essere lungo almeno {n} caratteri", "must-be-at-most-n-characters-long": "Must be at most {n} characters long", @@ -316,6 +317,7 @@ "shared-with": "Condiviso con", "shortest": "", "show-in-overview": "Mostra nella panoramica", + "show-less": "", "show-on-map": "Mostra sulla mappa", "slogan": "Salva le tue avventure!", "slope": "Pendenza", diff --git a/web/src/lib/i18n/locales/nl.json b/web/src/lib/i18n/locales/nl.json index 28628f32..3a72e275 100644 --- a/web/src/lib/i18n/locales/nl.json +++ b/web/src/lib/i18n/locales/nl.json @@ -199,6 +199,7 @@ "max-hiking-difficulty": "Max. Hiking Moeilijkheid", "metric": "Metrisch", "moderate": "Gemiddeld", + "more": "", "mountain": "Berg", "must-be-at-least-n-characters-long": "Minimaal {n} tekens", "must-be-at-most-n-characters-long": "Mag maximaal {n} tekens lang zijn.", @@ -316,6 +317,7 @@ "shared-with": "Gedeeld met", "shortest": "", "show-in-overview": "Tonen op overzicht", + "show-less": "", "show-on-map": "Tonen op kaart", "slogan": "Bewaar je avonturen!", "slope": "helling", diff --git a/web/src/lib/i18n/locales/pl.json b/web/src/lib/i18n/locales/pl.json index 791cf092..dd3a55ed 100644 --- a/web/src/lib/i18n/locales/pl.json +++ b/web/src/lib/i18n/locales/pl.json @@ -199,6 +199,7 @@ "max-hiking-difficulty": "Max. Hiking Difficulty", "metric": "Metryczne", "moderate": "Średni", + "more": "", "mountain": "Mountain", "must-be-at-least-n-characters-long": "Długość musi wynosić przynajmniej {n} znaków", "must-be-at-most-n-characters-long": "Must be at most {n} characters long", @@ -316,6 +317,7 @@ "shared-with": "Udostępniony dla", "shortest": "", "show-in-overview": "Pokaż w przeglądzie", + "show-less": "", "show-on-map": "Pokaż na mapie", "slogan": "Zapisz swoją wyprawę!", "slope": "Nachylenie", diff --git a/web/src/lib/i18n/locales/pt.json b/web/src/lib/i18n/locales/pt.json index 05453bd3..5eed9766 100644 --- a/web/src/lib/i18n/locales/pt.json +++ b/web/src/lib/i18n/locales/pt.json @@ -199,6 +199,7 @@ "max-hiking-difficulty": "Max. Hiking Difficulty", "metric": "Métrica", "moderate": "Moderado", + "more": "", "mountain": "Mountain", "must-be-at-least-n-characters-long": "Deve ter pelo menos {n} caracteres", "must-be-at-most-n-characters-long": "Must be at most {n} characters long", @@ -316,6 +317,7 @@ "shared-with": "Partilhado com", "shortest": "", "show-in-overview": "Mostrar na vista geral", + "show-less": "", "show-on-map": "Mostrar no mapa", "slogan": "Guarde as suas aventuras!", "slope": "Inclinação", diff --git a/web/src/lib/i18n/locales/zh.json b/web/src/lib/i18n/locales/zh.json index d11092aa..5c66edab 100644 --- a/web/src/lib/i18n/locales/zh.json +++ b/web/src/lib/i18n/locales/zh.json @@ -199,6 +199,7 @@ "max-hiking-difficulty": "Max. Hiking Difficulty", "metric": "公制", "moderate": "中等", + "more": "", "mountain": "Mountain", "must-be-at-least-n-characters-long": "长度至少 {n} 字符", "must-be-at-most-n-characters-long": "Must be at most {n} characters long", @@ -316,6 +317,7 @@ "shared-with": "分享给", "shortest": "", "show-in-overview": "详情中展示", + "show-less": "", "show-on-map": "地图中展示", "slogan": "保存你的冒险!", "slope": "坡度",