Initial support for colorblindness-friendly themes (#30625)

Initial support for #25680

This PR only adds some simple styles from GitHub, it is big enough and
it focuses on adding the necessary framework-level supports. More styles
could be fine-tuned later.
This commit is contained in:
2024-04-24 00:18:41 +08:00
committed by GitHub
parent dd2aaadce3
commit b79e3db264
23 changed files with 154 additions and 92 deletions

View File

@ -230,6 +230,7 @@ func Contexter() func(next http.Handler) http.Handler {
// HasError returns true if error occurs in form validation.
// Attention: this function changes ctx.Data and ctx.Flash
// If HasError is called, then before Redirect, the error message should be stored by ctx.Flash.Error(ctx.GetErrMsg()) again.
func (ctx *Context) HasError() bool {
hasErr, ok := ctx.Data["HasError"]
if !ok {