Class: Components::Favicon

Inherits:
Base
  • Object
show all
Defined in:
lib/backpack/components/favicon.rb

Constant Summary

Constants included from Backpack::Attributes

Backpack::Attributes::HTMLAttribute, Backpack::Attributes::HTMLAttributes, Backpack::Attributes::MandatoryHTMLAttribute

Instance Method Summary collapse

Methods included from Backpack::Classes

#root_classes

Methods included from Backpack::Identifier

#identifier

Instance Method Details

#view_templateObject



6
7
8
9
10
11
12
13
14
15
# File 'lib/backpack/components/favicon.rb', line 6

def view_template
  link(rel: "icon", type: "image/png", href: "/favicon-96x96.png", sizes: "96x96")
  link(rel: "icon", type: "image/svg+xml", href: "/favicon.svg")
  link(rel: "shortcut icon", href: "/favicon.ico")
  link(rel: "apple-touch-icon", href: "/apple-touch-icon.png", sizes: "180x180")
  if @application_name
    meta(name: "apple-mobile-web-app-title", content: @application_name)
  end
  link(rel: "manifest", href: "/site.webmanifest")
end