From f6ee7d89f922b8be7b3fe3c6c8e87651d0a5e366 Mon Sep 17 00:00:00 2001 From: John O'Nolan Date: Mon, 21 Jul 2014 20:19:49 +0200 Subject: [PATCH] Add author image to post author-box, if available --- assets/css/screen.css | 37 ++++++++++++++++++++++++++----------- post.hbs | 7 +++++-- 2 files changed, 31 insertions(+), 13 deletions(-) diff --git a/assets/css/screen.css b/assets/css/screen.css index 5597366..942c2e5 100644 --- a/assets/css/screen.css +++ b/assets/css/screen.css @@ -811,8 +811,8 @@ body:not(.post-template) .post-title { /* The author credit area after the post */ .post-footer { position: relative; - margin: 4rem 0 0 0; - padding: 4rem 0 0 0; + margin: 6rem 0 0 0; + padding: 6rem 0 0 0; border-top: #EBF2F6 1px solid; } @@ -882,7 +882,7 @@ body:not(.post-template) .post-title { links remain at a fixed width the whole time */ .post-footer .share { position: absolute; - top: 4rem; + top: 6rem; right: 0; width: 140px; } @@ -1025,26 +1025,41 @@ body:not(.post-template) .post-title { -moz-box-sizing: border-box; box-sizing: border-box; display: block; - position: relative; - width: 120px; - height: 120px; - margin: -100px auto 0; + position: absolute; + top: -40px; + left: 50%; + margin-left: -40px; + width: 80px; + height: 80px; border-radius: 100%; overflow: hidden; - padding: 3px; + padding: 6px; background: #fff; z-index: 2; + box-shadow: #E7EEF2 0 0 0 1px; } .author-image .img { + position: relative; display: block; - width: 114px; - height: 114px; + width: 100%; + height: 100%; background-size: cover; background-position: center center; border-radius: 100%; } +.author-profile .author-image { + position: relative; + left: auto; + top: auto; + width: 120px; + height: 120px; + padding: 3px; + margin: -100px auto 0 auto; + box-shadow: none; +} + .author-title { margin: 1.5rem 0 1rem; } @@ -1593,7 +1608,7 @@ body:not(.post-template) .post-title { } .post-footer { - padding: 4rem 0; + padding: 5rem 0 3rem 0; text-align: center; } diff --git a/post.hbs b/post.hbs index 4819aa8..9712b70 100644 --- a/post.hbs +++ b/post.hbs @@ -21,8 +21,11 @@