App Banner Support for Android Chrome (#4103)

* App Banner Support for Android Chrome

* Oops, forgot semicolon;
This commit is contained in:
Rafael dos Santos Silva
2016-04-20 11:54:01 -03:00
committed by Robin Ward
parent 7996ae50d8
commit bbe642070e
3 changed files with 29 additions and 1 deletions

View File

@@ -4,12 +4,20 @@ class MetadataController < ApplicationController
def manifest
manifest = {
name: SiteSetting.title,
short_name: SiteSetting.title,
display: 'standalone',
orientation: 'portrait',
start_url: "#{Discourse.base_uri}/",
background_color: "##{ColorScheme.hex_for_name('secondary')}",
theme_color: "##{ColorScheme.hex_for_name('header_background')}"
theme_color: "##{ColorScheme.hex_for_name('header_background')}",
icons: [
{
src: SiteSetting.apple_touch_icon_url,
sizes: "144x144",
type: "image/png"
}
]
}
render json: manifest.to_json