From 0c8c007158801ff126ccbc304929dc62baa7e2b2 Mon Sep 17 00:00:00 2001 From: capgemini Date: Thu, 27 Jun 2024 17:11:16 +0000 Subject: [PATCH] Update from https://github.com/Capgemini/blog-private/commit/f583ac94164a7fb53c4f1e2fdf2d16e2284134f3 --- _includes/author-info.html | 6 ++-- assets/css/components/_author.scss | 51 +++++++++++------------------- 2 files changed, 22 insertions(+), 35 deletions(-) diff --git a/_includes/author-info.html b/_includes/author-info.html index 27bf4c6..189d74c 100644 --- a/_includes/author-info.html +++ b/_includes/author-info.html @@ -1,8 +1,10 @@ {% assign author_classes = 'author-info columns' %}
{% if author.avatar %} - {% assign author_classes = author_classes | append: ' medium-9' %} - + {% assign author_classes = author_classes | append: ' small-8 medium-9' %} + {% endif %}
diff --git a/assets/css/components/_author.scss b/assets/css/components/_author.scss index 87ce868..eb823ca 100644 --- a/assets/css/components/_author.scss +++ b/assets/css/components/_author.scss @@ -1,10 +1,10 @@ .notepad-author-info { - padding: 2rem 1rem; background: $grey-lighter; + padding: 2rem 0; @include breakpoint(tablet) { - padding: 2rem; + padding: 2rem 1rem; } h2 { @@ -15,12 +15,15 @@ .notepad-post-author { @extend %notepad-clearfix; padding: 0 1.875rem; - text-align: center; @include breakpoint(mobileonly) { padding: 0 0.75rem; } + .row-even & { + text-align: right; + } + h1 { margin: 0 0 1rem; padding: 0; @@ -49,16 +52,19 @@ } .notepad-post-author-avatar { - max-width: 50%; - float: none; - margin-right: 0; - margin-bottom: 1rem; - border-radius: 50%; + .row-odd & { + float: left; + } - @include breakpoint(mobileonly) { - width: 7.5rem; - height: 7.5rem; - padding: 0; + .row-even & { + float: right; + } + + img { + float: none; + display: block; + margin: 1rem auto; + border-radius: 50%; } } @@ -85,24 +91,3 @@ padding-left: 0; margin-bottom: 1rem; } - -@include breakpoint(tablet) { - .notepad-post-author-avatar { - .row-odd & { - float: left; - } - - .row-even & { - float: right; - } - } - - .notepad-post-author { - text-align: left; - - .row-even & { - text-align: right; - } - } -} -