diff options
Diffstat (limited to 'templates/user/settings')
20 files changed, 82 insertions, 117 deletions
diff --git a/templates/user/settings/account.tmpl b/templates/user/settings/account.tmpl index 2ad3eb7af2..fe8e733219 100644 --- a/templates/user/settings/account.tmpl +++ b/templates/user/settings/account.tmpl @@ -1,8 +1,5 @@ -{{template "base/head" .}} -<div role="main" aria-label="{{.Title}}" class="page-content user settings account"> - {{template "user/settings/navbar" .}} - <div class="ui container"> - {{template "base/alert" .}} +{{template "user/settings/layout_head" (dict "ctxData" . "pageClass" "user settings account")}} + <div class="user-setting-content"> <h4 class="ui top attached header"> {{.locale.Tr "settings.password"}} </h4> @@ -159,7 +156,6 @@ </form> </div> </div> -</div> <div class="ui gitea-confirm-modal delete modal" id="delete-email"> <div class="header"> @@ -183,4 +179,4 @@ {{template "base/modal_actions_confirm" .}} </div> -{{template "base/footer" .}} +{{template "user/settings/layout_footer" .}} diff --git a/templates/user/settings/appearance.tmpl b/templates/user/settings/appearance.tmpl index c78caedc96..129fca2657 100644 --- a/templates/user/settings/appearance.tmpl +++ b/templates/user/settings/appearance.tmpl @@ -1,8 +1,5 @@ -{{template "base/head" .}} -<div role="main" aria-label="{{.Title}}" class="page-content user settings sshkeys"> - {{template "user/settings/navbar" .}} - <div class="ui container"> - {{template "base/alert" .}} +{{template "user/settings/layout_head" (dict "ctxData" . "pageClass" "user settings sshkeys")}} + <div class="user-setting-content"> <!-- Theme --> <h4 class="ui top attached header"> @@ -170,6 +167,4 @@ </form> </div> </div> -</div> - -{{template "base/footer" .}} +{{template "user/settings/layout_footer" .}} diff --git a/templates/user/settings/applications.tmpl b/templates/user/settings/applications.tmpl index bb0fba8f4f..c8789bbe82 100644 --- a/templates/user/settings/applications.tmpl +++ b/templates/user/settings/applications.tmpl @@ -1,8 +1,5 @@ -{{template "base/head" .}} -<div role="main" aria-label="{{.Title}}" class="page-content user settings applications"> - {{template "user/settings/navbar" .}} - <div class="ui container"> - {{template "base/alert" .}} +{{template "user/settings/layout_head" (dict "ctxData" . "pageClass" "user settings applications")}} + <div class="user-setting-content"> <h4 class="ui top attached header"> {{.locale.Tr "settings.manage_access_token"}} </h4> @@ -266,7 +263,6 @@ {{template "user/settings/applications_oauth2" .}} {{end}} </div> -</div> <div class="ui gitea-confirm-modal delete modal" id="delete-token"> <div class="header"> @@ -289,5 +285,4 @@ </div> </div> - -{{template "base/footer" .}} +{{template "user/settings/layout_footer" .}} diff --git a/templates/user/settings/applications_oauth2_edit.tmpl b/templates/user/settings/applications_oauth2_edit.tmpl index d2ca83b90d..2858ecd0ee 100644 --- a/templates/user/settings/applications_oauth2_edit.tmpl +++ b/templates/user/settings/applications_oauth2_edit.tmpl @@ -1,8 +1,6 @@ -{{template "base/head" .}} -<div role="main" aria-label="{{.Title}}" class="page-content user settings applications"> - {{template "user/settings/navbar" .}} +{{template "user/settings/layout_head" (dict "ctxData" . "pageClass" "user settings applications")}} + <div class="user-setting-content"> - {{template "user/settings/applications_oauth2_edit_form" .}} -</div> - -{{template "base/footer" .}} + {{template "user/settings/applications_oauth2_edit_form" .}} + </div> +{{template "user/settings/layout_footer" .}} diff --git a/templates/user/settings/applications_oauth2_edit_form.tmpl b/templates/user/settings/applications_oauth2_edit_form.tmpl index 9d7273fd6d..1a8336b150 100644 --- a/templates/user/settings/applications_oauth2_edit_form.tmpl +++ b/templates/user/settings/applications_oauth2_edit_form.tmpl @@ -1,5 +1,4 @@ <div class="ui container"> - {{template "base/alert" .}} <h4 class="ui top attached header"> {{.locale.Tr "settings.edit_oauth2_application"}} </h4> diff --git a/templates/user/settings/hook_new.tmpl b/templates/user/settings/hook_new.tmpl index 20aaf65f62..ac32cdd8c8 100644 --- a/templates/user/settings/hook_new.tmpl +++ b/templates/user/settings/hook_new.tmpl @@ -1,10 +1,7 @@ -{{template "base/head" .}} -<div class="page-content user settings new webhook"> - {{template "user/settings/navbar" .}} - <div class="ui container"> - <div class="twelve wide column content"> - {{template "base/alert" .}} - <h4 class="ui top attached header"> +{{template "user/settings/layout_head" (dict "ctxData" . "pageClass" "user settings new webhook")}} + <div class="user-setting-content"> + <div class="user-setting-content"> + <h4 class="ui top attached header"> {{if .PageIsSettingsHooksNew}}{{.locale.Tr "repo.settings.add_webhook"}}{{else}}{{.locale.Tr "repo.settings.update_webhook"}}{{end}} <div class="ui right"> {{if eq .HookType "gitea"}} @@ -49,5 +46,4 @@ {{template "repo/settings/webhook/history" .}} </div> </div> -</div> -{{template "base/footer" .}} +{{template "user/settings/layout_footer" .}} diff --git a/templates/user/settings/hooks.tmpl b/templates/user/settings/hooks.tmpl index 02bfa8a4e6..477c333220 100644 --- a/templates/user/settings/hooks.tmpl +++ b/templates/user/settings/hooks.tmpl @@ -1,8 +1,5 @@ -{{template "base/head" .}} -<div class="page-content user settings webhooks"> - {{template "user/settings/navbar" .}} - <div class="ui container"> +{{template "user/settings/layout_head" (dict "ctxData" . "pageClass" "user settings webhooks")}} + <div class="user-setting-content"> {{template "repo/settings/webhook/list" .}} </div> -</div> -{{template "base/footer" .}} +{{template "user/settings/layout_footer" .}} diff --git a/templates/user/settings/keys.tmpl b/templates/user/settings/keys.tmpl index 9a4be2b2c2..93037e7e28 100644 --- a/templates/user/settings/keys.tmpl +++ b/templates/user/settings/keys.tmpl @@ -1,12 +1,7 @@ -{{template "base/head" .}} -<div role="main" aria-label="{{.Title}}" class="page-content user settings sshkeys"> - {{template "user/settings/navbar" .}} - <div class="ui container"> - {{template "base/alert" .}} +{{template "user/settings/layout_head" (dict "ctxData" . "pageClass" "user settings sshkeys")}} + <div class="user-setting-content"> {{template "user/settings/keys_ssh" .}} {{template "user/settings/keys_principal" .}} {{template "user/settings/keys_gpg" .}} </div> -</div> - -{{template "base/footer" .}} +{{template "user/settings/layout_footer" .}} diff --git a/templates/user/settings/layout_footer.tmpl b/templates/user/settings/layout_footer.tmpl new file mode 100644 index 0000000000..46120d5102 --- /dev/null +++ b/templates/user/settings/layout_footer.tmpl @@ -0,0 +1,11 @@ +{{if false}}{{/* to make html structure "likely" complete to prevent IDE warnings */}} +<div class="page-content"> + <div class="user-layout-right"> + <div> + {{/* block: user-setting-content */}} +{{end}} + + </div> + </div> +</div> +{{template "base/footer" .}} diff --git a/templates/user/settings/layout_head.tmpl b/templates/user/settings/layout_head.tmpl new file mode 100644 index 0000000000..26d1653948 --- /dev/null +++ b/templates/user/settings/layout_head.tmpl @@ -0,0 +1,13 @@ +{{template "base/head" .ctxData}} +<div role="main" aria-label="{{.ctxData.Title}}" class="page-content {{.pageClass}}"> + <div class="ui container stackable grid"> + {{template "user/settings/navbar" .ctxData}} + <div class="twelve wide column"> + {{template "base/alert" .ctxData}} + {{/* block: user-setting-content */}} + +{{if false}}{{/* to make html structure "likely" complete to prevent IDE warnings */}} + </div> + </div> +</div> +{{end}} diff --git a/templates/user/settings/navbar.tmpl b/templates/user/settings/navbar.tmpl index 4afe2173c2..27ec73c34f 100644 --- a/templates/user/settings/navbar.tmpl +++ b/templates/user/settings/navbar.tmpl @@ -1,5 +1,6 @@ -<div class="ui secondary pointing tabular top attached borderless menu stackable new-menu navbar"> - <div class="new-menu-inner"> +<div class="four wide column"> + <div class="ui fluid vertical menu"> + <div class="header item">{{.locale.Tr "org.settings"}}</div> <a class="{{if .PageIsSettingsProfile}}active {{end}}item" href="{{AppSubUrl}}/user/settings"> {{.locale.Tr "settings.profile"}} </a> diff --git a/templates/user/settings/organization.tmpl b/templates/user/settings/organization.tmpl index 97b5a6a0bc..088878e9cd 100644 --- a/templates/user/settings/organization.tmpl +++ b/templates/user/settings/organization.tmpl @@ -1,8 +1,5 @@ -{{template "base/head" .}} -<div role="main" aria-label="{{.Title}}" class="page-content user settings organization"> - {{template "user/settings/navbar" .}} - <div class="ui container"> - {{template "base/alert" .}} +{{template "user/settings/layout_head" (dict "ctxData" . "pageClass" "user settings organization")}} + <div class="user-setting-content"> <h4 class="ui top attached header"> {{.locale.Tr "settings.orgs"}} {{if .SignedUser.CanCreateOrganization}} @@ -39,7 +36,7 @@ {{end}} </div> </div> -</div> + <div class="ui gitea-confirm-modal delete modal" id="leave-organization"> <div class="header"> {{$.locale.Tr "org.members.leave"}} @@ -49,4 +46,5 @@ </div> {{template "base/modal_actions_confirm" .}} </div> -{{template "base/footer" .}} + +{{template "user/settings/layout_footer" .}} diff --git a/templates/user/settings/packages.tmpl b/templates/user/settings/packages.tmpl index 1faddab5de..a35597335b 100644 --- a/templates/user/settings/packages.tmpl +++ b/templates/user/settings/packages.tmpl @@ -1,8 +1,5 @@ -{{template "base/head" .}} -<div role="main" aria-label="{{.Title}}" class="page-content user settings packages"> - {{template "user/settings/navbar" .}} - <div class="ui container"> - {{template "base/alert" .}} +{{template "user/settings/layout_head" (dict "ctxData" . "pageClass" "user settings packages")}} + <div class="user-setting-content"> {{template "package/shared/cleanup_rules/list" .}} {{template "package/shared/cargo" .}} @@ -25,4 +22,4 @@ </div> </div> </div> -{{template "base/footer" .}} +{{template "user/settings/layout_footer" .}} diff --git a/templates/user/settings/packages_cleanup_rules_edit.tmpl b/templates/user/settings/packages_cleanup_rules_edit.tmpl index 114c825a48..522b524882 100644 --- a/templates/user/settings/packages_cleanup_rules_edit.tmpl +++ b/templates/user/settings/packages_cleanup_rules_edit.tmpl @@ -1,9 +1,5 @@ -{{template "base/head" .}} -<div role="main" aria-label="{{.Title}}" class="page-content user settings packages"> - {{template "user/settings/navbar" .}} - <div class="ui container"> - {{template "base/alert" .}} +{{template "user/settings/layout_head" (dict "ctxData" . "pageClass" "user settings packages")}} + <div class="user-setting-content"> {{template "package/shared/cleanup_rules/edit" .}} </div> -</div> -{{template "base/footer" .}} +{{template "user/settings/layout_footer" .}} diff --git a/templates/user/settings/packages_cleanup_rules_preview.tmpl b/templates/user/settings/packages_cleanup_rules_preview.tmpl index d37e5148b3..d99aee4b9a 100644 --- a/templates/user/settings/packages_cleanup_rules_preview.tmpl +++ b/templates/user/settings/packages_cleanup_rules_preview.tmpl @@ -1,8 +1,5 @@ -{{template "base/head" .}} -<div role="main" aria-label="{{.Title}}" class="page-content user settings packages admin"> - {{template "user/settings/navbar" .}} - <div class="ui container"> +{{template "user/settings/layout_head" (dict "ctxData" . "pageClass" "user packages admin")}} + <div class="user-setting-content"> {{template "package/shared/cleanup_rules/preview" .}} </div> -</div> -{{template "base/footer" .}} +{{template "user/settings/layout_footer" .}} diff --git a/templates/user/settings/profile.tmpl b/templates/user/settings/profile.tmpl index 7ef9a955a7..92fbf5814c 100644 --- a/templates/user/settings/profile.tmpl +++ b/templates/user/settings/profile.tmpl @@ -1,8 +1,5 @@ -{{template "base/head" .}} -<div role="main" aria-label="{{.Title}}" class="page-content user settings profile"> - {{template "user/settings/navbar" .}} - <div class="ui container"> - {{template "base/alert" .}} +{{template "user/settings/layout_head" (dict "ctxData" . "pageClass" "user settings profile")}} + <div class="user-setting-content"> <h4 class="ui top attached header"> {{.locale.Tr "settings.public_profile"}} </h4> @@ -133,5 +130,4 @@ </form> </div> </div> -</div> -{{template "base/footer" .}} +{{template "user/settings/layout_footer" .}} diff --git a/templates/user/settings/repos.tmpl b/templates/user/settings/repos.tmpl index 7f0b106614..5e11f58988 100644 --- a/templates/user/settings/repos.tmpl +++ b/templates/user/settings/repos.tmpl @@ -1,8 +1,5 @@ -{{template "base/head" .}} -<div role="main" aria-label="{{.Title}}" class="page-content user settings repos"> - {{template "user/settings/navbar" .}} - <div class="ui container"> - {{template "base/alert" .}} +{{template "user/settings/layout_head" (dict "ctxData" . "pageClass" "user settings repos")}} + <div class="user-setting-content"> <h4 class="ui top attached header"> {{.locale.Tr "settings.repos"}} </h4> @@ -127,7 +124,6 @@ {{end}} </div> </div> -</div> <div class="ui gitea-confirm-modal delete modal"> <div class="header"> @@ -139,4 +135,5 @@ </div> {{template "base/modal_actions_confirm" .}} </div> -{{template "base/footer" .}} + +{{template "user/settings/layout_footer" .}} diff --git a/templates/user/settings/secrets.tmpl b/templates/user/settings/secrets.tmpl index 1a6875acef..a831453f2a 100644 --- a/templates/user/settings/secrets.tmpl +++ b/templates/user/settings/secrets.tmpl @@ -1,10 +1,6 @@ -{{template "base/head" .}} -<div class="page-content user settings secrets"> - {{template "user/settings/navbar" .}} - <div class="ui container"> - {{template "base/alert" .}} +{{template "user/settings/layout_head" (dict "ctxData" . "pageClass" "user settings secrets")}} + <div class="user-setting-content"> {{template "shared/secrets/add_list" .}} </div> -</div> -{{template "base/footer" .}} +{{template "user/settings/layout_footer" .}} diff --git a/templates/user/settings/security/security.tmpl b/templates/user/settings/security/security.tmpl index d412a4f4e8..aee0456b8f 100644 --- a/templates/user/settings/security/security.tmpl +++ b/templates/user/settings/security/security.tmpl @@ -1,8 +1,5 @@ -{{template "base/head" .}} -<div role="main" aria-label="{{.Title}}" class="page-content user settings security"> - {{template "user/settings/navbar" .}} - <div class="ui container"> - {{template "base/alert" .}} +{{template "user/settings/layout_head" (dict "ctxData" . "pageClass" "user settings security")}} + <div class="user-setting-content"> {{template "user/settings/security/twofa" .}} {{template "user/settings/security/webauthn" .}} {{template "user/settings/security/accountlinks" .}} @@ -10,6 +7,5 @@ {{template "user/settings/security/openid" .}} {{end}} </div> -</div> -{{template "base/footer" .}} +{{template "user/settings/layout_footer" .}} diff --git a/templates/user/settings/security/twofa_enroll.tmpl b/templates/user/settings/security/twofa_enroll.tmpl index b7e1f4b7cc..0ff0beb1bc 100644 --- a/templates/user/settings/security/twofa_enroll.tmpl +++ b/templates/user/settings/security/twofa_enroll.tmpl @@ -1,8 +1,5 @@ -{{template "base/head" .}} -<div role="main" aria-label="{{.Title}}" class="page-content user settings twofa"> - {{template "user/settings/navbar" .}} - <div class="ui container"> - {{template "base/alert" .}} +{{template "user/settings/layout_head" (dict "ctxData" . "pageClass" "user settings twofa")}} + <div class="user-setting-content"> <h4 class="ui top attached header"> {{.locale.Tr "settings.twofa_enroll"}} </h4> @@ -24,6 +21,5 @@ </form> </div> </div> -</div> -{{template "base/footer" .}} +{{template "user/settings/layout_footer" .}} |