forked from 18F/cv_faq
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add homepage order to frontmatter of promoted categories:
- Loading branch information
Heather
committed
Mar 19, 2020
1 parent
7d49dee
commit 7c57701
Showing
8 changed files
with
25 additions
and
18 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,25 @@ | ||
|
||
<section class="grid-container usa-section usa-section--condensed border-top border-base-lightest"> | ||
<div class="grid-row grid-gap"> | ||
{% assign categories = site.content | group_by:"category" %} | ||
{% assign promoted_site_categories = site.categories | where: "promoted", "true" %} | ||
{% assign promoted_site_categories = site.categories | where: "promoted", "true" | sort: "homepage_order" %} | ||
|
||
{% for site_category in promoted_site_categories limit:6 %} | ||
{% assign current_category = categories | where:"name", site_category.name | first %} | ||
{% assign category_questions = current_category.items %} | ||
<div class="usa-media-block tablet:grid-col-4 margin-bottom-3"> | ||
<h3>{{ site_category.title }}</h3> | ||
<ul class="usa-list usa-list--unstyled"> | ||
{% for question in category_questions limit:4 %} | ||
{% if page.lang == question.lang %} | ||
<li class="padding-y-1"> | ||
<a href="{{ site.baseurl }}/{{ site_category.name}}/#{{ question.title|slugify }}">{{ question.title }}</a> | ||
</li> | ||
{% endif %} | ||
{% endfor %} | ||
</ul> | ||
<a href="{{ site.baseurl }}/{{ site_category.name}}/" class="text-bold text-underline margin-y-1">View all <span class="usa-sr-only">questions about {{ site_category.title }} </span><span aria-hidden="true">»</span></a> | ||
</div> | ||
{% assign current_category = categories | where:"name", site_category.name | first %} | ||
{% assign category_questions = current_category.items %} | ||
<div class="usa-media-block tablet:grid-col-4 margin-bottom-3"> | ||
<h3>{{ site_category.title }}</h3> | ||
<ul class="usa-list usa-list--unstyled"> | ||
{% for question in category_questions limit:4 %} | ||
{% if page.lang == question.lang %} | ||
<li class="padding-y-1"> | ||
<a href="{{ site.baseurl }}/{{ site_category.name}}/#{{ question.title|slugify }}">{{ question.title }}</a> | ||
</li> | ||
{% endif %} | ||
{% endfor %} | ||
</ul> | ||
<a href="{{ site.baseurl }}/{{ site_category.name}}/" class="text-bold text-underline margin-y-1">View all <span | ||
class="usa-sr-only">questions about {{ site_category.title }} </span><span aria-hidden="true">»</span></a> | ||
</div> | ||
{% endfor %} | ||
</div> | ||
</section> | ||
</section> |