Skip to content

Commit

Permalink
Email itemprop (#810)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexisben authored Dec 9, 2024
1 parent d0f5371 commit 4acdc76
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions layouts/partials/commons/contact-details.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"context" .
"name" $name
"with_labels" true
"in_itemscope" true
) }}
</ul>

Expand Down
8 changes: 6 additions & 2 deletions layouts/partials/commons/socials.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,22 @@
{{ $with_labels := .with_labels | default false }}
{{ $context := .context | default . }}
{{ $use_default_email_label := .use_default_email_label }}
{{ $in_itemscope := .in_itemscope }}

{{ with $context.emails.email }}
<li class="email">
{{ $email_label := i18n "commons.contact.email.label" }}
{{ if $with_labels }}
<span>{{ $email_label }}</span>
{{ end }}
<a href="{{ chomp .value | safeURL }}" itemprop="email" title='{{ safeHTML (i18n "commons.contact.email.a11y_label" (dict "email" .label )) }}'>
<a href="{{ chomp .value | safeURL }}"
{{ if $in_itemscope }} itemprop="email" {{ end }}
title='{{ safeHTML (i18n "commons.contact.email.a11y_label" (dict "email" .label )) }}'
>
{{ cond $use_default_email_label $email_label .label }}
</a>
</li>
{{ end}}
{{ end }}
{{ range $key, $value := $context.social_networks }}
<li class="{{ $key }}">
{{ $label := $key | title }}
Expand Down

0 comments on commit 4acdc76

Please sign in to comment.