1
0
Fork 0
mirror of https://github.com/miniflux/v2.git synced 2025-08-01 17:38:37 +00:00

Add lang attribute to root HTML tag

Allow hyphens css property to work correctly and improve screen readers.
This commit is contained in:
Tai 2021-06-01 03:19:37 +07:00 committed by GitHub
parent 20cd023c07
commit 1fd4c4ef13
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 8 additions and 4 deletions

View file

@ -28,7 +28,7 @@ func (v *View) Set(param string, value interface{}) *View {
// Render executes the template with arguments.
func (v *View) Render(template string) []byte {
return v.tpl.Render(template+".html", request.UserLanguage(v.r), v.params)
return v.tpl.Render(template+".html", v.params)
}
// New returns a new view with default parameters.
@ -40,6 +40,7 @@ func New(tpl *template.Engine, r *http.Request, sess *session.Session) *View {
b.params["flashMessage"] = sess.FlashMessage(request.FlashMessage(r))
b.params["flashErrorMessage"] = sess.FlashErrorMessage(request.FlashErrorMessage(r))
b.params["theme"] = theme
b.params["language"] = request.UserLanguage(r)
b.params["theme_checksum"] = static.StylesheetBundleChecksums[theme]
b.params["app_js_checksum"] = static.JavascriptBundleChecksums["app"]
b.params["sw_js_checksum"] = static.JavascriptBundleChecksums["service-worker"]