mirror of
https://github.com/go-gitea/gitea.git
synced 2026-04-18 07:48:48 +01:00
Instance-wide (global) info banner and maintenance mode (#36571)
The banner allows site operators to communicate important announcements (e.g., maintenance windows, policy updates, service notices) directly within the UI. The maintenance mode only allows admin to access the web UI. * Fix #2345 * Fix #9618 --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
11
templates/base/head_banner.tmpl
Normal file
11
templates/base/head_banner.tmpl
Normal file
@@ -0,0 +1,11 @@
|
||||
{{$banner := ctx.CurrentWebBanner}}
|
||||
{{if $banner}}
|
||||
<div class="ui info message web-banner-container">
|
||||
<div class="render-content markup web-banner-content">
|
||||
{{ctx.RenderUtils.MarkdownToHtml $banner.ContentMessage}}
|
||||
</div>
|
||||
<button type="button" class="btn dismiss-banner link-action" aria-label="{{ctx.Locale.Tr "dismiss"}}" data-url="{{AppSubUrl}}/-/web-banner/dismiss">
|
||||
{{svg "octicon-x"}}
|
||||
</button>
|
||||
</div>
|
||||
{{end}}
|
||||
@@ -176,3 +176,4 @@
|
||||
</div>
|
||||
{{end}}
|
||||
</nav>
|
||||
{{template "base/head_banner"}}
|
||||
|
||||
Reference in New Issue
Block a user