DEV: Add theme-color meta to bootstrap (#13615)
It's rendered in Rails in:
ebcc70a5ba/app/views/layouts/_head.html.erb (L9-L9)
This commit is contained in:
parent
926889e2d4
commit
fdb85b8025
|
@ -34,12 +34,17 @@ function head(buffer, bootstrap) {
|
|||
buffer.push(`<meta name="csrf-param" content="authenticity_token">`);
|
||||
buffer.push(`<meta name="csrf-token" content="${bootstrap.csrf_token}">`);
|
||||
}
|
||||
|
||||
if (bootstrap.theme_id) {
|
||||
buffer.push(
|
||||
`<meta name="discourse_theme_id" content="${bootstrap.theme_id}">`
|
||||
);
|
||||
}
|
||||
|
||||
if (bootstrap.theme_color) {
|
||||
buffer.push(`<meta name="theme-color" content="${bootstrap.theme_color}">`);
|
||||
}
|
||||
|
||||
let setupData = "";
|
||||
Object.keys(bootstrap.setup_data).forEach((sd) => {
|
||||
let val = bootstrap.setup_data[sd];
|
||||
|
|
|
@ -54,6 +54,7 @@ class BootstrapController < ApplicationController
|
|||
|
||||
bootstrap = {
|
||||
theme_id: theme_id,
|
||||
theme_color: "##{ColorScheme.hex_for_name('header_background', scheme_id)}",
|
||||
title: SiteSetting.title,
|
||||
current_homepage: current_homepage,
|
||||
locale_script: locale,
|
||||
|
|
Loading…
Reference in New Issue