FEATURE: adds header text/background color to site (#6462)

This commit is contained in:
Joffrey JAFFEUX 2018-10-08 11:52:57 +02:00
parent 5e054e00da
commit 38ad1b96cb
2 changed files with 5 additions and 1 deletions

View File

@ -42,7 +42,9 @@ class SiteController < ApplicationController
apple_touch_icon_url: UrlHelper.absolute(SiteSetting.apple_touch_icon_url),
favicon_url: UrlHelper.absolute(SiteSetting.favicon_url),
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

View File

@ -21,6 +21,8 @@ describe SiteController do
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["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