diff --git a/templates/devtest/flex-list.tmpl b/templates/devtest/flex-list.tmpl index c962ba8c724b9..80cd22440d48e 100644 --- a/templates/devtest/flex-list.tmpl +++ b/templates/devtest/flex-list.tmpl @@ -3,7 +3,7 @@

Flex List (standalone)

-
+
@@ -102,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 7cc11b073e13b..afa360fd93d18 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 897f4d716ae86..e8043b9abba35 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 1a45733b77ca4..d8e27fab52ab7 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 10e79f6b82ac4..a9e540bc65d61 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 72cf1dd6c8292..2cd0fb92ac5f7 100644 --- a/templates/shared/issuelist.tmpl +++ b/templates/shared/issuelist.tmpl @@ -1,4 +1,4 @@ -
+
{{$approvalCounts := .ApprovalCounts}} {{range .Issues}}
diff --git a/templates/user/settings/keys_gpg.tmpl b/templates/user/settings/keys_gpg.tmpl index 5ab96eb63adae..e7a66de23f72e 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 0d2916d30cd5d..30c4133b6e331 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/shared/flex-list.css b/web_src/css/shared/flex-list.css index 7ecd7f7c09fb5..27f9bc2d69e8e 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); } -/* remove padding on first and last child so it better fits into .ui.segment or - when preceded or followed by a .ui.divider */ -.flex-list > .flex-item:first-child { +/* 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-item:last-child { + +.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; +}