Skip to content
This repository has been archived by the owner on May 3, 2020. It is now read-only.

Commit

Permalink
Reworked image post header
Browse files Browse the repository at this point in the history
Makes the image the same width as the content, and don't make the beginning of the content step on it
  • Loading branch information
angristan committed Jan 27, 2018
1 parent b1c66a9 commit 1c0fd7d
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 6 deletions.
2 changes: 1 addition & 1 deletion assets/built/custom.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion assets/built/custom.css.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 30 additions & 0 deletions assets/css/custom.css
Expand Up @@ -92,4 +92,34 @@
/* Reduce margin top and bottom for pictures and videos by 1em */
.post-full-content img, .post-full-content video {
margin: 0.5em auto;
}

/* Reduce padding top of the post header by 4vw */
.post-full-header {
padding: 3vw 3vw 3vw;
}

/* Reduce padding top and bottom of the post header on mobile */
@media (max-width: 500px) {
.post-full-header {
padding: 10vw 3vw 8vw;
}
}

/* Center the header post image */
.post-header-image {
display: block;
margin: auto;
}

/* Remove the shadows as we move up the image */
.post-full-content::before, .post-full-content::after {
display: none;
}

/* Add padding under the header post image on mobile */
@media (max-width: 500px) {
.post-full-content {
padding: 30px 0 0;
}
}
3 changes: 1 addition & 2 deletions page.hbs
Expand Up @@ -22,8 +22,7 @@ into the {body} of the default.hbs template --}}
</header>

{{#if feature_image}}
<figure class="post-full-image" style="background-image: url({{feature_image}})">
</figure>
<img class="post-header-image" src="{{feature_image}}">
{{/if}}

<section class="post-full-content">
Expand Down
3 changes: 1 addition & 2 deletions post.hbs
Expand Up @@ -28,8 +28,7 @@ into the {body} of the default.hbs template --}}
</header>

{{#if feature_image}}
<figure class="post-full-image" style="background-image: url({{feature_image}})">
</figure>
<img class="post-header-image" src="{{feature_image}}">
{{/if}}

<section class="post-full-content">
Expand Down

0 comments on commit 1c0fd7d

Please sign in to comment.