-
Notifications
You must be signed in to change notification settings - Fork 311
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Correct the blog post and blog page templates
This commit: - Fixes the header, so the title appears - Removes unused parts of templates - Removes unused filters - Renames `image_accessibility` to `image_alt` site-wide - Sets up partials for images - Adjusts image asset paths - Incidentally removes a duplicate layout (`primary` and `guides` were the same)
- Loading branch information
Showing
48 changed files
with
163 additions
and
233 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 |
---|---|---|
@@ -0,0 +1,38 @@ | ||
{% assign previous = collections.posts | getPreviousCollectionItem: page %} | ||
{% assign next = collections.posts | getNextCollectionItem: page %} | ||
{% if previous or next %} | ||
<section class="margin-top-6 post-pagination"> | ||
<div class="grid-container"> | ||
<hr class="hr-1-base-lighter"> | ||
<div class="grid-row grid-gap"> | ||
<div class="grid-col-6"> | ||
{% if previous %} | ||
<a href="{{ previous.url | url }}" | ||
class="text-no-underline post-pagination__link" | ||
> | ||
<h2 class="post-pagination__heading"> | ||
{% include "svg/icons/arrow-left.svg" %} | ||
Previous Post | ||
</h2> | ||
<p class="measure-1 text-bold text-primary-darkest">{{ previous.data.title }}</p> | ||
</a> | ||
{% endif %} | ||
</div> | ||
<div class="grid-col-6 text-right"> | ||
{% if next %} | ||
<a href="{{ next.url | url }}" | ||
class="text-no-underline post-pagination__link" | ||
> | ||
<h2 class="post-pagination__heading"> | ||
Next Post | ||
{% include "svg/icons/arrow-right.svg" %} | ||
</h2> | ||
<p class="measure-1 float-right text-bold text-primary-darkest text-right">{{ next.data.title }}</p> | ||
</a> | ||
{% endif %} | ||
</div> | ||
</div> | ||
<hr class="hr-1-base-lighter"> | ||
</div> | ||
</section> | ||
{% endif %} |
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,11 @@ | ||
{% if image and image_feature_small %} | ||
{% comment %} | ||
The blog posts frontmatter has historically had the image paths set | ||
with an absolute path, by including the leading slash. | ||
|
||
The image shortcode needs the image URL without that slash, | ||
hence the assign statement here removing the first one. | ||
{% endcomment %} | ||
{% assign rel_image_path = image | remove_first: "/" %} | ||
{% image_with_class rel_image_path "image-feature-small" image_alt %} | ||
{% endif %} |
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,11 +1,16 @@ | ||
{% assign include_image = image | default: page.image %} | ||
{% assign include_image_alt = image | default: page.image_alt | default: "" %} | ||
{% assign include_figcaption = image_figcaption | default: page.image_figcaption %} | ||
|
||
{% if page.hero %} | ||
<figure class="post-feature_image" role="img" title="{{ include_image_alt }}" style="background-image: url('{{ site.baseurl }}{{ include_image }}')"> | ||
{% if include_figcaption %} | ||
<figcaption>{{- include_figcaption -}}</figcaption> | ||
{% endif %} | ||
</figure> | ||
{% if image %} | ||
{% comment %} | ||
I'm wondering if there's a better way to do this, like setting up | ||
a shortcode. | ||
{% endcomment %} | ||
<figure | ||
class="post-feature_image" | ||
role="img" | ||
title="{{ image_alt }}" | ||
style="background-image: url('{{ image | url }}')" | ||
> | ||
{% if image_figcaption %} | ||
<figcaption>{{ image_figcaption }}</figcaption> | ||
{% endif %} | ||
</figure> | ||
{% endif %} |
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 was deleted.
Oops, something went wrong.
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
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
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
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
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
Oops, something went wrong.