forked from github/docs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Default to "GitHub" as author in guide-card (github#16717)
* Default authors to ['GitHub'] * Remove now-redundant GitHub authors
- Loading branch information
Showing
3 changed files
with
30 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,40 @@ | ||
{% assign authorsString = guide.page.authors | join: ", @" %} | ||
{% if guide.page.authors %} | ||
{% assign authors = guide.page.authors %} | ||
{% else %} | ||
{% assign authors = 'GitHub' | split: ' ' %} | ||
{% endif %} | ||
{% assign authorsString = authors | join: ", @" %} | ||
|
||
<div class="col-lg-4 col-12 mb-3"> | ||
<a class="Box box-shadow-medium height-full d-block hover-shadow-large no-underline text-gray-dark p-5" href="{{ guide.href }}"> | ||
<h2>{{ guide.title }}</h2> | ||
<p class="mt-2 mb-4 text-gray-light">{{ guide.intro }}</p> | ||
|
||
{% if guide.page.authors and guide.page.authors.length > 0 %} | ||
<footer class="d-flex"> | ||
<div class="mr-1"> | ||
{% if guide.page.authors.length == 1 %} | ||
<img class="avatar avatar-2 circle mr-1" src="https://github.com/{{ guide.page.authors[0] }}.png" alt="@{{ guide.page.authors[0] }}" /> | ||
{% else %} | ||
<div class="AvatarStack AvatarStack--three-plus"> | ||
<div | ||
class="AvatarStack-body tooltipped tooltipped-se tooltipped-align-left-1" | ||
aria-label="@{{ authorsString }}" | ||
> | ||
{% for author in guide.page.authors %} | ||
<img | ||
class="avatar circle" | ||
alt="@{{ author }}" | ||
src="https://github.com/{{ author }}.png" | ||
/> | ||
{% endfor %} | ||
</div> | ||
<footer class="d-flex"> | ||
<div class="mr-1"> | ||
{% if authors.length == 1 %} | ||
<img class="avatar avatar-2 circle mr-1" src="https://github.com/{{ authors[0] }}.png" alt="@{{ authors[0] }}" /> | ||
{% else %} | ||
<div class="AvatarStack AvatarStack--three-plus"> | ||
<div | ||
class="AvatarStack-body tooltipped tooltipped-se tooltipped-align-left-1" | ||
aria-label="@{{ authorsString }}" | ||
> | ||
{% for author in authors %} | ||
<img | ||
class="avatar circle" | ||
alt="@{{ author }}" | ||
src="https://github.com/{{ author }}.png" | ||
/> | ||
{% endfor %} | ||
</div> | ||
{% endif %} | ||
</div> | ||
</div> | ||
{% endif %} | ||
</div> | ||
|
||
<div> | ||
@{{ authorsString }} | ||
</div> | ||
</footer> | ||
{% endif %} | ||
<div> | ||
@{{ authorsString }} | ||
</div> | ||
</footer> | ||
</a> | ||
</div> |