diff options
author | Alan Pearce | 2017-06-17 17:35:40 +0200 |
---|---|---|
committer | Alan Pearce | 2017-06-17 17:35:40 +0200 |
commit | 31213261acdf834f65fd4f9999cb8f1281f81f22 (patch) | |
tree | e595d2f60ce332261a126bd223725c0db7b541cc | |
parent | e1f53d9a65f7cf830f6ea2df223c1fb5fb1ab596 (diff) | |
download | hyde-31213261acdf834f65fd4f9999cb8f1281f81f22.tar.lz hyde-31213261acdf834f65fd4f9999cb8f1281f81f22.tar.zst hyde-31213261acdf834f65fd4f9999cb8f1281f81f22.zip |
Show author image, if configured
-rw-r--r-- | layouts/partials/sidebar.html | 4 | ||||
-rw-r--r-- | static/css/hyde.css | 7 |
2 files changed, 11 insertions, 0 deletions
diff --git a/layouts/partials/sidebar.html b/layouts/partials/sidebar.html index 9d57c7c..749eb7c 100644 --- a/layouts/partials/sidebar.html +++ b/layouts/partials/sidebar.html @@ -1,5 +1,9 @@ <aside class="sidebar container"> <header class="sidebar-about h-card vcard p-author" itemprop="author" itemscope itemtype="http://schema.org/Person"> + {{ if (isset .Site.Author "image") }} + <img class="u-photo" src="{{ .Site.Author.image }}" width=128 height=128 /> + {{ end }} + {{ if eq .Title .Site.Title }} <h1 class="site-title u-name fn" itemprop="name">{{ .Site.Title }}</h1> {{ else }} diff --git a/static/css/hyde.css b/static/css/hyde.css index 5d429db..cad1095 100644 --- a/static/css/hyde.css +++ b/static/css/hyde.css @@ -91,6 +91,13 @@ code,pre { display: block; } +.u-photo { + margin: auto; + margin-bottom: 1rem; + border: 2px solid white; + border-radius: 50%; +} + .contact-head { color: #fff; margin-bottom: 0; |