Skip to content

Commit

Permalink
Merge pull request #162 from springload/fix/group-project-roles
Browse files Browse the repository at this point in the history
group project roles together
  • Loading branch information
sarahframe authored Aug 13, 2024
2 parents 65ed7b4 + f861de3 commit 713ffe5
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
12 changes: 12 additions & 0 deletions cdhweb/static_src/global/pages/project-page.scss
Original file line number Diff line number Diff line change
Expand Up @@ -86,3 +86,15 @@ the right of the content (when unstacked).
margin-block-start: 24px;
}
}

.project-page__side-content-item--same-role {
& + .project-page__side-content-item {
margin-block-start: 24px;
}
}

.project-page__side-content-item {
& + .project-page__side-content-item--same-role {
margin-block-start: 0;
}
}
8 changes: 6 additions & 2 deletions templates/projects/project_page.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,12 @@ <h2>Links</h2>
<h2>Team</h2>

{% for membership in page.current_memberships %}
<div class="project-page__side-content-item">
<h3>{{ membership.role }}</h3>
{% ifchanged membership.role %}
<div class="project-page__side-content-item">
{% else %}
<div class="project-page__side-content-item--same-role">
{% endifchanged %}
{% ifchanged %}<h3>{{ membership.role }}</h3>{% endifchanged %}
<div>
{% include 'includes/project_membership.html' with member=membership.person %}
</div>
Expand Down

0 comments on commit 713ffe5

Please sign in to comment.