mirror of
https://github.com/discourse/discourse.git
synced 2024-12-16 17:03:48 +08:00
FEATURE: adds header text/background color to site (#6462)
This commit is contained in:
parent
5e054e00da
commit
38ad1b96cb
|
@ -42,7 +42,9 @@ class SiteController < ApplicationController
|
||||||
apple_touch_icon_url: UrlHelper.absolute(SiteSetting.apple_touch_icon_url),
|
apple_touch_icon_url: UrlHelper.absolute(SiteSetting.apple_touch_icon_url),
|
||||||
favicon_url: UrlHelper.absolute(SiteSetting.favicon_url),
|
favicon_url: UrlHelper.absolute(SiteSetting.favicon_url),
|
||||||
title: SiteSetting.title,
|
title: SiteSetting.title,
|
||||||
description: SiteSetting.site_description
|
description: SiteSetting.site_description,
|
||||||
|
header_primary_color: ColorScheme.hex_for_name('header_primary') || '333333',
|
||||||
|
header_background_color: ColorScheme.hex_for_name('header_background') || 'ffffff'
|
||||||
}
|
}
|
||||||
results[:mobile_logo_url] = SiteSetting.mobile_logo_url.presence
|
results[:mobile_logo_url] = SiteSetting.mobile_logo_url.presence
|
||||||
|
|
||||||
|
|
|
@ -21,6 +21,8 @@ describe SiteController do
|
||||||
expect(json["apple_touch_icon_url"]).to eq("https://boom.com/apple/logo.png")
|
expect(json["apple_touch_icon_url"]).to eq("https://boom.com/apple/logo.png")
|
||||||
expect(json["logo_small_url"]).to eq("http://boom.com/uploads/logo_small.png")
|
expect(json["logo_small_url"]).to eq("http://boom.com/uploads/logo_small.png")
|
||||||
expect(json["mobile_logo_url"]).to eq("https://a.a/a.png")
|
expect(json["mobile_logo_url"]).to eq("https://a.a/a.png")
|
||||||
|
expect(json["header_primary_color"]).to eq("333333")
|
||||||
|
expect(json["header_background_color"]).to eq("ffffff")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user