From 44230465bdddce2d5d1129abcd746f302b4a98a0 Mon Sep 17 00:00:00 2001 From: Laurent GAY Date: Wed, 12 Feb 2025 11:12:33 +0100 Subject: [PATCH] #1616 : change button look, in search page, in function of content type --- src/components/Home/SearchFields.vue | 31 +++++++++++++++++++++++++--- 1 file changed, 28 insertions(+), 3 deletions(-) diff --git a/src/components/Home/SearchFields.vue b/src/components/Home/SearchFields.vue index 6d4f331c2..617109847 100644 --- a/src/components/Home/SearchFields.vue +++ b/src/components/Home/SearchFields.vue @@ -48,14 +48,19 @@ {{ t("Events") }} @@ -167,6 +174,16 @@ const distanceList = computed(() => { return distances; }); +const select_button_class = (current_content_type: string) => { + if (route.query.contentType === undefined) { + return ""; + } else { + return current_content_type === route.query.contentType + ? "active" + : "disactive"; + } +}; + console.debug("initial", distance.value, search.value, address.value); const modelValueUpdate = (newaddress: IAddress | null) => { @@ -220,4 +237,12 @@ const { t } = useI18n({ useScope: "global" }); #search-anchor :deep(.o-input__wrapper) { flex: 1; } +.active { + text-decoration: underline; + font-weight: bold; +} +.disactive { + color: #eee; + font-weight: 300; +}