summaryrefslogtreecommitdiffstats
path: root/templates/repo/icon.tmpl
diff options
context:
space:
mode:
Diffstat (limited to 'templates/repo/icon.tmpl')
-rw-r--r--templates/repo/icon.tmpl20
1 files changed, 20 insertions, 0 deletions
diff --git a/templates/repo/icon.tmpl b/templates/repo/icon.tmpl
new file mode 100644
index 0000000000..b4d8a24560
--- /dev/null
+++ b/templates/repo/icon.tmpl
@@ -0,0 +1,20 @@
+<div class="repo-icon mr-3">
+ {{if $.IsTemplate}}
+ {{svg "octicon-repo-template" 32}}
+ {{else}}
+ {{if $.IsPrivate}}
+ {{svg "octicon-lock" 32}}
+ {{else if and (not $.IsMirror) (not $.IsFork) ($.Owner)}}
+ {{svg "octicon-repo" 32}}
+ {{if $.Owner.Visibility.IsPrivate}}
+ {{avatar $.Owner}}
+ {{end}}
+ {{else if $.IsMirror}}
+ {{svg "octicon-mirror" 32}}
+ {{else if $.IsFork}}
+ {{svg "octicon-repo-forked" 32}}
+ {{else}}
+ {{svg "octicon-repo" 32}}
+ {{end}}
+ {{end}}
+</div>