diff --git a/templates/devtest/flex-list.tmpl b/templates/devtest/flex-list.tmpl index cbc263213937..80cd22440d48 100644 --- a/templates/devtest/flex-list.tmpl +++ b/templates/devtest/flex-list.tmpl @@ -2,7 +2,8 @@
-

Flex List (standalone)

+

Flex List (standalone)

+
@@ -85,7 +86,7 @@
-
+

Flex List (with "ui segment")

@@ -101,6 +102,14 @@
item 2
+ +

If parent provides the padding/margin space:

+
+
+
item 1 (no padding top)
+
item 2 (no padding bottom)
+
+
{{template "base/footer" .}} diff --git a/templates/package/shared/list.tmpl b/templates/package/shared/list.tmpl index 7cc11b073e13..afa360fd93d1 100644 --- a/templates/package/shared/list.tmpl +++ b/templates/package/shared/list.tmpl @@ -12,8 +12,9 @@ -
+
{{range .PackageDescriptors}} +
@@ -34,6 +35,7 @@
+
{{else}} {{if not .HasPackages}}
@@ -46,7 +48,7 @@

{{.locale.Tr "packages.empty.documentation" "https://docs.gitea.com/usage/packages/overview/" | Safe}}

{{else}} -

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

+

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

{{end}} {{end}} {{template "base/paginate" .}} diff --git a/templates/package/shared/versionlist.tmpl b/templates/package/shared/versionlist.tmpl index 897f4d716ae8..e8043b9abba3 100644 --- a/templates/package/shared/versionlist.tmpl +++ b/templates/package/shared/versionlist.tmpl @@ -18,8 +18,9 @@
-
+
{{range .PackageDescriptors}} +
{{.Version.LowerVersion}} @@ -28,8 +29,9 @@
+
{{else}} -

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

+

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

{{end}} {{template "base/paginate" .}}
diff --git a/templates/repo/actions/runs_list.tmpl b/templates/repo/actions/runs_list.tmpl index 1a45733b77ca..d8e27fab52ab 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}} diff --git a/templates/repo/settings/deploy_keys.tmpl b/templates/repo/settings/deploy_keys.tmpl index 10e79f6b82ac..a9e540bc65d6 100644 --- a/templates/repo/settings/deploy_keys.tmpl +++ b/templates/repo/settings/deploy_keys.tmpl @@ -11,7 +11,7 @@
-
+
{{.CsrfTokenHtml}}
diff --git a/templates/shared/issuelist.tmpl b/templates/shared/issuelist.tmpl index 72cf1dd6c829..2cd0fb92ac5f 100644 --- a/templates/shared/issuelist.tmpl +++ b/templates/shared/issuelist.tmpl @@ -1,4 +1,4 @@ -
+
{{$approvalCounts := .ApprovalCounts}} {{range .Issues}}
diff --git a/templates/user/dashboard/feeds.tmpl b/templates/user/dashboard/feeds.tmpl index 6bfd8b12be71..bf697634741a 100644 --- a/templates/user/dashboard/feeds.tmpl +++ b/templates/user/dashboard/feeds.tmpl @@ -116,7 +116,7 @@
{{TimeSince .GetCreate $.locale}}
- {{svg (printf "octicon-%s" (ActionIcon .GetOpType)) 32}} + {{svg (printf "octicon-%s" (ActionIcon .GetOpType)) 32 "text grey gt-mr-2"}}
{{end}} diff --git a/templates/user/profile.tmpl b/templates/user/profile.tmpl index 396d9ebcd470..2b81a2349287 100644 --- a/templates/user/profile.tmpl +++ b/templates/user/profile.tmpl @@ -17,9 +17,7 @@
{{end}} {{template "user/heatmap" .}} -
- {{template "user/dashboard/feeds" .}} -
+ {{template "user/dashboard/feeds" .}} {{else if eq .TabName "stars"}}
{{template "explore/repo_search" .}} diff --git a/templates/user/settings/keys_gpg.tmpl b/templates/user/settings/keys_gpg.tmpl index 5ab96eb63ada..e7a66de23f72 100644 --- a/templates/user/settings/keys_gpg.tmpl +++ b/templates/user/settings/keys_gpg.tmpl @@ -5,7 +5,7 @@
-
+
{{.CsrfTokenHtml}} diff --git a/templates/user/settings/keys_ssh.tmpl b/templates/user/settings/keys_ssh.tmpl index 0d2916d30cd5..30c4133b6e33 100644 --- a/templates/user/settings/keys_ssh.tmpl +++ b/templates/user/settings/keys_ssh.tmpl @@ -7,7 +7,7 @@
-
+
{{.CsrfTokenHtml}}
diff --git a/web_src/css/dashboard.css b/web_src/css/dashboard.css index 6dcf73e2a772..0168ee0bd70a 100644 --- a/web_src/css/dashboard.css +++ b/web_src/css/dashboard.css @@ -95,10 +95,3 @@ position: static; } } - -.feeds code { - padding: 2px 4px; - border-radius: var(--border-radius); - background-color: var(--color-markup-code-block); - word-break: break-all; -} diff --git a/web_src/css/shared/flex-list.css b/web_src/css/shared/flex-list.css index 1489983cfdcb..27f9bc2d69e8 100644 --- a/web_src/css/shared/flex-list.css +++ b/web_src/css/shared/flex-list.css @@ -91,11 +91,23 @@ border-top: 1px solid var(--color-secondary); } -/* Fomantic UI segment has default "padding: 1em", so here it removes the padding-top and padding-bottom accordingly */ +/* Fomantic UI segment has default "padding: 1em", so here it removes the padding-top and padding-bottom accordingly. +Developers could also use "flex-space-fitted" class to remove the first item's padding-top and the last item's padding-bottom */ +.flex-list.flex-space-fitted > .flex-item:first-child, .ui.segment > .flex-list:first-child > .flex-item:first-child { padding-top: 0; } +.flex-list.flex-space-fitted > .flex-item:last-child, .ui.segment > .flex-list:last-child > .flex-item:last-child { padding-bottom: 0; } + +/* If there is a divider besides the flex-list, some padding/margin are not needs */ +.divider + .flex-list > .flex-item:first-child { + padding-top: 0; +} + +.flex-list + .divider { + margin-top: 0; +}