From b1cf7f4df11dfac879d65125880d18a03fef22c0 Mon Sep 17 00:00:00 2001 From: silverwind Date: Tue, 1 Dec 2020 05:00:14 +0100 Subject: [PATCH] Add class to page content to unify top margin (#13766) * Add class to page content to unify top margin Previously pages would individually set this margin but some didn't so content would stick to the header without any space. Resolve this by adding a new class that is added on all pages. The only place where we remove this margin again is on the pages with menu or wrapper in the header. * fix admin notices * fix team pages * fix loading segment on gitgraph for arc-green * fix last missing case Co-authored-by: techknowlogick --- templates/admin/auth/edit.tmpl | 2 +- templates/admin/auth/list.tmpl | 2 +- templates/admin/auth/new.tmpl | 2 +- templates/admin/config.tmpl | 2 +- templates/admin/dashboard.tmpl | 2 +- templates/admin/emails/list.tmpl | 2 +- templates/admin/hook_new.tmpl | 2 +- templates/admin/hooks.tmpl | 2 +- templates/admin/monitor.tmpl | 2 +- templates/admin/notice.tmpl | 2 +- templates/admin/org/list.tmpl | 2 +- templates/admin/queue.tmpl | 2 +- templates/admin/repo/list.tmpl | 2 +- templates/admin/repo/unadopted.tmpl | 2 +- templates/admin/user/edit.tmpl | 2 +- templates/admin/user/list.tmpl | 2 +- templates/admin/user/new.tmpl | 2 +- templates/explore/code.tmpl | 2 +- templates/explore/navbar.tmpl | 2 +- templates/explore/organizations.tmpl | 2 +- templates/explore/repos.tmpl | 2 +- templates/explore/users.tmpl | 2 +- templates/home.tmpl | 2 +- templates/install.tmpl | 2 +- templates/org/create.tmpl | 2 +- templates/org/home.tmpl | 2 +- templates/org/member/members.tmpl | 2 +- templates/org/settings/delete.tmpl | 2 +- templates/org/settings/hook_new.tmpl | 2 +- templates/org/settings/hooks.tmpl | 2 +- templates/org/settings/labels.tmpl | 2 +- templates/org/settings/options.tmpl | 2 +- templates/org/team/members.tmpl | 2 +- templates/org/team/new.tmpl | 2 +- templates/org/team/repositories.tmpl | 2 +- templates/org/team/teams.tmpl | 2 +- templates/post-install.tmpl | 2 +- templates/repo/activity.tmpl | 2 +- templates/repo/branch/list.tmpl | 2 +- templates/repo/commit_page.tmpl | 2 +- templates/repo/commits.tmpl | 2 +- templates/repo/create.tmpl | 2 +- templates/repo/diff/compare.tmpl | 2 +- templates/repo/editor/delete.tmpl | 2 +- templates/repo/editor/edit.tmpl | 2 +- templates/repo/editor/upload.tmpl | 2 +- templates/repo/empty.tmpl | 2 +- templates/repo/forks.tmpl | 2 +- templates/repo/graph.tmpl | 2 +- templates/repo/home.tmpl | 2 +- templates/repo/issue/choose.tmpl | 2 +- templates/repo/issue/labels.tmpl | 2 +- templates/repo/issue/list.tmpl | 2 +- templates/repo/issue/milestone_issues.tmpl | 2 +- templates/repo/issue/milestone_new.tmpl | 2 +- templates/repo/issue/milestones.tmpl | 2 +- templates/repo/issue/new.tmpl | 2 +- templates/repo/issue/view.tmpl | 2 +- templates/repo/migrate/git.tmpl | 2 +- templates/repo/migrate/gitea.tmpl | 2 +- templates/repo/migrate/github.tmpl | 2 +- templates/repo/migrate/gitlab.tmpl | 2 +- templates/repo/migrate/migrate.tmpl | 2 +- templates/repo/migrate/migrating.tmpl | 2 +- templates/repo/projects/list.tmpl | 2 +- templates/repo/projects/new.tmpl | 2 +- templates/repo/projects/view.tmpl | 2 +- templates/repo/pulls/commits.tmpl | 2 +- templates/repo/pulls/files.tmpl | 2 +- templates/repo/pulls/fork.tmpl | 2 +- templates/repo/release/list.tmpl | 2 +- templates/repo/release/new.tmpl | 2 +- templates/repo/search.tmpl | 2 +- templates/repo/settings/branches.tmpl | 2 +- templates/repo/settings/collaboration.tmpl | 2 +- templates/repo/settings/deploy_keys.tmpl | 2 +- templates/repo/settings/githook_edit.tmpl | 2 +- templates/repo/settings/githooks.tmpl | 2 +- templates/repo/settings/lfs.tmpl | 2 +- templates/repo/settings/lfs_file.tmpl | 2 +- templates/repo/settings/lfs_file_find.tmpl | 2 +- templates/repo/settings/lfs_locks.tmpl | 2 +- templates/repo/settings/lfs_pointers.tmpl | 2 +- templates/repo/settings/options.tmpl | 2 +- templates/repo/settings/protected_branch.tmpl | 2 +- templates/repo/settings/webhook/base.tmpl | 2 +- templates/repo/settings/webhook/new.tmpl | 2 +- templates/repo/watchers.tmpl | 2 +- templates/repo/wiki/new.tmpl | 2 +- templates/repo/wiki/pages.tmpl | 2 +- templates/repo/wiki/revision.tmpl | 2 +- templates/repo/wiki/start.tmpl | 2 +- templates/repo/wiki/view.tmpl | 2 +- templates/status/404.tmpl | 16 +++++++++------- templates/status/500.tmpl | 2 +- templates/user/auth/activate.tmpl | 2 +- templates/user/auth/change_passwd.tmpl | 2 +- templates/user/auth/finalize_openid.tmpl | 2 +- templates/user/auth/forgot_passwd.tmpl | 2 +- templates/user/auth/grant.tmpl | 2 +- templates/user/auth/grant_error.tmpl | 4 ++-- templates/user/auth/link_account.tmpl | 3 +-- templates/user/auth/prohibit_login.tmpl | 2 +- templates/user/auth/reset_passwd.tmpl | 2 +- templates/user/auth/signin.tmpl | 2 +- templates/user/auth/signin_navbar.tmpl | 2 -- templates/user/auth/signin_openid.tmpl | 2 +- templates/user/auth/signup.tmpl | 2 +- templates/user/auth/signup_openid_connect.tmpl | 2 +- templates/user/auth/signup_openid_register.tmpl | 2 +- templates/user/auth/twofa.tmpl | 2 +- templates/user/auth/twofa_scratch.tmpl | 2 +- templates/user/auth/u2f.tmpl | 2 +- templates/user/dashboard/dashboard.tmpl | 2 +- templates/user/dashboard/issues.tmpl | 2 +- templates/user/dashboard/milestones.tmpl | 2 +- .../user/notification/notification_div.tmpl | 2 +- templates/user/profile.tmpl | 2 +- templates/user/project.tmpl | 2 +- templates/user/settings/account.tmpl | 2 +- templates/user/settings/applications.tmpl | 2 +- .../user/settings/applications_oauth2_edit.tmpl | 2 +- templates/user/settings/keys.tmpl | 2 +- templates/user/settings/organization.tmpl | 2 +- templates/user/settings/profile.tmpl | 2 +- templates/user/settings/repos.tmpl | 2 +- templates/user/settings/security.tmpl | 2 +- templates/user/settings/twofa_enroll.tmpl | 2 +- web_src/less/_admin.less | 4 ---- web_src/less/_base.less | 15 ++++++++++++++- web_src/less/_dashboard.less | 1 - web_src/less/_explore.less | 1 - web_src/less/_repository.less | 1 - 133 files changed, 150 insertions(+), 145 deletions(-) diff --git a/templates/admin/auth/edit.tmpl b/templates/admin/auth/edit.tmpl index 24f6b37c8134..3347a91bf621 100644 --- a/templates/admin/auth/edit.tmpl +++ b/templates/admin/auth/edit.tmpl @@ -1,5 +1,5 @@ {{template "base/head" .}} -
+
{{template "admin/navbar" .}}
{{template "base/alert" .}} diff --git a/templates/admin/auth/list.tmpl b/templates/admin/auth/list.tmpl index 60b8f6fbe761..851254c09bbc 100644 --- a/templates/admin/auth/list.tmpl +++ b/templates/admin/auth/list.tmpl @@ -1,5 +1,5 @@ {{template "base/head" .}} -
+
{{template "admin/navbar" .}}
{{template "base/alert" .}} diff --git a/templates/admin/auth/new.tmpl b/templates/admin/auth/new.tmpl index e72a82cbb3f5..c252f7d3f214 100644 --- a/templates/admin/auth/new.tmpl +++ b/templates/admin/auth/new.tmpl @@ -1,5 +1,5 @@ {{template "base/head" .}} -
+
{{template "admin/navbar" .}}
{{template "base/alert" .}} diff --git a/templates/admin/config.tmpl b/templates/admin/config.tmpl index 4d88c59feaec..00ad7a9a0e41 100644 --- a/templates/admin/config.tmpl +++ b/templates/admin/config.tmpl @@ -1,5 +1,5 @@ {{template "base/head" .}} -
+
{{template "admin/navbar" .}}
{{template "base/alert" .}} diff --git a/templates/admin/dashboard.tmpl b/templates/admin/dashboard.tmpl index 911cdb9fef3a..e6d9f57c2e3b 100644 --- a/templates/admin/dashboard.tmpl +++ b/templates/admin/dashboard.tmpl @@ -1,5 +1,5 @@ {{template "base/head" .}} -
+
{{template "admin/navbar" .}}
{{template "base/alert" .}} diff --git a/templates/admin/emails/list.tmpl b/templates/admin/emails/list.tmpl index 8a60088f0a10..752c0104434b 100644 --- a/templates/admin/emails/list.tmpl +++ b/templates/admin/emails/list.tmpl @@ -1,5 +1,5 @@ {{template "base/head" .}} -
+
{{template "admin/navbar" .}}
{{template "base/alert" .}} diff --git a/templates/admin/hook_new.tmpl b/templates/admin/hook_new.tmpl index 26169acaa0bf..8eeb0e526481 100644 --- a/templates/admin/hook_new.tmpl +++ b/templates/admin/hook_new.tmpl @@ -1,5 +1,5 @@ {{template "base/head" .}} -
+
{{template "admin/navbar" .}}
{{template "base/alert" .}} diff --git a/templates/admin/hooks.tmpl b/templates/admin/hooks.tmpl index 3265a1d69a63..c09c6fcafe83 100644 --- a/templates/admin/hooks.tmpl +++ b/templates/admin/hooks.tmpl @@ -1,5 +1,5 @@ {{template "base/head" .}} -
+
{{template "admin/navbar" .}}
{{template "repo/settings/webhook/list" .}} diff --git a/templates/admin/monitor.tmpl b/templates/admin/monitor.tmpl index c3600fa99608..5a38b92eef75 100644 --- a/templates/admin/monitor.tmpl +++ b/templates/admin/monitor.tmpl @@ -1,5 +1,5 @@ {{template "base/head" .}} -
+
{{template "admin/navbar" .}}
{{template "base/alert" .}} diff --git a/templates/admin/notice.tmpl b/templates/admin/notice.tmpl index d1d264c8c879..3320f5884c05 100644 --- a/templates/admin/notice.tmpl +++ b/templates/admin/notice.tmpl @@ -1,5 +1,5 @@ {{template "base/head" .}} -
+
{{template "admin/navbar" .}}
{{template "base/alert" .}} diff --git a/templates/admin/org/list.tmpl b/templates/admin/org/list.tmpl index 4a0fd1611127..92b119d65160 100644 --- a/templates/admin/org/list.tmpl +++ b/templates/admin/org/list.tmpl @@ -1,5 +1,5 @@ {{template "base/head" .}} -
+
{{template "admin/navbar" .}}
{{template "base/alert" .}} diff --git a/templates/admin/queue.tmpl b/templates/admin/queue.tmpl index 567e72e03c62..6524c9839fe3 100644 --- a/templates/admin/queue.tmpl +++ b/templates/admin/queue.tmpl @@ -1,5 +1,5 @@ {{template "base/head" .}} -
+
{{template "admin/navbar" .}}
{{template "base/alert" .}} diff --git a/templates/admin/repo/list.tmpl b/templates/admin/repo/list.tmpl index df38831b6da5..fbadfeea78c6 100644 --- a/templates/admin/repo/list.tmpl +++ b/templates/admin/repo/list.tmpl @@ -1,5 +1,5 @@ {{template "base/head" .}} -
+
{{template "admin/navbar" .}}
{{template "base/alert" .}} diff --git a/templates/admin/repo/unadopted.tmpl b/templates/admin/repo/unadopted.tmpl index 7a046c6026d8..26c91c3155c6 100644 --- a/templates/admin/repo/unadopted.tmpl +++ b/templates/admin/repo/unadopted.tmpl @@ -1,5 +1,5 @@ {{template "base/head" .}} -
+
{{template "admin/navbar" .}}
{{template "base/alert" .}} diff --git a/templates/admin/user/edit.tmpl b/templates/admin/user/edit.tmpl index e29b18f5beeb..7f1706e55a43 100644 --- a/templates/admin/user/edit.tmpl +++ b/templates/admin/user/edit.tmpl @@ -1,5 +1,5 @@ {{template "base/head" .}} -
+
{{template "admin/navbar" .}}
{{template "base/alert" .}} diff --git a/templates/admin/user/list.tmpl b/templates/admin/user/list.tmpl index d6dd7d5c0396..dafeadaf964b 100644 --- a/templates/admin/user/list.tmpl +++ b/templates/admin/user/list.tmpl @@ -1,5 +1,5 @@ {{template "base/head" .}} -
+
{{template "admin/navbar" .}}
{{template "base/alert" .}} diff --git a/templates/admin/user/new.tmpl b/templates/admin/user/new.tmpl index b05f81717f8f..885045dd0270 100644 --- a/templates/admin/user/new.tmpl +++ b/templates/admin/user/new.tmpl @@ -1,5 +1,5 @@ {{template "base/head" .}} -
+
{{template "admin/navbar" .}}
{{template "base/alert" .}} diff --git a/templates/explore/code.tmpl b/templates/explore/code.tmpl index bf7f85c5acec..9c880e59f2aa 100644 --- a/templates/explore/code.tmpl +++ b/templates/explore/code.tmpl @@ -1,5 +1,5 @@ {{template "base/head" .}} -
+
{{template "explore/navbar" .}}
diff --git a/templates/explore/navbar.tmpl b/templates/explore/navbar.tmpl index ce86c0a8c16b..93810dcf4a16 100644 --- a/templates/explore/navbar.tmpl +++ b/templates/explore/navbar.tmpl @@ -1,4 +1,4 @@ -