From 762fd00da292d17b59f7970abb62d1362b43edd0 Mon Sep 17 00:00:00 2001 From: Simon C Date: Wed, 13 Mar 2024 09:51:55 +0100 Subject: [PATCH] refactor: Simplify url generation --- portails/shared/layouts/index.html | 13 ++++++--- .../partials/header/header-menu-social.html | 27 +++++++++++-------- 2 files changed, 26 insertions(+), 14 deletions(-) diff --git a/portails/shared/layouts/index.html b/portails/shared/layouts/index.html index c55b2f7..8e26b5b 100644 --- a/portails/shared/layouts/index.html +++ b/portails/shared/layouts/index.html @@ -34,13 +34,20 @@

{{ $service.description | default $defaultValues.description }}

Guide + {{ $url := "" }} {{ if $service.subdomain }} - Accéder au service + {{ $url = print "https://" $service.subdomain "." site.Params.domain "/" }} {{ else if $service.link }} - Accéder au service + {{ $url = print $service.link "/" }} {{ else }} - Accéder au service + {{ $url = print "https://" $defaultValues.subdomain "." site.Params.domain "/" }} {{ end }} + + Accéder au service +
{{ if site.Params.poweredBy }}

Propulsé par {{ $defaultValues.tool.name }}

diff --git a/portails/shared/layouts/partials/header/header-menu-social.html b/portails/shared/layouts/partials/header/header-menu-social.html index 318b991..08986ee 100644 --- a/portails/shared/layouts/partials/header/header-menu-social.html +++ b/portails/shared/layouts/partials/header/header-menu-social.html @@ -1,19 +1,24 @@ -