diff options
author | John Olheiser <42128690+jolheiser@users.noreply.github.com> | 2020-02-11 11:02:41 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-11 12:02:41 -0500 |
commit | 86fdba177ad82f3dcdfc237631fef4588042b9d6 (patch) | |
tree | 9ee1c1f97a158436e36828d1072fa84fac222317 /templates/repo/settings | |
parent | e704f7fae7b212902ddd2859d8f88350630b4086 (diff) | |
download | gitea-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/repo/settings')
-rw-r--r-- | templates/repo/settings/collaboration.tmpl | 4 | ||||
-rw-r--r-- | templates/repo/settings/deploy_keys.tmpl | 4 | ||||
-rw-r--r-- | templates/repo/settings/githooks.tmpl | 2 | ||||
-rw-r--r-- | templates/repo/settings/lfs.tmpl | 6 | ||||
-rw-r--r-- | templates/repo/settings/lfs_file_find.tmpl | 4 | ||||
-rw-r--r-- | templates/repo/settings/lfs_locks.tmpl | 8 | ||||
-rw-r--r-- | templates/repo/settings/protected_branch.tmpl | 6 | ||||
-rw-r--r-- | templates/repo/settings/webhook/history.tmpl | 4 | ||||
-rw-r--r-- | templates/repo/settings/webhook/list.tmpl | 6 |
9 files changed, 22 insertions, 22 deletions
diff --git a/templates/repo/settings/collaboration.tmpl b/templates/repo/settings/collaboration.tmpl index f6234f94a0..8c6e6461ad 100644 --- a/templates/repo/settings/collaboration.tmpl +++ b/templates/repo/settings/collaboration.tmpl @@ -18,7 +18,7 @@ </a> </div> <div class="ui eight wide column"> - <span class="octicon octicon-shield"></span> + {{svg "octicon-shield-lock" 16}} <div class="ui inline dropdown"> <div class="text">{{if eq .Collaboration.Mode 1}}{{$.i18n.Tr "repo.settings.collaboration.read"}}{{else if eq .Collaboration.Mode 2}}{{$.i18n.Tr "repo.settings.collaboration.write"}}{{else if eq .Collaboration.Mode 3}}{{$.i18n.Tr "repo.settings.collaboration.admin"}}{{else}}{{$.i18n.Tr "repo.settings.collaboration.undefined"}}{{end}}</div> <i class="dropdown icon"></i> @@ -67,7 +67,7 @@ </a> </div> <div class="ui eight wide column poping up" data-content="Team's permission is set on the team setting page and can't be changed per repository"> - <span class="octicon octicon-shield"></span> + {{svg "octicon-shield-lock" 16}} <div class="ui inline dropdown"> <div class="text">{{if eq .Authorize 1}}{{$.i18n.Tr "repo.settings.collaboration.read"}}{{else if eq .Authorize 2}}{{$.i18n.Tr "repo.settings.collaboration.write"}}{{else if eq .Authorize 3}}{{$.i18n.Tr "repo.settings.collaboration.admin"}}{{else if eq .Authorize 4}}{{$.i18n.Tr "repo.settings.collaboration.owner"}}{{else}}{{$.i18n.Tr "repo.settings.collaboration.undefined"}}{{end}}</div> </div> diff --git a/templates/repo/settings/deploy_keys.tmpl b/templates/repo/settings/deploy_keys.tmpl index 57477b37a8..2d228597e1 100644 --- a/templates/repo/settings/deploy_keys.tmpl +++ b/templates/repo/settings/deploy_keys.tmpl @@ -24,14 +24,14 @@ {{$.i18n.Tr "settings.delete_key"}} </button> </div> - <i class="mega-octicon octicon-key {{if .HasRecentActivity}}green{{end}}" {{if .HasRecentActivity}}data-content="{{$.i18n.Tr "settings.key_state_desc"}}" data-variation="inverted"{{end}}></i> + <i class="{{if .HasRecentActivity}}green{{end}}" {{if .HasRecentActivity}}data-content="{{$.i18n.Tr "settings.key_state_desc"}}" data-variation="inverted"{{end}}>{{svg "octicon-key" 32}}</i> <div class="content"> <strong>{{.Name}}</strong> <div class="print meta"> {{.Fingerprint}} </div> <div class="activity meta"> - <i>{{$.i18n.Tr "settings.add_on"}} <span>{{.CreatedUnix.FormatShort}}</span> — <i class="octicon octicon-info"></i> {{if .HasUsed}}{{$.i18n.Tr "settings.last_used"}} <span {{if .HasRecentActivity}}class="green"{{end}}>{{.UpdatedUnix.FormatShort}}</span>{{else}}{{$.i18n.Tr "settings.no_activity"}}{{end}} - <span>{{$.i18n.Tr "settings.can_read_info"}}{{if not .IsReadOnly}} / {{$.i18n.Tr "settings.can_write_info"}} {{end}}</span></i> + <i>{{$.i18n.Tr "settings.add_on"}} <span>{{.CreatedUnix.FormatShort}}</span> — {{svg "octicon-info" 16}} {{if .HasUsed}}{{$.i18n.Tr "settings.last_used"}} <span {{if .HasRecentActivity}}class="green"{{end}}>{{.UpdatedUnix.FormatShort}}</span>{{else}}{{$.i18n.Tr "settings.no_activity"}}{{end}} - <span>{{$.i18n.Tr "settings.can_read_info"}}{{if not .IsReadOnly}} / {{$.i18n.Tr "settings.can_write_info"}} {{end}}</span></i> </div> </div> </div> diff --git a/templates/repo/settings/githooks.tmpl b/templates/repo/settings/githooks.tmpl index 2af66780f9..99a38cb800 100644 --- a/templates/repo/settings/githooks.tmpl +++ b/templates/repo/settings/githooks.tmpl @@ -14,7 +14,7 @@ </div> {{range .Hooks}} <div class="item"> - <span class="text {{if .IsActive}}green{{else}}grey{{end}}"><i class="octicon octicon-primitive-dot"></i></span> + <span class="text {{if .IsActive}}green{{else}}grey{{end}}">{{svg "octicon-primitive-dot" 16}}</span> <span>{{.Name}}</span> <a class="text blue ui right" href="{{$.RepoLink}}/settings/hooks/git/{{.Name}}"><i class="fa fa-pencil"></i></a> </div> diff --git a/templates/repo/settings/lfs.tmpl b/templates/repo/settings/lfs.tmpl index f43f9479a2..cde718d0cc 100644 --- a/templates/repo/settings/lfs.tmpl +++ b/templates/repo/settings/lfs.tmpl @@ -7,8 +7,8 @@ <h4 class="ui top attached header"> {{.i18n.Tr "repo.settings.lfs_filelist"}} ({{.i18n.Tr "admin.total" .Total}}) <div class="ui right"> - <a class="ui black tiny show-panel button" href="{{.Link}}/locks"><i class="octicon octicon-lock octicon-tiny"></i>{{.i18n.Tr "repo.settings.lfs_locks"}}</a> - <a class="ui blue tiny show-panel button" href="{{.Link}}/pointers"><i class="octicon octicon-search octicon-tiny"></i> {{.i18n.Tr "repo.settings.lfs_findpointerfiles"}}</a> + <a class="ui black tiny show-panel button" href="{{.Link}}/locks"><span class="octicon-tiny">{{svg "octicon-lock" 16}}</span>{{.i18n.Tr "repo.settings.lfs_locks"}}</a> + <a class="ui blue tiny show-panel button" href="{{.Link}}/pointers"><span class="octicon-tiny">{{svg "octicon-search" 16}}</span> {{.i18n.Tr "repo.settings.lfs_findpointerfiles"}}</a> </div> </h4> <table id="lfs-files-table" class="ui attached segment single line table"> @@ -27,7 +27,7 @@ <td class="right aligned"> <a class="ui blue show-panel button" href="{{$.Link}}/find?oid={{.Oid}}&size={{.Size}}">{{$.i18n.Tr "repo.settings.lfs_findcommits"}}</a> <button class="ui basic show-modal icon button" data-modal="#delete-{{.Oid}}"> - <i class="octicon octicon-trashcan btn-octicon btn-octicon-danger poping up" data-content="{{$.i18n.Tr "repo.editor.delete_this_file"}}" data-position="bottom center" data-variation="tiny inverted"></i> + <span class="btn-octicon btn-octicon-danger poping up" data-content="{{$.i18n.Tr "repo.editor.delete_this_file"}}" data-position="bottom center" data-variation="tiny inverted">{{svg "octicon-trashcan" 16}}</span> </button> </td> </tr> diff --git a/templates/repo/settings/lfs_file_find.tmpl b/templates/repo/settings/lfs_file_find.tmpl index 18db0215a5..1057cfa945 100644 --- a/templates/repo/settings/lfs_file_find.tmpl +++ b/templates/repo/settings/lfs_file_find.tmpl @@ -13,7 +13,7 @@ {{range .Results}} <tr> <td> - <span class="octicon octicon-file-text"></span> + {{svg "octicon-file" 16}} <a href="{{EscapePound $.RepoLink}}/src/commit/{{.SHA}}/{{EscapePound .Name}}" title="{{.Name}}">{{.Name}}</a> </td> <td class="message has-emoji"> @@ -24,7 +24,7 @@ </span> </td> <td> - <span class="text grey"><i class="octicon octicon-git-branch"></i>{{.BranchName}}</span> + <span class="text grey">{{svg "octicon-git-branch" 16}}{{.BranchName}}</span> </td> <td> {{if .ParentHashes}} diff --git a/templates/repo/settings/lfs_locks.tmpl b/templates/repo/settings/lfs_locks.tmpl index 8a5f6e1658..4830fb2542 100644 --- a/templates/repo/settings/lfs_locks.tmpl +++ b/templates/repo/settings/lfs_locks.tmpl @@ -23,14 +23,14 @@ <tr> <td> {{if index $.Linkable $index}} - <span class="octicon octicon-file-text"></span> + {{svg "octicon-file" 16}} <a href="{{EscapePound $.RepoLink}}/src/branch/{{EscapePound $lock.Repo.DefaultBranch}}/{{EscapePound $lock.Path}}" title="{{$lock.Path}}">{{$lock.Path}}</a> {{else}} - <span class="octicon octicon-diff"></span> + {{svg "octicon-diff" 16}} <span class="poping up" title="{{$.i18n.Tr "repo.settings.lfs_lock_file_no_exist"}}">{{$lock.Path}}</span> {{end}} {{if not (index $.Lockables $index)}} - <i class="octicon octicon-alert poping up" title="{{$.i18n.Tr "repo.settings.lfs_noattribute"}}"></i> + <span class="poping up" title="{{$.i18n.Tr "repo.settings.lfs_noattribute"}}">{{svg "octicon-alert" 16}}</span> {{end}} </td> <td> @@ -43,7 +43,7 @@ <td class="right aligned"> <form action="{{$.LFSFilesLink}}/locks/{{$lock.ID}}/unlock" method="POST"> {{$.CsrfTokenHtml}} - <button class="ui blue button"><i class="octicon octicon-lock btn-octicon"></i>{{$.i18n.Tr "repo.settings.lfs_force_unlock"}}</button> + <button class="ui blue button"><span class="btn-octicon">{{svg "octicon-lock" 16}}</span>{{$.i18n.Tr "repo.settings.lfs_force_unlock"}}</button> </form> </td> </tr> diff --git a/templates/repo/settings/protected_branch.tmpl b/templates/repo/settings/protected_branch.tmpl index b4c65f7830..86045f433f 100644 --- a/templates/repo/settings/protected_branch.tmpl +++ b/templates/repo/settings/protected_branch.tmpl @@ -65,7 +65,7 @@ <div class="menu"> {{range .Teams}} <div class="item" data-value="{{.ID}}"> - <i class="octicon octicon-jersey"></i> + {{svg "octicon-jersey" 16}} {{.Name}} </div> {{end}} @@ -115,7 +115,7 @@ <div class="menu"> {{range .Teams}} <div class="item" data-value="{{.ID}}"> - <i class="octicon octicon-jersey"></i> + {{svg "octicon-jersey" 16}} {{.Name}} </div> {{end}} @@ -195,7 +195,7 @@ <div class="menu"> {{range .Teams}} <div class="item" data-value="{{.ID}}"> - <i class="octicon octicon-jersey"></i> + {{svg "octicon-jersey" 16}} {{.Name}} </div> {{end}} diff --git a/templates/repo/settings/webhook/history.tmpl b/templates/repo/settings/webhook/history.tmpl index 577f357720..53c01c168b 100644 --- a/templates/repo/settings/webhook/history.tmpl +++ b/templates/repo/settings/webhook/history.tmpl @@ -14,9 +14,9 @@ <div class="item"> <div class="meta"> {{if .IsSucceed}} - <span class="text green"><i class="octicon octicon-check"></i></span> + <span class="text green">{{svg "octicon-check" 16}}</span> {{else}} - <span class="text red"><i class="octicon octicon-alert"></i></span> + <span class="text red">{{svg "octicon-alert" 16}}</span> {{end}} <a class="ui blue sha label toggle button" data-target="#info-{{.ID}}">{{.UUID}}</a> <div class="ui right"> diff --git a/templates/repo/settings/webhook/list.tmpl b/templates/repo/settings/webhook/list.tmpl index d1784564dc..5813b74914 100644 --- a/templates/repo/settings/webhook/list.tmpl +++ b/templates/repo/settings/webhook/list.tmpl @@ -38,11 +38,11 @@ {{range .Webhooks}} <div class="item"> {{if eq .LastStatus 1}} - <span class="text green"><i class="octicon octicon-check"></i></span> + <span class="text green">{{svg "octicon-check" 16}}</span> {{else if eq .LastStatus 2}} - <span class="text red"><i class="octicon octicon-alert"></i></span> + <span class="text red">{{svg "octicon-alert" 16}}</span> {{else}} - <span class="text grey"><i class="octicon octicon-primitive-dot"></i></span> + <span class="text grey">{{svg "octicon-primitive-dot" 16}}</span> {{end}} <a class="dont-break-out" href="{{$.BaseLink}}/{{.ID}}">{{.URL}}</a> <div class="ui right"> |