From 4c7752d06882a282fc105bcd460b1bf2bbdb0260 Mon Sep 17 00:00:00 2001 From: alexisben <alex@noesya.coop> Date: Wed, 18 Jan 2023 18:09:06 +0100 Subject: [PATCH] change url to value --- .../organizations/contact-details.html | 27 ++++++++++++------- layouts/partials/persons/contact-details.html | 14 +++++----- 2 files changed, 24 insertions(+), 17 deletions(-) diff --git a/layouts/partials/organizations/contact-details.html b/layouts/partials/organizations/contact-details.html index a3a51e64..66f8a713 100644 --- a/layouts/partials/organizations/contact-details.html +++ b/layouts/partials/organizations/contact-details.html @@ -6,28 +6,35 @@ {{ with .website }} <li> <span>{{ i18n "commons.contact.website" }}</span> - <a href="{{ chomp .url }}" target="_blank" rel="noopener" itemprop="url">{{ chomp .label }}</a> + <a href="{{ chomp .value }}" target="_blank" rel="noopener" itemprop="url">{{ chomp .label }}</a> </li> {{ end }} {{ with .linkedin }} <li> <span>LinkedIn</span> - <a href="{{ chomp .url }}" target="_blank" rel="noopener" itemprop="url">{{ chomp .label }}</a> + <a href="{{ chomp .value }}" target="_blank" rel="noopener" itemprop="url">{{ chomp .label }}</a> </li> {{ end }} + {{ with .mastodon }} + <li> + <span>Mastodon</span> + <a href="{{ chomp .value }}" target="_blank" rel="noopener" itemprop="url">{{ chomp .label }}</a> + </li> + {{ end }} + {{ with .twitter }} <li> <span>Twitter</span> - <a href="https://twitter.com/{{ chomp .url }}" target="_blank" rel="noopener" itemprop="url">{{ chomp .label }}</a> + <a href="{{ chomp .value }}" target="_blank" rel="noopener" itemprop="url">{{ chomp .label }}</a> </li> {{ end }} {{ with .email }} <li> <span>{{ i18n "commons.contact.email" }}</span> - <a href="mailto:{{ chomp .url }}" itemprop="email">{{ chomp .label }}</a> + <a href="{{ chomp .value }}" itemprop="email">{{ chomp .label }}</a> </li> {{ end }} </ul> @@ -41,33 +48,33 @@ <address itemprop="address" itemscope itemtype="https://schema.org/PostalAddress"> {{ with .address }} <span itemprop="streetAddress"> - {{ partial "PrepareHTML" . }}, + {{ partial "PrepareHTML" .label }}, </span> <br> {{ end }} {{ with .city }} <span itemprop="addressLocality"> - {{ partial "PrepareHTML" . }} + {{ partial "PrepareHTML" .label }} </span> {{ end }} {{ with .zipcode }} <span itemprop="postalCode"> - {{ partial "PrepareHTML" . }} + {{ partial "PrepareHTML" .label }} </span> {{ end }} {{ with .country }} <span itemprop="postalCode"> - {{ partial "PrepareHTML" . }} + {{ partial "PrepareHTML" .label }} </span> {{ end }} </address> </li> {{ end }} - {{ if .phone }} + {{ with .phone }} <li> <span>{{ i18n "commons.contact.phone" }}</span> - <a href="tel:{{ .phone }}" itemprop="telephone">{{ .phone }}</a> + <a href="{{ .value }}" itemprop="telephone">{{ .label }}</a> </li> {{ end }} </ul> diff --git a/layouts/partials/persons/contact-details.html b/layouts/partials/persons/contact-details.html index 4de20854..134e1207 100644 --- a/layouts/partials/persons/contact-details.html +++ b/layouts/partials/persons/contact-details.html @@ -6,42 +6,42 @@ {{ with .website }} <li> <span>{{ i18n "commons.contact.website" }}</span> - <a href="{{ chomp .url }}" target="_blank" rel="noopener" itemprop="url">{{ chomp .label }}</a> + <a href="{{ chomp .value }}" target="_blank" rel="noopener" itemprop="url">{{ chomp .label }}</a> </li> {{ end }} {{ with .linkedin }} <li> <span>LinkedIn</span> - <a href="{{ chomp .url }}" target="_blank" rel="noopener" itemprop="url">{{ chomp .label }}</a> + <a href="{{ chomp .value }}" target="_blank" rel="noopener" itemprop="url">{{ chomp .label }}</a> </li> {{ end }} - + {{ with .mastodon }} <li> <span>Mastodon</span> - <a href="https://mastodon.social/{{ chomp .url }}" target="_blank" rel="noopener" itemprop="url">{{ chomp .label }}</a> + <a href="{{ chomp .value }}" target="_blank" rel="noopener" itemprop="url">{{ chomp .label }}</a> </li> {{ end }} {{ with .twitter }} <li> <span>Twitter</span> - <a href="https://twitter.com/{{ chomp .url }}" target="_blank" rel="noopener" itemprop="url">{{ chomp .label }}</a> + <a href="{{ chomp .value }}" target="_blank" rel="noopener" itemprop="url">{{ chomp .label }}</a> </li> {{ end }} {{ with .email }} <li> <span>{{ i18n "commons.contact.email" }}</span> - <a href="mailto:{{ chomp .label }}" itemprop="email">{{ chomp .url }}</a> + <a href="{{ chomp .value }}" itemprop="email">{{ chomp .label }}</a> </li> {{ end }} {{ with .phone }} <li> <span>{{ i18n "commons.contact.phone" }}</span> - <a href="tel:{{ . }}" itemprop="telephone">{{ . }}</a> + <a href="{{ .value }}" itemprop="telephone">{{ .label }}</a> </li> {{ end }} </ul> -- GitLab