From b9baed2c74286710481886c5d1f3010e43840012 Mon Sep 17 00:00:00 2001 From: Denys Konovalov Date: Tue, 1 Aug 2023 00:13:42 +0200 Subject: [PATCH] Introduce `flex-list` & `flex-item` elements for Gitea UI (#25790) This PR introduces a new UI element type for Gitea called `flex-item`. It consists of a horizontal card with a leading, main and trailing part: ![grafik](https://github.com/go-gitea/gitea/assets/47871822/395dd3f3-3906-4481-8f65-be6ac0acbe03) The idea behind it is that in Gitea UI, we have many cases where we use this kind of layout, but it is achieved in many different ways: - grid layout - `.ui.list` with additional hacky flexbox - `.ui.key.list` - looks to me like a style set originally created for ssh/gpg key list, was used in many other places - `.issue.list` - created for issue cards, used in many other places - ... This new style is based on `.issue.list`, specifically the refactoring of it done in #25750. In this PR, the new element is introduced and lots of templates are being refactored to use that style. This allows to remove a lot of page-specific css, makes many of the elements responsive or simply provides a cleaner/better-looking way to present information. A devtest section with the new style is also available.
Screenshots (left: before, right: after) ![Bildschirmfoto vom 2023-07-09 21-01-21](https://github.com/go-gitea/gitea/assets/47871822/545b7da5-b300-475f-bd6d-b7d836950bb5) ![Bildschirmfoto vom 2023-07-09 21-01-56](https://github.com/go-gitea/gitea/assets/47871822/b6f70415-6795-4f71-a5ea-117d56107ea1) ![Bildschirmfoto vom 2023-07-09 21-02-45](https://github.com/go-gitea/gitea/assets/47871822/47407121-3f2a-4778-8f6d-ad2687c2e7b3) ![Bildschirmfoto vom 2023-07-09 21-03-44](https://github.com/go-gitea/gitea/assets/47871822/76167aaf-c3b2-46f6-9ffd-709f20aa6a34) ![Bildschirmfoto vom 2023-07-09 21-04-52](https://github.com/go-gitea/gitea/assets/47871822/af8fdde5-711e-4524-99cf-fb5d68af85b9) ![Bildschirmfoto vom 2023-07-09 21-05-25](https://github.com/go-gitea/gitea/assets/47871822/ae406946-e3e4-4109-abfe-b3588a07b468) ![Bildschirmfoto vom 2023-07-09 21-06-35](https://github.com/go-gitea/gitea/assets/47871822/2dbacc04-24d6-4f91-9e42-e16d6e4b5f1f) ![Bildschirmfoto vom 2023-07-09 21-09-03](https://github.com/go-gitea/gitea/assets/47871822/d3ca4e56-a72f-4179-adc8-98bfd638025b) ![Bildschirmfoto vom 2023-07-09 21-09-44](https://github.com/go-gitea/gitea/assets/47871822/df1fa689-499c-4e54-b6fb-3b81644b725f) ![Bildschirmfoto vom 2023-07-09 21-10-27](https://github.com/go-gitea/gitea/assets/47871822/b21cac71-a85a-4c8c-bb99-ab90373d8e09) ![Bildschirmfoto vom 2023-07-09 21-11-12](https://github.com/go-gitea/gitea/assets/47871822/89be39cf-0af9-4f2d-9fca-42f9eb5e7824) ![Bildschirmfoto vom 2023-07-09 21-12-01](https://github.com/go-gitea/gitea/assets/47871822/079579ea-1ecb-49c0-b32b-b59ed957caec) ![Bildschirmfoto vom 2023-07-09 21-17-44](https://github.com/go-gitea/gitea/assets/47871822/61ac6ec4-a319-4d5c-9c99-2e02a77295ba) ![Bildschirmfoto vom 2023-07-09 21-18-27](https://github.com/go-gitea/gitea/assets/47871822/5b55b73f-6244-47f7-a3e6-c5e4a7474585) ![Bildschirmfoto vom 2023-07-09 21-19-18](https://github.com/go-gitea/gitea/assets/47871822/c1b7c22e-3e5a-46d4-b8d6-5560db478c0b) ![Bildschirmfoto vom 2023-07-09 21-29-13](https://github.com/go-gitea/gitea/assets/47871822/82ffca8d-ab2e-4a18-9954-5b685bf6a422) ![Bildschirmfoto vom 2023-07-09 21-30-11](https://github.com/go-gitea/gitea/assets/47871822/ad2fdccc-2be8-41bb-bfdc-a084aa387b61) ![Bildschirmfoto vom 2023-07-09 21-32-44](https://github.com/go-gitea/gitea/assets/47871822/2d298ba7-d084-48b5-a139-f86d56262110) ![Bildschirmfoto vom 2023-07-09 21-33-28](https://github.com/go-gitea/gitea/assets/47871822/4cbd838e-9de8-4ad0-8ed9-438da5c9a5cb)
--------- Co-authored-by: Giteabot --- templates/devtest/gitea-ui.tmpl | 58 +++++ templates/explore/organizations.tmpl | 39 +-- templates/explore/repo_list.tmpl | 100 +++---- templates/explore/users.tmpl | 31 ++- templates/org/member/members.tmpl | 89 +++---- templates/org/team/members.tmpl | 50 ++-- templates/org/team/repositories.tmpl | 59 +++-- .../package/shared/cleanup_rules/list.tmpl | 46 +++- templates/package/shared/list.tmpl | 16 +- templates/package/shared/versionlist.tmpl | 14 +- templates/repo/actions/runs_list.tmpl | 28 +- templates/repo/header.tmpl | 4 +- templates/repo/icon.tmpl | 2 +- templates/repo/settings/branches.tmpl | 41 +-- templates/repo/settings/collaboration.tmpl | 104 ++++---- templates/repo/settings/deploy_keys.tmpl | 30 +-- templates/repo/settings/options.tmpl | 169 ++++++------ templates/shared/issuelist.tmpl | 24 +- templates/shared/secrets/add_list.tmpl | 26 +- templates/shared/user/name.tmpl | 5 + templates/shared/variables/variable_list.tmpl | 33 ++- templates/user/dashboard/feeds.tmpl | 246 +++++++++--------- templates/user/settings/applications.tmpl | 31 ++- .../settings/applications_oauth2_list.tmpl | 27 +- templates/user/settings/grants_oauth2.tmpl | 30 +-- templates/user/settings/keys_gpg.tmpl | 48 ++-- templates/user/settings/keys_principal.tmpl | 24 +- templates/user/settings/keys_ssh.tmpl | 41 ++- templates/user/settings/organization.tmpl | 19 +- .../user/settings/security/accountlinks.tmpl | 30 ++- templates/user/settings/security/openid.tmpl | 29 ++- .../user/settings/security/webauthn.tmpl | 17 +- tests/integration/auth_ldap_test.go | 2 +- tests/integration/issue_test.go | 4 +- tests/integration/privateactivity_test.go | 2 +- tests/integration/setting_test.go | 4 +- web_src/css/actions.css | 15 ++ web_src/css/dashboard.css | 52 +--- web_src/css/explore.css | 51 ---- web_src/css/index.css | 2 +- web_src/css/org.css | 36 --- web_src/css/repo.css | 27 -- web_src/css/repo/issue-list.css | 33 +++ web_src/css/shared/flex-list.css | 94 +++++++ web_src/css/shared/issuelist.css | 134 ---------- web_src/css/user.css | 9 - 46 files changed, 955 insertions(+), 1020 deletions(-) create mode 100644 templates/shared/user/name.tmpl create mode 100644 web_src/css/shared/flex-list.css delete mode 100644 web_src/css/shared/issuelist.css diff --git a/templates/devtest/gitea-ui.tmpl b/templates/devtest/gitea-ui.tmpl index 8b31957f2e..9e15e3c1bc 100644 --- a/templates/devtest/gitea-ui.tmpl +++ b/templates/devtest/gitea-ui.tmpl @@ -253,5 +253,63 @@ {{template "shared/combomarkdowneditor" .}} + +
+

Flex List

+
+
+
+ {{svg "octicon-info" 32}} +
+
+
+ Flex Item + + with label + +
+
+ consists of leading/main/trailing part +
+
+ main part contains title and (multiple) body lines +
+
+
+ + +
+
+
+
+ {{svg "octicon-repo" 32}} +
+
+ +
+ when inside header, the trailing part will wrap below the title +
+
+
+
+
{{template "base/footer" .}} diff --git a/templates/explore/organizations.tmpl b/templates/explore/organizations.tmpl index ecf7f21bdd..ea788b149b 100644 --- a/templates/explore/organizations.tmpl +++ b/templates/explore/organizations.tmpl @@ -1,38 +1 @@ -{{template "base/head" .}} -
- {{template "explore/navbar" .}} -
- {{template "explore/search" .}} - -
- {{range .Users}} -
- {{avatar $.Context .}} -
- - {{.Name}} {{.FullName}} - {{if .Visibility.IsPrivate}} - {{$.locale.Tr "repo.desc.private"}} - {{end}} - -
- {{if .Location}} - {{svg "octicon-location"}} {{.Location}} - {{end}} - {{if and .Website}} - {{svg "octicon-link"}} - {{.Website}} - {{end}} - {{svg "octicon-calendar"}} {{$.locale.Tr "user.joined_on" (DateTime "short" .CreatedUnix) | Safe}} -
-
-
- {{else}} -
{{$.locale.Tr "explore.org_no_results"}}
- {{end}} -
- - {{template "base/paginate" .}} -
-
-{{template "base/footer" .}} +{{template "explore/users" .}} diff --git a/templates/explore/repo_list.tmpl b/templates/explore/repo_list.tmpl index 47e9921332..44f7900327 100644 --- a/templates/explore/repo_list.tmpl +++ b/templates/explore/repo_list.tmpl @@ -1,66 +1,72 @@ -
+
{{range .Repos}} -
-
-
- {{$avatar := (repoAvatar . 32 "gt-mr-3")}} - {{if $avatar}} - {{$avatar}} - {{end}} - - {{if or $.PageIsExplore $.PageIsProfileStarList}}{{if .Owner}}{{.Owner.Name}} / {{end}}{{end}}{{.Name}} - -
- {{if .IsArchived}} - {{$.locale.Tr "repo.desc.archived"}} - {{end}} - {{if .IsTemplate}} - {{if .IsPrivate}} - {{$.locale.Tr "repo.desc.private_template"}} +
+
+ {{$avatar := (repoAvatar . 32)}} + {{if $avatar}} + {{$avatar}} + {{else}} + {{template "repo/icon" .}} + {{end}} +
+
+
+
+ + {{if or $.PageIsExplore $.PageIsProfileStarList}}{{if .Owner}}{{.Owner.Name}} / {{end}}{{end}}{{.Name}} + + + {{if .IsArchived}} + {{$.locale.Tr "repo.desc.archived"}} + {{end}} + {{if .IsTemplate}} + {{if .IsPrivate}} + {{$.locale.Tr "repo.desc.private_template"}} + {{else}} + {{if .Owner.Visibility.IsPrivate}} + {{$.locale.Tr "repo.desc.internal_template"}} + {{end}} + {{end}} {{else}} - {{if .Owner.Visibility.IsPrivate}} - {{$.locale.Tr "repo.desc.internal_template"}} + {{if .IsPrivate}} + {{$.locale.Tr "repo.desc.private"}} + {{else}} + {{if .Owner.Visibility.IsPrivate}} + {{$.locale.Tr "repo.desc.internal"}} + {{end}} {{end}} {{end}} - {{else}} - {{if .IsPrivate}} - {{$.locale.Tr "repo.desc.private"}} - {{else}} - {{if .Owner.Visibility.IsPrivate}} - {{$.locale.Tr "repo.desc.internal"}} - {{end}} - {{end}} - {{end}} + {{if .IsFork}} - {{svg "octicon-repo-forked"}} + {{svg "octicon-repo-forked"}} {{else if .IsMirror}} - {{svg "octicon-mirror"}} + {{svg "octicon-mirror"}} {{end}}
+
+ {{if .PrimaryLanguage}} + + {{.PrimaryLanguage.Language}} + + {{end}} + {{if not $.DisableStars}} + {{svg "octicon-star" 16}}{{.NumStars}} + {{end}} + {{svg "octicon-git-branch" 16}}{{.NumForks}} +
- -
-
{{$description := .DescriptionHTML $.Context}} - {{if $description}}

{{$description}}

{{end}} + {{if $description}} +
{{$description}}
+ {{end}} {{if .Topics}} -
+
{{range .Topics}} {{if ne . ""}}{{.}}{{end}} {{end}}
{{end}} -

{{$.locale.Tr "org.repo_updated"}} {{TimeSinceUnix .UpdatedUnix $.locale}}

+
{{$.locale.Tr "org.repo_updated"}} {{TimeSinceUnix .UpdatedUnix $.locale}}
{{else}} diff --git a/templates/explore/users.tmpl b/templates/explore/users.tmpl index e3318479bb..5e150f692f 100644 --- a/templates/explore/users.tmpl +++ b/templates/explore/users.tmpl @@ -4,26 +4,35 @@
{{template "explore/search" .}} -
+
{{range .Users}} -
- {{avatar $.Context .}} -
- {{.Name}} {{.FullName}} -
+
+
+ {{avatar $.Context . 48}} +
+
+
+ {{template "shared/user/name" .}} + {{if .Visibility.IsPrivate}} + {{$.locale.Tr "repo.desc.private"}} + {{end}} +
+
{{if .Location}} - {{svg "octicon-location"}} {{.Location}} + {{svg "octicon-location"}}{{.Location}} {{end}} {{if and $.ShowUserEmail .Email $.IsSigned (not .KeepEmailPrivate)}} - {{svg "octicon-mail"}} - {{.Email}} + + {{svg "octicon-mail"}} + {{.Email}} + {{end}} - {{svg "octicon-calendar"}} {{$.locale.Tr "user.joined_on" (DateTime "short" .CreatedUnix) | Safe}} + {{svg "octicon-calendar"}}{{$.locale.Tr "user.joined_on" (DateTime "short" .CreatedUnix) | Safe}}
{{else}} -
{{$.locale.Tr "explore.user_no_results"}}
+
{{$.locale.Tr "explore.user_no_results"}}
{{end}}
diff --git a/templates/org/member/members.tmpl b/templates/org/member/members.tmpl index 3d5b3beebd..13b7d964f7 100644 --- a/templates/org/member/members.tmpl +++ b/templates/org/member/members.tmpl @@ -1,49 +1,31 @@ {{template "base/head" .}} -
+
{{template "org/header" .}}
{{template "base/alert" .}} -
+
{{range .Members}} -
-
+ {{$isPublic := index $.MembersIsPublicMember .ID}} +
+
{{avatar $.Context . 48}} -
- -
{{.FullName}}
-
-
-
- {{$.locale.Tr "org.members.membership_visibility"}} -
-
- {{$isPublic := index $.MembersIsPublicMember .ID}} - {{if $isPublic}} - {{$.locale.Tr "org.members.public"}} - {{if or (eq $.SignedUser.ID .ID) $.IsOrganizationOwner}}({{$.locale.Tr "org.members.public_helper"}}){{end}} - {{else}} - {{$.locale.Tr "org.members.private"}} - {{if or (eq $.SignedUser.ID .ID) $.IsOrganizationOwner}}({{$.locale.Tr "org.members.private_helper"}}){{end}} +
+
+ {{template "shared/user/name" .}} + {{if not $isPublic}} + {{$.locale.Tr "org.members.private"}} {{end}}
-
- {{if not $.PublicOnly}} -
-
+ {{if not $.PublicOnly}} +
{{$.locale.Tr "org.members.member_role"}} + {{if index $.MembersIsUserOrgOwner .ID}}{{svg "octicon-shield-lock"}} {{$.locale.Tr "org.members.owner"}}{{else}}{{$.locale.Tr "org.members.member"}}{{end}}
-
- {{if index $.MembersIsUserOrgOwner .ID}}{{svg "octicon-shield-lock"}} {{$.locale.Tr "org.members.owner"}}{{else}}{{$.locale.Tr "org.members.member"}}{{end}} -
-
-
{{if $.IsOrganizationOwner}} -
+
{{$.locale.Tr "admin.users.2fa"}} -
-
{{if index $.MembersTwoFaStatus .ID}} {{svg "octicon-check"}} @@ -53,26 +35,31 @@
{{end}} -
- {{end}} -
-
- {{if eq $.SignedUser.ID .ID}} -
- -
- {{else if $.IsOrganizationOwner}} -
- -
+ {{end}} +
+
+ {{if or (eq $.SignedUser.ID .ID) $.IsOrganizationOwner}} + {{if $isPublic}} + {{svg "octicon-eye-closed" 12 "icon"}}{{$.locale.Tr "org.members.public_helper"}} + {{else}} + {{svg "octicon-eye" 12 "icon"}}{{$.locale.Tr "org.members.private_helper"}} {{end}} -
+ {{end}} + {{if eq $.SignedUser.ID .ID}} +
+ +
+ {{else if $.IsOrganizationOwner}} +
+ +
+ {{end}}
{{end}} diff --git a/templates/org/team/members.tmpl b/templates/org/team/members.tmpl index 6bd258955d..4a97763d9a 100644 --- a/templates/org/team/members.tmpl +++ b/templates/org/team/members.tmpl @@ -21,27 +21,35 @@
{{end}} -
- {{range .Team.Members}} -
- {{avatar $.Context . 48 "gt-mr-3 gt-mb-0"}} - - {{.DisplayName}} - - {{if and $.IsOrganizationOwner (not (and ($.Team.IsOwnerTeam) (eq (len $.Team.Members) 1)))}} -
- -
- {{end}} -
- {{else}} -
- {{$.locale.Tr "org.teams.members.none"}} -
- {{end}} +
+
+ {{range .Team.Members}} +
+ +
+
+ {{template "shared/user/name" .}} +
+
+
+ {{if and $.IsOrganizationOwner (not (and ($.Team.IsOwnerTeam) (eq (len $.Team.Members) 1)))}} +
+ +
+ {{end}} +
+
+ {{else}} +
+ {{$.locale.Tr "org.teams.members.none"}} +
+ {{end}} +
{{if and .Invites $.IsOrganizationOwner}}

{{$.locale.Tr "org.teams.invite_team_member.list"}}

diff --git a/templates/org/team/repositories.tmpl b/templates/org/team/repositories.tmpl index 83e238016a..698b0a91ba 100644 --- a/templates/org/team/repositories.tmpl +++ b/templates/org/team/repositories.tmpl @@ -25,33 +25,38 @@
{{end}} -
- {{range .Team.Repos}} -
- {{if .IsPrivate}} - {{svg "octicon-lock" 16 "gt-mr-3"}} - {{else if .IsFork}} - {{svg "octicon-repo-forked" 16 "gt-mr-3"}} - {{else if .IsMirror}} - {{svg "octicon-mirror" 16 "gt-mr-3"}} - {{else}} - {{svg "octicon-repo" 16 "gt-mr-3"}} - {{end}} - - {{$.Org.Name}}/{{.Name}} - - {{if $canAddRemove}} -
- {{$.CsrfTokenHtml}} - -
- {{end}} -
- {{else}} -
- {{$.locale.Tr "org.teams.repos.none"}} -
- {{end}} +
+
+ {{range .Team.Repos}} +
+
+ {{$avatar := (repoAvatar . 32)}} + {{if $avatar}} + {{$avatar}} + {{else}} + {{template "repo/icon" .}} + {{end}} +
+ +
+ {{if $canAddRemove}} +
+ {{$.CsrfTokenHtml}} + +
+ {{end}} +
+
+ {{else}} +
+ {{$.locale.Tr "org.teams.repos.none"}} +
+ {{end}} +
diff --git a/templates/package/shared/cleanup_rules/list.tmpl b/templates/package/shared/cleanup_rules/list.tmpl index 485bff562e..e2af344817 100644 --- a/templates/package/shared/cleanup_rules/list.tmpl +++ b/templates/package/shared/cleanup_rules/list.tmpl @@ -5,10 +5,41 @@
-
+
{{range .CleanupRules}} -
-
+
+
+ {{svg .Type.SVGName 32}} +
+
+ +
+ {{if .Enabled}}{{$.locale.Tr "enabled"}}{{else}}{{$.locale.Tr "disabled"}}{{end}} +
+ {{if .KeepCount}} +
+ {{$.locale.Tr "packages.owner.settings.cleanuprules.keep.count"}}: {{if eq .KeepCount 1}}{{$.locale.Tr "packages.owner.settings.cleanuprules.keep.count.1"}}{{else}}{{$.locale.Tr "packages.owner.settings.cleanuprules.keep.count.n" .KeepCount}}{{end}} +
+ {{end}} + {{if .KeepPattern}} +
+ {{$.locale.Tr "packages.owner.settings.cleanuprules.keep.pattern"}}: {{StringUtils.EllipsisString .KeepPattern 100}} +
+ {{end}} + {{if .RemoveDays}} +
+ {{$.locale.Tr "packages.owner.settings.cleanuprules.remove.days"}}: {{$.locale.Tr "tool.days" .RemoveDays}} +
+ {{end}} + {{if .RemovePattern}} +
+ {{$.locale.Tr "packages.owner.settings.cleanuprules.remove.pattern"}}: {{StringUtils.EllipsisString .RemovePattern 100}} +
+ {{end}} +
+
- {{svg .Type.SVGName 36}} -
- {{.Type.Name}} -
{{if .Enabled}}{{$.locale.Tr "enabled"}}{{else}}{{$.locale.Tr "disabled"}}{{end}}
- {{if .KeepCount}}
{{$.locale.Tr "packages.owner.settings.cleanuprules.keep.count"}}: {{if eq .KeepCount 1}}{{$.locale.Tr "packages.owner.settings.cleanuprules.keep.count.1"}}{{else}}{{$.locale.Tr "packages.owner.settings.cleanuprules.keep.count.n" .KeepCount}}{{end}}
{{end}} - {{if .KeepPattern}}
{{$.locale.Tr "packages.owner.settings.cleanuprules.keep.pattern"}}: {{StringUtils.EllipsisString .KeepPattern 100}}
{{end}} - {{if .RemoveDays}}
{{$.locale.Tr "packages.owner.settings.cleanuprules.remove.days"}}: {{$.locale.Tr "tool.days" .RemoveDays}}
{{end}} - {{if .RemovePattern}}
{{$.locale.Tr "packages.owner.settings.cleanuprules.remove.pattern"}}: {{StringUtils.EllipsisString .RemovePattern 100}}
{{end}} -
{{else}}
{{.locale.Tr "packages.owner.settings.cleanuprules.none"}}
diff --git a/templates/package/shared/list.tmpl b/templates/package/shared/list.tmpl index 79a2d885fb..d2370b1208 100644 --- a/templates/package/shared/list.tmpl +++ b/templates/package/shared/list.tmpl @@ -12,15 +12,15 @@
-
+
{{range .PackageDescriptors}} -
  • -
    -
    - {{.Package.Name}} +
    +
    +
    + {{.Package.Name}} {{svg .Package.Type.SVGName 16}} {{.Package.Type.Name}}
    -
    +
    {{$timeStr := TimeSinceUnix .Version.CreatedUnix $.locale}} {{$hasRepositoryAccess := false}} {{if .Repository}} @@ -33,10 +33,10 @@ {{end}}
    -
  • +
    {{else}} {{if not .HasPackages}} -
    +
    {{svg "octicon-package" 48}}

    {{.locale.Tr "packages.empty"}}

    {{if and .Repository .CanWritePackages}} diff --git a/templates/package/shared/versionlist.tmpl b/templates/package/shared/versionlist.tmpl index feba8ef145..897f4d716a 100644 --- a/templates/package/shared/versionlist.tmpl +++ b/templates/package/shared/versionlist.tmpl @@ -18,18 +18,16 @@
    -
    +
    {{range .PackageDescriptors}} -
  • -
    - -
    +
    +
    + {{.Version.LowerVersion}} +
    {{$.locale.Tr "packages.published_by" (TimeSinceUnix .Version.CreatedUnix $.locale) .Creator.HomeLink (.Creator.GetDisplayName | Escape) | Safe}}
    -
  • +
    {{else}}

    {{.locale.Tr "packages.filter.no_result"}}

    {{end}} diff --git a/templates/repo/actions/runs_list.tmpl b/templates/repo/actions/runs_list.tmpl index 87b5ed69de..1a45733b77 100644 --- a/templates/repo/actions/runs_list.tmpl +++ b/templates/repo/actions/runs_list.tmpl @@ -1,4 +1,4 @@ -
    +
    {{if eq (len .Runs) 0}}
    {{svg "octicon-no-entry" 48}} @@ -6,17 +6,15 @@
    {{end}} {{range .Runs}} -
  • -
    +
    +
    {{template "repo/actions/status" (dict "status" .Status.String "locale" $.locale)}}
    -
    - -
    +
    + + {{- .Title -}} + +
    {{if not $.CurWorkflow}}{{.WorkflowID}} {{end}}#{{.Index}} : {{$.locale.Tr "actions.runs.commit"}} {{ShortSha .CommitSHA}} @@ -24,18 +22,18 @@ {{.TriggerUser.GetDisplayName}}
    -
    +
    {{if .RefLink}} {{.PrettyRef}} {{else}} {{.PrettyRef}} {{end}}
    -
    -
    {{svg "octicon-calendar" 16}}{{TimeSinceUnix .Updated $.locale}}
    -
    {{svg "octicon-stopwatch" 16}}{{.Duration}}
    +
    +
    {{svg "octicon-calendar" 16}}{{TimeSinceUnix .Updated $.locale}}
    +
    {{svg "octicon-stopwatch" 16}}{{.Duration}}
    -
  • +
    {{end}}
    {{template "base/paginate" .}} diff --git a/templates/repo/header.tmpl b/templates/repo/header.tmpl index b119c31948..865f3ba4a7 100644 --- a/templates/repo/header.tmpl +++ b/templates/repo/header.tmpl @@ -8,7 +8,9 @@ {{if $avatar}} {{$avatar}} {{else}} - {{template "repo/icon" .}} +
    + {{template "repo/icon" .}} +
    {{end}} {{.Owner.Name}}
    /
    diff --git a/templates/repo/icon.tmpl b/templates/repo/icon.tmpl index e956745153..a37197d42a 100644 --- a/templates/repo/icon.tmpl +++ b/templates/repo/icon.tmpl @@ -1,4 +1,4 @@ -
    +
    {{if $.IsTemplate}} {{svg "octicon-repo-template" 32}} {{else}} diff --git a/templates/repo/settings/branches.tmpl b/templates/repo/settings/branches.tmpl index f8a0270db3..fcc3615ced 100644 --- a/templates/repo/settings/branches.tmpl +++ b/templates/repo/settings/branches.tmpl @@ -38,26 +38,27 @@
    -
    -
    -
    - - - {{range .ProtectedBranches}} - - - - - {{else}} - - {{end}} - -
    {{.RuleName}}
    - {{$.locale.Tr "repo.settings.edit_protected_branch"}} - -
    {{.locale.Tr "repo.settings.no_protected_branch"}}
    -
    +
    +
    + {{range .ProtectedBranches}} +
    +
    +
    +
    {{.RuleName}}
    +
    +
    +
    + {{$.locale.Tr "repo.settings.edit_protected_branch"}} + +
    +
    + {{else}} +
    + {{.locale.Tr "repo.settings.no_protected_branch"}} +
    + {{end}}
    {{end}} diff --git a/templates/repo/settings/collaboration.tmpl b/templates/repo/settings/collaboration.tmpl index 84f23ee0bd..0716489291 100644 --- a/templates/repo/settings/collaboration.tmpl +++ b/templates/repo/settings/collaboration.tmpl @@ -4,34 +4,38 @@ {{.locale.Tr "repo.settings.collaboration"}} {{if .Collaborators}} -
    - {{range .Collaborators}} -
    - -
    - {{svg "octicon-shield-lock"}} -