Skip to content

Commit

Permalink
Improve styles when subscribers feature is not enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
eddiesigner committed May 26, 2019
1 parent 5187b73 commit cba6094
Show file tree
Hide file tree
Showing 10 changed files with 39 additions and 7 deletions.
2 changes: 1 addition & 1 deletion assets/css/app.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,5 +54,5 @@
"desktop": "assets/screenshot-desktop.jpg",
"mobile": "assets/screenshot-mobile.jpg"
},
"version": "0.1.6"
"version": "0.1.7"
}
2 changes: 1 addition & 1 deletion partials/loop.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
</div>
{{/is}}
{{else}}
<header class="m-heading">
<header class="m-heading no-margin">
<h3>No posts found</h3>
<p>
Apparently there are no posts at the moment, check again later.
Expand Down
4 changes: 4 additions & 0 deletions post.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,11 @@ into the {body} of the default.hbs template --}}
</div>
</section>
{{/if}}
{{#if @labs.subscribers}}
<section class="m-author">
{{else}}
<section class="m-author no-subscribers">
{{/if}}
<div class="m-author__content">
<div class="m-author__picture">
<a href="{{primary_author.url}}" class="m-author-picture" aria-label="Author picture">
Expand Down
1 change: 1 addition & 0 deletions src/sass/app.scss
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
@import "components/articles/article-card";
@import "components/articles/featured-slider";
@import "components/articles/featured-article";
@import "components/articles/recommended";
@import "components/articles/recommended-articles";
@import "components/articles/recommended-slider";
@import "components/articles/share";
Expand Down
1 change: 1 addition & 0 deletions src/sass/common/_global.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ body {
font-size: 1rem;
font-family: 'Source Sans Pro', Helvetica, Arial, sans-serif;
font-display: swap;
overflow-x: hidden;
background-color: white;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
Expand Down
7 changes: 7 additions & 0 deletions src/sass/components/articles/_recommended.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.m-recommended {
padding-top: 40px;

@include respond-to('medium') {
padding-top: 60px;
}
}
8 changes: 8 additions & 0 deletions src/sass/components/author/_author.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
.m-author {
padding: 40px $mobile-space;
border-color: $light-blue;
border-top-width: 2px;
border-bottom-width: 2px;
border-style: solid;
margin: 0 auto;

@include respond-to('medium') {
Expand All @@ -11,6 +15,10 @@
@include respond-to('extra-large') {
padding: 60px 0;
}

&.no-subscribers {
background-color: $light-blue;
}
}

.m-author__content {
Expand Down
4 changes: 4 additions & 0 deletions src/sass/components/heading/_heading.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,8 @@
margin-bottom: 50px;
}
}

&.no-margin {
margin-bottom: 0 !important;
}
}
15 changes: 11 additions & 4 deletions src/sass/layouts/_post-content.scss
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
.l-post-content {
padding-bottom: 15px;

@include respond-to('medium') {
max-width: 820px;
margin: 0 auto;
}

&.has-subscribe-form {
padding-bottom: 15px;

@include respond-to('medium') {
padding-bottom: 30px;
Expand Down Expand Up @@ -184,6 +182,15 @@
}
}

&.kg-width-full {
@include respond-to('medium') {
width: 100vw;
margin-left: 50%;

@include transform(translateX(-50%));
}
}

img,
.kg-image {
display: block;
Expand Down

0 comments on commit cba6094

Please sign in to comment.