class Dato::Utils::FaviconTagsBuilder
Constants
- APPLE_TOUCH_ICON_SIZES
- ICON_SIZES
- WINDOWS_SIZES
Attributes
site[R]
theme_color[R]
Public Class Methods
new(site, theme_color)
click to toggle source
# File lib/dato/utils/favicon_tags_builder.rb, line 12 def initialize(site, theme_color) @site = site @theme_color = theme_color end
Public Instance Methods
build_app_name_tag()
click to toggle source
# File lib/dato/utils/favicon_tags_builder.rb, line 60 def build_app_name_tag meta_tag("application-name", site.name) end
link_tag(rel, href, attrs = {})
click to toggle source
# File lib/dato/utils/favicon_tags_builder.rb, line 81 def link_tag(rel, href, attrs = {}) { tag_name: "link", attributes: attrs.merge(rel: rel, href: href) } end
meta_tag(name, value)
click to toggle source
# File lib/dato/utils/favicon_tags_builder.rb, line 77 def meta_tag(name, value) { tag_name: "meta", attributes: { name: name, content: value } } end
url(width, height = width)
click to toggle source
# File lib/dato/utils/favicon_tags_builder.rb, line 73 def url(width, height = width) site.favicon.url(w: width, h: height) end