-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- adds featured image to archive page - adds featured image to top of post
- Loading branch information
1 parent
fda4aa5
commit caeb1b7
Showing
4 changed files
with
43 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,19 @@ | ||
<article id="post-{{ post.id }}"> | ||
<h2> | ||
{{ post.title }} | ||
</h2> | ||
<article id="post-{{ post.id }}" class="post-preview"> | ||
{% if post.thumbnail %} | ||
<img | ||
src="{{ post.thumbnail.src('thumbnail') }}" | ||
class="post-preview__featured-image" | ||
{% if post.thumbnail.alt and post.thumbnail.alt|length > 0 %} | ||
alt="{{ post.thumbnail.alt }}" | ||
{% endif %} | ||
/> | ||
{% endif %} | ||
<div> | ||
{{ post.preview }} | ||
<h2 class="post-preview__title"> | ||
{{ post.title }} | ||
</h2> | ||
<div> | ||
{{ post.preview }} | ||
</div> | ||
</div> | ||
</article> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
.post-preview { | ||
margin-bottom: 1.5rem; | ||
min-height: 9.375rem; // 150px | ||
|
||
@media (min-width: 50rem) { | ||
display: flex; | ||
column-gap: 1.5rem; | ||
} | ||
|
||
&__title { | ||
margin: 0 0 1rem; | ||
} | ||
|
||
&__featured-image { | ||
max-height: 9.375rem; // 150px | ||
max-width: 9.375rem; // 150px | ||
width: auto; | ||
height: auto; | ||
} | ||
} |