From 86fdba177ad82f3dcdfc237631fef4588042b9d6 Mon Sep 17 00:00:00 2001 From: John Olheiser <42128690+jolheiser@users.noreply.github.com> Date: Tue, 11 Feb 2020 11:02:41 -0600 Subject: Add Octicon SVG spritemap (#10107) * Add octicon SVG sprite Signed-off-by: jolheiser * Static prefix Signed-off-by: jolheiser * SVG for all repo icons Signed-off-by: jolheiser * make vendor Signed-off-by: jolheiser * Swap out octicons Signed-off-by: jolheiser * Move octicons to top of less imports Signed-off-by: jolheiser * Fix JS Signed-off-by: jolheiser * Definitely not a search/replace Signed-off-by: jolheiser * Missed regex Signed-off-by: jolheiser * Move to more generic calls and webpack Signed-off-by: jolheiser * make svg -> make webpack Signed-off-by: jolheiser * Remove svg-sprite Signed-off-by: jolheiser * Update tests Signed-off-by: jolheiser * Missed a test Signed-off-by: jolheiser * Remove svg from makefile Signed-off-by: jolheiser * Suggestions Signed-off-by: jolheiser * Attempt to fix test Signed-off-by: jolheiser * Update tests Signed-off-by: jolheiser * Revert timetracking test Signed-off-by: jolheiser * Swap .octicon for .svg in less Signed-off-by: jolheiser * Add aria-hidden Signed-off-by: jolheiser * Replace mega-octicon Signed-off-by: jolheiser * Fix webpack globbing on Windows Signed-off-by: jolheiser * Revert Co-Authored-By: silverwind * Fix octions from upstream Signed-off-by: jolheiser * Fix Vue and missed JS function Signed-off-by: jolheiser * Add JS helper and PWA Signed-off-by: jolheiser * Preload SVG Signed-off-by: jolheiser Co-authored-by: silverwind Co-authored-by: techknowlogick --- templates/org/header.tmpl | 4 ++-- templates/org/home.tmpl | 12 ++++++------ templates/org/member/members.tmpl | 10 ++++++++-- templates/org/settings/delete.tmpl | 2 +- templates/org/team/navbar.tmpl | 6 +++--- templates/org/team/repositories.tmpl | 10 +++++++++- templates/org/team/sidebar.tmpl | 2 +- templates/org/team/teams.tmpl | 2 +- 8 files changed, 31 insertions(+), 17 deletions(-) (limited to 'templates/org') diff --git a/templates/org/header.tmpl b/templates/org/header.tmpl index 806682aca9..2dc93dbf8d 100644 --- a/templates/org/header.tmpl +++ b/templates/org/header.tmpl @@ -9,11 +9,11 @@
diff --git a/templates/org/home.tmpl b/templates/org/home.tmpl index 0aa575707a..46c590342b 100644 --- a/templates/org/home.tmpl +++ b/templates/org/home.tmpl @@ -7,12 +7,12 @@
{{.Org.DisplayName}} - {{if .IsOrganizationOwner}}{{end}} + {{if .IsOrganizationOwner}}{{svg "octicon-gear" 16}}{{end}}
{{if .Org.Description}}

{{.Org.Description}}

{{end}}
- {{if .Org.Location}}
{{.Org.Location}}
{{end}} - {{if .Org.Website}}{{end}} + {{if .Org.Location}}
{{svg "octicon-location" 16}} {{.Org.Location}}
{{end}} + {{if .Org.Website}}
{{svg "octicon-link" 16}} {{.Org.Website}}
{{end}}
@@ -24,7 +24,7 @@
{{if .CanCreateOrgRepo}}
{{end}} @@ -38,7 +38,7 @@ {{.i18n.Tr "org.people"}} {{if .IsOrganizationMember}} {{end}} @@ -55,7 +55,7 @@
diff --git a/templates/org/member/members.tmpl b/templates/org/member/members.tmpl index 03aadf97b8..81cfcf51e6 100644 --- a/templates/org/member/members.tmpl +++ b/templates/org/member/members.tmpl @@ -34,7 +34,7 @@ {{$.i18n.Tr "org.members.member_role"}}
- {{if index $.MembersIsUserOrgOwner .ID}} {{$.i18n.Tr "org.members.owner"}}{{else}}{{$.i18n.Tr "org.members.member"}}{{end}} + {{if index $.MembersIsUserOrgOwner .ID}}{{svg "octicon-shield-lock" 16}} {{$.i18n.Tr "org.members.owner"}}{{else}}{{$.i18n.Tr "org.members.member"}}{{end}}
@@ -42,7 +42,13 @@ 2FA
- + + {{if index $.MembersTwoFaStatus .ID}} + {{svg "octicon-check" 16}} + {{else}} + {{svg "octicon-x" 16}} + {{end}} +
diff --git a/templates/org/settings/delete.tmpl b/templates/org/settings/delete.tmpl index 3b0ee09b17..729126b7b9 100644 --- a/templates/org/settings/delete.tmpl +++ b/templates/org/settings/delete.tmpl @@ -11,7 +11,7 @@
-

{{.i18n.Tr "org.settings.delete_prompt" | Str2html}}

+

{{svg "octicon-alert" 16}} {{.i18n.Tr "org.settings.delete_prompt" | Str2html}}

{{.CsrfTokenHtml}} diff --git a/templates/org/team/navbar.tmpl b/templates/org/team/navbar.tmpl index 1a8f108331..95329a2be3 100644 --- a/templates/org/team/navbar.tmpl +++ b/templates/org/team/navbar.tmpl @@ -1,4 +1,4 @@ \ No newline at end of file + {{svg "octicon-person" 16}} {{.Team.NumMembers}}  {{$.i18n.Tr "org.lower_members"}} + {{svg "octicon-repo" 16}} {{.Team.NumRepos}}  {{$.i18n.Tr "org.lower_repositories"}} +
diff --git a/templates/org/team/repositories.tmpl b/templates/org/team/repositories.tmpl index 66af5195b0..e81ff889eb 100644 --- a/templates/org/team/repositories.tmpl +++ b/templates/org/team/repositories.tmpl @@ -38,7 +38,15 @@ {{$.i18n.Tr "remove"}} {{end}} - + {{if .IsPrivate}} + {{svg "octicon-lock" 16}} + {{else if .IsFork}} + {{svg "octicon-repo-forked" 16}} + {{else if .IsMirror}} + {{svg "octicon-repo-clone" 16}} + {{else}} + {{svg "octicon-repo" 16}} + {{end}} {{$.Org.Name}}/{{.Name}}
diff --git a/templates/org/team/sidebar.tmpl b/templates/org/team/sidebar.tmpl index 75c5ce756d..ee612069b5 100644 --- a/templates/org/team/sidebar.tmpl +++ b/templates/org/team/sidebar.tmpl @@ -47,7 +47,7 @@ {{if .IsOrganizationOwner}} {{end}} diff --git a/templates/org/team/teams.tmpl b/templates/org/team/teams.tmpl index 8714181140..9d4a469028 100644 --- a/templates/org/team/teams.tmpl +++ b/templates/org/team/teams.tmpl @@ -5,7 +5,7 @@ {{template "base/alert" .}} {{if .IsOrganizationOwner}}
{{end}} -- cgit v1.2.3