aboutsummaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to 'templates')
-rw-r--r--templates/explore/repo_list.tmpl7
-rw-r--r--templates/org/team/repositories.tmpl7
-rw-r--r--templates/repo/header.tmpl11
-rw-r--r--templates/repo/icon.tmpl21
4 files changed, 16 insertions, 30 deletions
diff --git a/templates/explore/repo_list.tmpl b/templates/explore/repo_list.tmpl
index 44f7900327..260f165b73 100644
--- a/templates/explore/repo_list.tmpl
+++ b/templates/explore/repo_list.tmpl
@@ -2,12 +2,7 @@
{{range .Repos}}
<div class="flex-item">
<div class="flex-item-leading">
- {{$avatar := (repoAvatar . 32)}}
- {{if $avatar}}
- {{$avatar}}
- {{else}}
- {{template "repo/icon" .}}
- {{end}}
+ {{template "repo/icon" .}}
</div>
<div class="flex-item-main">
<div class="flex-item-header">
diff --git a/templates/org/team/repositories.tmpl b/templates/org/team/repositories.tmpl
index 698b0a91ba..ab5f6c6e75 100644
--- a/templates/org/team/repositories.tmpl
+++ b/templates/org/team/repositories.tmpl
@@ -30,12 +30,7 @@
{{range .Team.Repos}}
<div class="flex-item flex-item-center">
<div class="flex-item-leading">
- {{$avatar := (repoAvatar . 32)}}
- {{if $avatar}}
- {{$avatar}}
- {{else}}
- {{template "repo/icon" .}}
- {{end}}
+ {{template "repo/icon" .}}
</div>
<div class="flex-item-main">
<a class="flex-item-title text primary" href="{{$.Org.HomeLink}}/{{.Name | PathEscape}}">
diff --git a/templates/repo/header.tmpl b/templates/repo/header.tmpl
index 865f3ba4a7..984e9f044e 100644
--- a/templates/repo/header.tmpl
+++ b/templates/repo/header.tmpl
@@ -4,14 +4,9 @@
<div class="repo-header">
<div class="repo-title-wrap gt-df gt-fc">
<div class="repo-title" role="heading" aria-level="1">
- {{$avatar := (repoAvatar . 32 "gt-mr-3")}}
- {{if $avatar}}
- {{$avatar}}
- {{else}}
- <div class="gt-mr-3">
- {{template "repo/icon" .}}
- </div>
- {{end}}
+ <div class="gt-mr-3">
+ {{template "repo/icon" .}}
+ </div>
<a href="{{.Owner.HomeLink}}">{{.Owner.Name}}</a>
<div class="gt-mx-2">/</div>
<a href="{{$.RepoLink}}">{{.Name}}</a>
diff --git a/templates/repo/icon.tmpl b/templates/repo/icon.tmpl
index a37197d42a..6c63e6eca6 100644
--- a/templates/repo/icon.tmpl
+++ b/templates/repo/icon.tmpl
@@ -1,15 +1,16 @@
<div class="repo-icon">
- {{if $.IsTemplate}}
+ {{$avatarLink := .RelAvatarLink}}
+ {{if $avatarLink}}
+ <img class="ui avatar gt-vm" src="{{$avatarLink}}" width="32" height="32" alt="{{.FullName}}">
+ {{else if $.IsTemplate}}
{{svg "octicon-repo-template" 32}}
+ {{else if $.IsPrivate}}
+ {{svg "octicon-lock" 32}}
+ {{else if $.IsMirror}}
+ {{svg "octicon-mirror" 32}}
+ {{else if $.IsFork}}
+ {{svg "octicon-repo-forked" 32}}
{{else}}
- {{if $.IsPrivate}}
- {{svg "octicon-lock" 32}}
- {{else if $.IsMirror}}
- {{svg "octicon-mirror" 32}}
- {{else if $.IsFork}}
- {{svg "octicon-repo-forked" 32}}
- {{else}}
- {{svg "octicon-repo" 32}}
- {{end}}
+ {{svg "octicon-repo" 32}}
{{end}}
</div>