class Agave::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/agave/utils/favicon_tags_builder.rb, line 11 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/agave/utils/favicon_tags_builder.rb, line 59 def build_app_name_tag meta_tag('application-name', site.name) end
link_tag(rel, href, attrs = {})
click to toggle source
# File lib/agave/utils/favicon_tags_builder.rb, line 80 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/agave/utils/favicon_tags_builder.rb, line 76 def meta_tag(name, value) { tag_name: 'meta', attributes: { name: name, content: value } } end
url(width, height = width)
click to toggle source
# File lib/agave/utils/favicon_tags_builder.rb, line 72 def url(width, height = width) site.favicon.url(w: width, h: height) end