mirror of
https://github.com/gcushen/hugo-academic.git
synced 2025-07-26 19:15:16 +02:00
about: Support avatars from Gravatar.com (#194)
This commit is contained in:
parent
b53076e1f8
commit
ba84760563
2 changed files with 8 additions and 5 deletions
|
@ -23,7 +23,8 @@ defaultContentLanguageInSubdir = false
|
||||||
role = "Professor of Artificial Intelligence"
|
role = "Professor of Artificial Intelligence"
|
||||||
organization = "Stanford University"
|
organization = "Stanford University"
|
||||||
organization_url = ""
|
organization_url = ""
|
||||||
avatar = "portrait.jpg"
|
gravatar = false # Get your avatar from Gravatar.com? (true/false)
|
||||||
|
avatar = "portrait.jpg" # Specify an avatar image (in `static/img/` folder) or delete value to disable avatar.
|
||||||
email = "test@example.org"
|
email = "test@example.org"
|
||||||
address = "Building 1 Room 1, Stanford University, California, 90210, USA"
|
address = "Building 1 Room 1, Stanford University, California, 90210, USA"
|
||||||
office_hours = "Monday 10:00 to 13:00 or email for appointment"
|
office_hours = "Monday 10:00 to 13:00 or email for appointment"
|
||||||
|
|
|
@ -6,10 +6,12 @@
|
||||||
<div class="col-xs-12 col-md-4">
|
<div class="col-xs-12 col-md-4">
|
||||||
<div id="profile">
|
<div id="profile">
|
||||||
|
|
||||||
{{ with $.Site.Params.avatar }}
|
{{ if $.Site.Params.gravatar }}
|
||||||
<div class="portrait" style="background-image: url('{{ $.Site.BaseURL }}img/{{ . }}');">
|
<div class="portrait" style="background-image: url('https://s.gravatar.com/avatar/{{ md5 $.Site.Params.email }}?s=200');"></div>
|
||||||
</div>
|
<meta itemprop="image" content="https://s.gravatar.com/avatar/{{ md5 $.Site.Params.email }}?s=200">
|
||||||
<meta itemprop="image" content="{{ $.Site.BaseURL }}img/{{ . }}">
|
{{ else if $.Site.Params.avatar }}
|
||||||
|
<div class="portrait" style="background-image: url('{{ $.Site.BaseURL }}img/{{ $.Site.Params.avatar }}');"></div>
|
||||||
|
<meta itemprop="image" content="{{ $.Site.BaseURL }}img/{{ $.Site.Params.avatar }}">
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
<div class="portrait-title">
|
<div class="portrait-title">
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue