mirror of
https://github.com/tiennm99/HugoBlox-kit.git
synced 2026-10-12 22:14:08 +00:00
refactor: strip out Microdata from About widget
Forms part of the transition from Microdata to JSON-LD. See #413
This commit is contained in:
1 parent
1b2e20cc2a
commit
d8fa0b9523
1 file changed
+10
-12
@@ -17,32 +17,30 @@
|
||||
{{ $avatar := ($person_page.Resources.ByType "image").GetMatch "*avatar*" }}
|
||||
|
||||
<!-- About widget -->
|
||||
<div class="row" itemprop="author" itemscope itemtype="http://schema.org/Person" itemref="{{ if site.Params.email }}person-email{{ end }}{{ if site.Params.phone }} person-telephone{{ end }}{{ if site.Params.address}} person-address{{ end }}">
|
||||
<div class="row">
|
||||
<div class="col-12 col-lg-4">
|
||||
<div id="profile">
|
||||
|
||||
{{ if site.Params.gravatar }}
|
||||
<img class="portrait" src="https://s.gravatar.com/avatar/{{ md5 $person.email }}?s=200')" itemprop="image" alt="Avatar">
|
||||
<img class="portrait" src="https://s.gravatar.com/avatar/{{ md5 $person.email }}?s=200')" alt="Avatar">
|
||||
{{ else if $avatar }}
|
||||
{{ $avatar_image := $avatar.Fill "250x250 Center" }}
|
||||
<img class="portrait" src="{{ $avatar_image.RelPermalink }}" itemprop="image" alt="Avatar">
|
||||
<img class="portrait" src="{{ $avatar_image.RelPermalink }}" alt="Avatar">
|
||||
{{ end }}
|
||||
|
||||
<div class="portrait-title">
|
||||
<h2 itemprop="name">{{ $person.name }}</h2>
|
||||
{{ with $person.role }}<h3 itemprop="jobTitle">{{ . | markdownify | emojify }}</h3>{{ end }}
|
||||
<h2>{{ $person.name }}</h2>
|
||||
{{ with $person.role }}<h3>{{ . | markdownify | emojify }}</h3>{{ end }}
|
||||
|
||||
{{ range $person.organizations }}
|
||||
<h3 itemprop="worksFor" itemscope itemtype="http://schema.org/Organization">
|
||||
{{ with .url }}<a href="{{ . }}" target="_blank" itemprop="url" rel="noopener">{{ end }}
|
||||
<span itemprop="name">{{ .name }}</span>
|
||||
<h3>
|
||||
{{ with .url }}<a href="{{ . }}" target="_blank" rel="noopener">{{ end }}
|
||||
<span>{{ .name }}</span>
|
||||
{{ if .url }}</a>{{ end }}
|
||||
</h3>
|
||||
{{ end }}
|
||||
</div>
|
||||
|
||||
<link itemprop="url" href="{{ .Permalink }}">
|
||||
|
||||
<ul class="network-icon" aria-hidden="true">
|
||||
{{ range $person.social }}
|
||||
{{ $pack := or .icon_pack "fas" }}
|
||||
@@ -59,7 +57,7 @@
|
||||
{{ $target = "target=\"_blank\" rel=\"noopener\"" }}
|
||||
{{ end }}
|
||||
<li>
|
||||
<a itemprop="sameAs" href="{{ $link | safeURL }}" {{ $target | safeHTMLAttr }}>
|
||||
<a href="{{ $link | safeURL }}" {{ $target | safeHTMLAttr }}>
|
||||
<i class="{{ $pack }} {{ $pack_prefix }}-{{ .icon }} big-icon"></i>
|
||||
</a>
|
||||
</li>
|
||||
@@ -68,7 +66,7 @@
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-lg-8" itemprop="description">
|
||||
<div class="col-12 col-lg-8">
|
||||
|
||||
{{/* Only display widget title in explicit instances of about widget, not in author pages. */}}
|
||||
{{ if and $page.Params.widget $page.Title }}<h1>{{ $page.Title | markdownify | emojify }}</h1>{{ end }}
|
||||
|
||||
Reference in new issue
Block a user