|
1 | | -{% assign authorsString = guide.page.authors | join: ", @" %} |
| 1 | +{% if guide.page.authors %} |
| 2 | + {% assign authors = guide.page.authors %} |
| 3 | +{% else %} |
| 4 | + {% assign authors = 'GitHub' | split: ' ' %} |
| 5 | +{% endif %} |
| 6 | +{% assign authorsString = authors | join: ", @" %} |
2 | 7 |
|
3 | 8 | <div class="col-lg-4 col-12 mb-3"> |
4 | 9 | <a class="Box box-shadow-medium height-full d-block hover-shadow-large no-underline text-gray-dark p-5" href="{{ guide.href }}"> |
5 | 10 | <h2>{{ guide.title }}</h2> |
6 | 11 | <p class="mt-2 mb-4 text-gray-light">{{ guide.intro }}</p> |
7 | 12 |
|
8 | | - {% if guide.page.authors and guide.page.authors.length > 0 %} |
9 | | - <footer class="d-flex"> |
10 | | - <div class="mr-1"> |
11 | | - {% if guide.page.authors.length == 1 %} |
12 | | - <img class="avatar avatar-2 circle mr-1" src="https://github.com/{{ guide.page.authors[0] }}.png" alt="@{{ guide.page.authors[0] }}" /> |
13 | | - {% else %} |
14 | | - <div class="AvatarStack AvatarStack--three-plus"> |
15 | | - <div |
16 | | - class="AvatarStack-body tooltipped tooltipped-se tooltipped-align-left-1" |
17 | | - aria-label="@{{ authorsString }}" |
18 | | - > |
19 | | - {% for author in guide.page.authors %} |
20 | | - <img |
21 | | - class="avatar circle" |
22 | | - alt="@{{ author }}" |
23 | | - src="https://github.com/{{ author }}.png" |
24 | | - /> |
25 | | - {% endfor %} |
26 | | - </div> |
| 13 | + <footer class="d-flex"> |
| 14 | + <div class="mr-1"> |
| 15 | + {% if authors.length == 1 %} |
| 16 | + <img class="avatar avatar-2 circle mr-1" src="https://github.com/{{ authors[0] }}.png" alt="@{{ authors[0] }}" /> |
| 17 | + {% else %} |
| 18 | + <div class="AvatarStack AvatarStack--three-plus"> |
| 19 | + <div |
| 20 | + class="AvatarStack-body tooltipped tooltipped-se tooltipped-align-left-1" |
| 21 | + aria-label="@{{ authorsString }}" |
| 22 | + > |
| 23 | + {% for author in authors %} |
| 24 | + <img |
| 25 | + class="avatar circle" |
| 26 | + alt="@{{ author }}" |
| 27 | + src="https://github.com/{{ author }}.png" |
| 28 | + /> |
| 29 | + {% endfor %} |
27 | 30 | </div> |
28 | | - {% endif %} |
29 | | - </div> |
| 31 | + </div> |
| 32 | + {% endif %} |
| 33 | + </div> |
30 | 34 |
|
31 | | - <div> |
32 | | - @{{ authorsString }} |
33 | | - </div> |
34 | | - </footer> |
35 | | - {% endif %} |
| 35 | + <div> |
| 36 | + @{{ authorsString }} |
| 37 | + </div> |
| 38 | + </footer> |
36 | 39 | </a> |
37 | 40 | </div> |
0 commit comments