aboutsummaryrefslogtreecommitdiffstats
path: root/templates/explore
diff options
context:
space:
mode:
authorJohn Olheiser <42128690+jolheiser@users.noreply.github.com>2020-02-11 11:02:41 -0600
committerGitHub <noreply@github.com>2020-02-11 12:02:41 -0500
commit86fdba177ad82f3dcdfc237631fef4588042b9d6 (patch)
tree9ee1c1f97a158436e36828d1072fa84fac222317 /templates/explore
parente704f7fae7b212902ddd2859d8f88350630b4086 (diff)
downloadgitea-86fdba177ad82f3dcdfc237631fef4588042b9d6.tar.gz
gitea-86fdba177ad82f3dcdfc237631fef4588042b9d6.zip
Add Octicon SVG spritemap (#10107)
* Add octicon SVG sprite Signed-off-by: jolheiser <john.olheiser@gmail.com> * Static prefix Signed-off-by: jolheiser <john.olheiser@gmail.com> * SVG for all repo icons Signed-off-by: jolheiser <john.olheiser@gmail.com> * make vendor Signed-off-by: jolheiser <john.olheiser@gmail.com> * Swap out octicons Signed-off-by: jolheiser <john.olheiser@gmail.com> * Move octicons to top of less imports Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix JS Signed-off-by: jolheiser <john.olheiser@gmail.com> * Definitely not a search/replace Signed-off-by: jolheiser <john.olheiser@gmail.com> * Missed regex Signed-off-by: jolheiser <john.olheiser@gmail.com> * Move to more generic calls and webpack Signed-off-by: jolheiser <john.olheiser@gmail.com> * make svg -> make webpack Signed-off-by: jolheiser <john.olheiser@gmail.com> * Remove svg-sprite Signed-off-by: jolheiser <john.olheiser@gmail.com> * Update tests Signed-off-by: jolheiser <john.olheiser@gmail.com> * Missed a test Signed-off-by: jolheiser <john.olheiser@gmail.com> * Remove svg from makefile Signed-off-by: jolheiser <john.olheiser@gmail.com> * Suggestions Signed-off-by: jolheiser <john.olheiser@gmail.com> * Attempt to fix test Signed-off-by: jolheiser <john.olheiser@gmail.com> * Update tests Signed-off-by: jolheiser <john.olheiser@gmail.com> * Revert timetracking test Signed-off-by: jolheiser <john.olheiser@gmail.com> * Swap .octicon for .svg in less Signed-off-by: jolheiser <john.olheiser@gmail.com> * Add aria-hidden Signed-off-by: jolheiser <john.olheiser@gmail.com> * Replace mega-octicon Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix webpack globbing on Windows Signed-off-by: jolheiser <john.olheiser@gmail.com> * Revert Co-Authored-By: silverwind <me@silverwind.io> * Fix octions from upstream Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix Vue and missed JS function Signed-off-by: jolheiser <john.olheiser@gmail.com> * Add JS helper and PWA Signed-off-by: jolheiser <john.olheiser@gmail.com> * Preload SVG Signed-off-by: jolheiser <john.olheiser@gmail.com> Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: techknowlogick <matti@mdranta.net>
Diffstat (limited to 'templates/explore')
-rw-r--r--templates/explore/navbar.tmpl8
-rw-r--r--templates/explore/organizations.tmpl18
-rw-r--r--templates/explore/repo_list.tmpl12
-rw-r--r--templates/explore/users.tmpl16
4 files changed, 27 insertions, 27 deletions
diff --git a/templates/explore/navbar.tmpl b/templates/explore/navbar.tmpl
index 3bd52645e2..5433425972 100644
--- a/templates/explore/navbar.tmpl
+++ b/templates/explore/navbar.tmpl
@@ -1,16 +1,16 @@
<div class="ui secondary pointing tabular top attached borderless stackable menu navbar">
<a class="{{if .PageIsExploreRepositories}}active{{end}} item" href="{{AppSubUrl}}/explore/repos">
- <span class="octicon octicon-repo"></span> {{.i18n.Tr "explore.repos"}}
+ {{svg "octicon-repo" 16}} {{.i18n.Tr "explore.repos"}}
</a>
<a class="{{if .PageIsExploreUsers}}active{{end}} item" href="{{AppSubUrl}}/explore/users">
- <span class="octicon octicon-person"></span> {{.i18n.Tr "explore.users"}}
+ {{svg "octicon-person" 16}} {{.i18n.Tr "explore.users"}}
</a>
<a class="{{if .PageIsExploreOrganizations}}active{{end}} item" href="{{AppSubUrl}}/explore/organizations">
- <span class="octicon octicon-organization"></span> {{.i18n.Tr "explore.organizations"}}
+ {{svg "octicon-organization" 16}} {{.i18n.Tr "explore.organizations"}}
</a>
{{if .IsRepoIndexerEnabled}}
<a class="{{if .PageIsExploreCode}}active{{end}} item" href="{{AppSubUrl}}/explore/code">
- <span class="octicon octicon-code"></span> {{.i18n.Tr "explore.code"}}
+ {{svg "octicon-code" 16}} {{.i18n.Tr "explore.code"}}
</a>
{{end}}
</div>
diff --git a/templates/explore/organizations.tmpl b/templates/explore/organizations.tmpl
index 4e2bfc9fd9..6980622de1 100644
--- a/templates/explore/organizations.tmpl
+++ b/templates/explore/organizations.tmpl
@@ -12,18 +12,18 @@
<span class="header">
<a href="{{.HomeLink}}">{{.Name}}</a> {{.FullName}}
{{if .Visibility.IsPrivate}}
- <span class="text gold"><i class="octicon octicon-lock"></i></span>
+ <span class="text gold">{{svg "octicon-lock" 16}}</span>
{{end}}
</span>
<div class="description">
- {{if .Location}}
- <i class="octicon octicon-location"></i> {{.Location}}
- {{end}}
- {{if and .Website}}
- <i class="octicon octicon-link"></i>
- <a href="{{.Website}}" rel="nofollow">{{.Website}}</a>
- {{end}}
- <i class="octicon octicon-clock"></i> {{$.i18n.Tr "user.join_on"}} {{.CreatedUnix.FormatShort}}
+ {{if .Location}}
+ {{svg "octicon-location" 16}} {{.Location}}
+ {{end}}
+ {{if and .Website}}
+ {{svg "octicon-link" 16}}
+ <a href="{{.Website}}" rel="nofollow">{{.Website}}</a>
+ {{end}}
+ {{svg "octicon-clock" 16}} {{$.i18n.Tr "user.join_on"}} {{.CreatedUnix.FormatShort}}
</div>
</div>
</div>
diff --git a/templates/explore/repo_list.tmpl b/templates/explore/repo_list.tmpl
index fec304cc91..2dbfac5a2a 100644
--- a/templates/explore/repo_list.tmpl
+++ b/templates/explore/repo_list.tmpl
@@ -10,22 +10,22 @@
{{if .IsArchived}}<i class="archive icon archived-icon"></i>{{end}}
</a>
{{if .IsPrivate}}
- <span class="text gold"><i class="octicon octicon-lock"></i></span>
+ <span class="middle text gold">{{svg "octicon-lock" 16}}</span>
{{else if .IsFork}}
- <span><i class="octicon octicon-repo-forked"></i></span>
+ <span class="middle">{{svg "octicon-repo-forked" 16}}</span>
{{else if .IsMirror}}
- <span><i class="octicon octicon-repo-clone"></i></span>
+ <span class="middle">{{svg "octicon-repo-clone" 16}}</span>
{{else if .Owner}}
{{if .Owner.Visibility.IsPrivate}}
- <span class="text gold"><i class="octicon octicon-lock"></i></span>
+ <span class="text gold">{{svg "octicon-lock" 16}}</span>
{{end}}
{{end}}
<div class="ui right metas">
{{if .PrimaryLanguage }}
<span class="text grey"><i class="color-icon" style="background-color: {{.PrimaryLanguage.Color}}"></i>{{ .PrimaryLanguage.Language }}</span>
{{end}}
- <span class="text grey"><i class="octicon octicon-star"></i> {{.NumStars}}</span>
- <span class="text grey"><i class="octicon octicon-git-branch"></i> {{.NumForks}}</span>
+ <span class="text grey">{{svg "octicon-repo" 16}} {{.NumStars}}</span>
+ <span class="text grey">{{svg "octicon-git-branch" 16}} {{.NumForks}}</span>
</div>
</div>
<div class="description">
diff --git a/templates/explore/users.tmpl b/templates/explore/users.tmpl
index 32a36931c7..1929eb296c 100644
--- a/templates/explore/users.tmpl
+++ b/templates/explore/users.tmpl
@@ -11,14 +11,14 @@
<div class="content">
<span class="header"><a href="{{.HomeLink}}">{{.Name}}</a> {{.FullName}}</span>
<div class="description">
- {{if .Location}}
- <i class="octicon octicon-location"></i> {{.Location}}
- {{end}}
- {{if and $.ShowUserEmail .Email $.IsSigned (not .KeepEmailPrivate)}}
- <i class="octicon octicon-mail"></i>
- <a href="mailto:{{.Email}}" rel="nofollow">{{.Email}}</a>
- {{end}}
- <i class="octicon octicon-clock"></i> {{$.i18n.Tr "user.join_on"}} {{.CreatedUnix.FormatShort}}
+ {{if .Location}}
+ {{svg "octicon-location" 16}} {{.Location}}
+ {{end}}
+ {{if and $.ShowUserEmail .Email $.IsSigned (not .KeepEmailPrivate)}}
+ {{svg "octicon-mail" 16}}
+ <a href="mailto:{{.Email}}" rel="nofollow">{{.Email}}</a>
+ {{end}}
+ {{svg "octicon-clock" 16}} {{$.i18n.Tr "user.join_on"}} {{.CreatedUnix.FormatShort}}
</div>
</div>
</div>