diff options
author | silverwind <me@silverwind.io> | 2024-03-23 00:54:09 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-22 23:54:09 +0000 |
commit | 3ccda41a539b8ba7841919ee12dc2877ddc03818 (patch) | |
tree | 0cadb8a2d0b1804d72c92e1c41c84d06ee2e156f /templates/user | |
parent | bc92478575d9c1e84aa4ba4052dffcdc109a0323 (diff) | |
download | gitea-3ccda41a539b8ba7841919ee12dc2877ddc03818.tar.gz gitea-3ccda41a539b8ba7841919ee12dc2877ddc03818.zip |
Introduce `.secondary-nav` and handle `.page-content` spacing universally (#29982)
Fixes: https://github.com/go-gitea/gitea/issues/29981. Introduce
`.secondary-nav` as a universal way for styling and margin adjustments
inside `.page-content`.
If the first child of `.page-content` is `.secondary-nav`, we add margin
below it, otherwise we add padding to the first child. Notable changes:
- `--color-header-wrapper` is replaced with `--color-secondary-nav-bg`.
- `navbar` class is removed.
---------
Co-authored-by: Giteabot <teabot@gitea.io>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Diffstat (limited to 'templates/user')
-rw-r--r-- | templates/user/auth/link_account.tmpl | 2 | ||||
-rw-r--r-- | templates/user/auth/signin_navbar.tmpl | 2 | ||||
-rw-r--r-- | templates/user/auth/signup_openid_navbar.tmpl | 2 | ||||
-rw-r--r-- | templates/user/dashboard/navbar.tmpl | 3 |
4 files changed, 4 insertions, 5 deletions
diff --git a/templates/user/auth/link_account.tmpl b/templates/user/auth/link_account.tmpl index 81ea92c959..8dd49ccd60 100644 --- a/templates/user/auth/link_account.tmpl +++ b/templates/user/auth/link_account.tmpl @@ -1,6 +1,6 @@ {{template "base/head" .}} <div role="main" aria-label="{{.Title}}" class="page-content user link-account"> - <overflow-menu class="ui secondary pointing tabular top attached borderless menu navbar tw-bg-header-wrapper"> + <overflow-menu class="ui secondary pointing tabular top attached borderless menu secondary-nav"> <div class="overflow-menu-items tw-justify-center"> <!-- TODO handle .ShowRegistrationButton once other login bugs are fixed --> {{if not .AllowOnlyInternalRegistration}} diff --git a/templates/user/auth/signin_navbar.tmpl b/templates/user/auth/signin_navbar.tmpl index a576883065..7f52185a7d 100644 --- a/templates/user/auth/signin_navbar.tmpl +++ b/templates/user/auth/signin_navbar.tmpl @@ -1,5 +1,5 @@ {{if or .EnableOpenIDSignIn .EnableSSPI}} -<overflow-menu class="ui secondary pointing tabular top attached borderless menu navbar tw-bg-header-wrapper"> +<overflow-menu class="ui secondary pointing tabular top attached borderless menu navbar secondary-nav"> <div class="overflow-menu-items tw-justify-center"> <a class="{{if .PageIsLogin}}active {{end}}item" rel="nofollow" href="{{AppSubUrl}}/user/login"> {{ctx.Locale.Tr "auth.login_userpass"}} diff --git a/templates/user/auth/signup_openid_navbar.tmpl b/templates/user/auth/signup_openid_navbar.tmpl index 9cf81b048f..89068ddde1 100644 --- a/templates/user/auth/signup_openid_navbar.tmpl +++ b/templates/user/auth/signup_openid_navbar.tmpl @@ -1,4 +1,4 @@ -<overflow-menu class="ui secondary pointing tabular top attached borderless menu navbar tw-bg-header-wrapper"> +<overflow-menu class="ui secondary pointing tabular top attached borderless menu secondary-nav"> <div class="overflow-menu-items tw-justify-center"> <a class="{{if .PageIsOpenIDConnect}}active {{end}}item" href="{{AppSubUrl}}/user/openid/connect"> {{ctx.Locale.Tr "auth.openid_connect_title"}} diff --git a/templates/user/dashboard/navbar.tmpl b/templates/user/dashboard/navbar.tmpl index 917e024a6f..464228289e 100644 --- a/templates/user/dashboard/navbar.tmpl +++ b/templates/user/dashboard/navbar.tmpl @@ -1,4 +1,4 @@ -<div class="dashboard-navbar"> +<div class="secondary-nav tw-border-b tw-border-b-secondary"> <div class="ui secondary stackable menu"> <div class="item"> <div class="ui floating dropdown jump"> @@ -105,4 +105,3 @@ {{end}} </div> </div> -<div class="divider tw-mt-0"></div> |