|
| 1 | +{% comment %} |
| 2 | + Vertical list showing all contributors to a library or release. |
| 3 | + Has two variants: Contributors in release, or all contributors. The release variant is a single column, |
| 4 | + all contributors is a differing number of columns depending on screen size. |
| 5 | + |
| 6 | + Inputs: |
| 7 | + - title: str, required - top title of card |
| 8 | + - variant: str, required - choice of release or all, determines display layout |
| 9 | + - contributors: list, required - List of contributors, matching the author input of _user_profile.html |
| 10 | + - heading_level: int, optional - Set the semantic leve of the heading, defaults to 2, does not allow for h1 |
| 11 | + |
| 12 | + Usage: |
| 13 | + {% include "v3/includes/_contributors_list.html" with title="Contributors: This Release" variant="release" contributors=contributors %} |
| 14 | +{% endcomment %} |
| 15 | +<div class="basic-card card py-large contributors-list {% if variant == 'all' %} all-contributors {% endif %}"> |
| 16 | + <div class="card__header"> |
| 17 | + {% if heading_level == '2' or not heading_level %} |
| 18 | + <h2 class="card__title">{{ title }}</h2> |
| 19 | + {% elif heading_level == '3' %} |
| 20 | + <h3 class="card__title">{{ title }}</h3> |
| 21 | + {% elif heading_level == '4' %} |
| 22 | + <h4 class="card__title">{{ title }}</h4> |
| 23 | + {% elif heading_level == '5' %} |
| 24 | + <h5 class="card__title">{{ title }}</h5> |
| 25 | + {% elif heading_level == '6' %} |
| 26 | + <h6 class="card__title">{{ title }}</h6> |
| 27 | + {% endif %} |
| 28 | + </div> |
| 29 | + <hr class="card__hr" /> |
| 30 | + <div class="card__column px-large"> |
| 31 | + {% for contributor in contributors %} |
| 32 | + {% include "v3/includes/_user_profile.html" with author=contributor only %} |
| 33 | + {% endfor %} |
| 34 | + </div> |
| 35 | +</div> |
0 commit comments