Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
malcomio committed Jun 27, 2024
1 parent 67d86eb commit 0c8c007
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 35 deletions.
6 changes: 4 additions & 2 deletions _includes/author-info.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
{% assign author_classes = 'author-info columns' %}
<div class="author-info-wrapper clearfix">
{% if author.avatar %}
{% assign author_classes = author_classes | append: ' medium-9' %}
<img itemprop="image" src="{{ author.avatar }}" class="notepad-post-author-avatar medium-3 columns" alt="">
{% assign author_classes = author_classes | append: ' small-8 medium-9' %}
<div class="notepad-post-author-avatar small-4 medium-3 columns">
<img itemprop="image" src="{{ author.avatar }}" class="author-avatar" alt="{{ author.name }}">
</div>
{% endif %}

<div class="{{ author_classes }}">
Expand Down
51 changes: 18 additions & 33 deletions assets/css/components/_author.scss
Original file line number Diff line number Diff line change
@@ -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 {
Expand All @@ -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;
Expand Down Expand Up @@ -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%;
}
}

Expand All @@ -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;
}
}
}

0 comments on commit 0c8c007

Please sign in to comment.