mirror of
https://github.com/gcushen/hugo-academic.git
synced 2025-07-26 03:00:50 +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"
|
||||
organization = "Stanford University"
|
||||
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"
|
||||
address = "Building 1 Room 1, Stanford University, California, 90210, USA"
|
||||
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 id="profile">
|
||||
|
||||
{{ with $.Site.Params.avatar }}
|
||||
<div class="portrait" style="background-image: url('{{ $.Site.BaseURL }}img/{{ . }}');">
|
||||
</div>
|
||||
<meta itemprop="image" content="{{ $.Site.BaseURL }}img/{{ . }}">
|
||||
{{ if $.Site.Params.gravatar }}
|
||||
<div class="portrait" style="background-image: url('https://s.gravatar.com/avatar/{{ md5 $.Site.Params.email }}?s=200');"></div>
|
||||
<meta itemprop="image" content="https://s.gravatar.com/avatar/{{ md5 $.Site.Params.email }}?s=200">
|
||||
{{ 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 }}
|
||||
|
||||
<div class="portrait-title">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue