Skip to content

Commit

Permalink
Fellow Page Breadcrumb (#597)
Browse files Browse the repository at this point in the history
* create PR for fellow page breadcrumb

* Add breadcrumb to fellow pages

* fix navigation arrow

* update url

* Add no results found to fellow filters

* add alt to breadcrumb links

* remove period
  • Loading branch information
jaredbain authored Dec 3, 2024
1 parent fd3faf0 commit 252357c
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 2 deletions.
8 changes: 7 additions & 1 deletion _includes/fellows-list.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{% assign aria_id = fellow.title | url_encode | truncate: 15, "" %}

{% if paginator.posts.size > 0 %}
{% for fellow in paginator.posts %}
<div class="fellow-card">
<a href="{{ site.baseurl }}{{ fellow.url }}" aria-labelledby="{{ aria_id }}">
Expand All @@ -22,5 +24,9 @@ <h2 class="body-intro--bold" id="{{ aria_id }}">{{ fellow.title }}</h2>
</div>

{% endfor %}

{% else %}
<div class="no-results" style="padding-left:10px;">
<p> No results found </p>
</div>
{% endif %}

23 changes: 22 additions & 1 deletion _layouts/fellow.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,27 @@
<div class="grid-row grid-gap">
{% include fellow-aside.html fellow_project=page.project fellow_agency=page.agency fellow_year=page.fellow_year fellow_hometown=page.hometown fellow_track=page.track fellow_education=page.university %}
<div class="usa-layout-docs__main desktop:grid-col-9 usa-prose">
<!-- BREADCRUMB -->
<div>
<nav class="usa-breadcrumb usa-breadcrumb--wrap" aria-label="Breadcrumbs,,,">
<ol class="usa-breadcrumb__list">
<li class="usa-breadcrumb__list-item">
<a href="{{site.baseurl}}/" class="usa-breadcrumb__link" ><span alt="Home">Home</span></a>
</li>
<li class="usa-breadcrumb__list-item">
<a href="{{site.baseurl}}/fellows" class="usa-breadcrumb__link"
><span alt="Fellow Page">Fellows</span></a
>
</li>
<li class="usa-breadcrumb__list-item usa-current" aria-current="page">
<span
>{{page.title}}</span
>
</li>
</ol>
</nav>
</div>

<h2>{{page.title}}</h2>
<!-- <p class="usa-intro">
{{ page.bio_short }}
Expand Down Expand Up @@ -43,4 +64,4 @@ <h2>{{page.title}}</h2>
<section class="usa-section">
{% include last-modified.html %}
{% include_cached touchpoint-survey-script.html %}
</section>
</section>
4 changes: 4 additions & 0 deletions _sass/pages/_fellows.scss
Original file line number Diff line number Diff line change
Expand Up @@ -229,4 +229,8 @@

.fellow-funFact{
@include u-padding-top(4);
}

.usa-breadcrumb__list-item:not(:last-child)::after {
mask: url(../images/icons/navigate_next.svg) no-repeat center / contain;
}
1 change: 1 addition & 0 deletions assets/images/icons/navigate_next.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 252357c

Please sign in to comment.