Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated Program Areas page so projects are dynamically rendered #3593

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion _projects/guides-team.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ location:
- Remote
partner:
tools:
program area:
program-area:
- Civic Tech Infrastructure
status: Active
# If the card should not be included on the site, change visible to "false"
Expand Down
12 changes: 8 additions & 4 deletions pages/program-areas.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ <h1 class="title1">Program Areas</h1>
<section class="content-section content--program-areas">
{% assign sorted_program_areas = site.data.internal.program-areas | sort %}
{% for program_areas in sorted_program_areas %}
{% if program_areas[1].size > 0 %}
{% if program_areas[1].size > 0 %}
<div class="page-card card-primary page-card-lg page-card-container">
<div class="page-card-image-container">
<img class="page-card-image" src="{{ program_areas[1].image }}" alt="{{ program_areas[1].image_alt }}" />
Expand All @@ -39,11 +39,15 @@ <h2 class="title4">{{program_areas[1].name}}</h2>
{% endif %}<br>
</p>
<ul class="project-card-mini-list-alignment">
{% for project in program_areas[1].projects%}
<li class="project-card-mini inline-list" id="{{project.id}}">
{% for project in site.projects %}
{% for project_program in project.program-area %}
{% if program_areas[1].program-area == project_program %}
<li class="project-card-mini inline-list" id="{{project.identification}}">
<img class="project-card-mini-image" src="{{project.image}}" alt="{{project.image_alt}}" />
<a class="project-card-mini-title" href="{{project.link}}">{{project.name}}</a>
<a class="project-card-mini-title" href="{{project.links[0].url}}">{{project.title}}</a>
</li>
{% endif %}
{% endfor %}
{% endfor %}
<!--Spacer li are used to center the project card mini on mobile-->
<li class="project-card-mini-spacer"></li>
Expand Down