Re-add data-user-flavour attribute (#3356)

* Re-add `data-user-flavour` attribute

* Add data-user-flavour to embed/error pages

* Use actual flavor for embeds/error pages
This commit is contained in:
Essem 2026-01-19 13:07:47 -06:00 committed by GitHub
parent 5efebe716e
commit 564b8720e1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 3 additions and 2 deletions

View File

@ -165,6 +165,7 @@ module ApplicationHelper
class: html_classes,
'data-contrast': contrast.parameterize,
'data-color-scheme': page_color_scheme.parameterize,
'data-user-flavour': current_flavour.parameterize,
}
base[:'data-system-theme'] = 'true' if page_color_scheme == 'auto'

View File

@ -1,5 +1,5 @@
!!! 5
%html{ lang: I18n.locale, 'data-contrast': 'auto', 'data-color-scheme': 'light' }
%html{ lang: I18n.locale, 'data-contrast': 'auto', 'data-color-scheme': 'light', 'data-user-flavour': current_flavour.parameterize }
%head
%meta{ charset: 'utf-8' }/
%meta{ name: 'robots', content: 'noindex' }/

View File

@ -1,5 +1,5 @@
!!!
%html{ lang: I18n.locale, 'data-contrast': 'auto', 'data-color-scheme': 'auto' }
%html{ lang: I18n.locale, 'data-contrast': 'auto', 'data-color-scheme': 'auto', 'data-user-flavour': current_flavour.parameterize }
%head
%meta{ 'content' => 'text/html; charset=UTF-8', 'http-equiv' => 'Content-Type' }/
%meta{ charset: 'utf-8' }/