about summary refs log tree commit diff
diff options
context:
space:
mode:
authorLindsey Bieda <LindseyB@users.noreply.github.com>2017-04-26 09:45:27 -0400
committerEugen Rochko <eugen@zeonfederated.com>2017-04-26 15:45:27 +0200
commit25cbb8454c691f84c51a99a5d1b221da61ec5cda (patch)
tree8e62f4cc0dbab095e505883dae43df7a463b93e0
parent416c9675fc20be41ea4bbc915cf14c84170d5fe5 (diff)
Red favicon for dev (#2470)
* Set a dev specific favicon

* Consistent spacing

* Add trailing slash for consistency

* Update to remove interpolation
-rw-r--r--app/helpers/application_helper.rb5
-rwxr-xr-xapp/views/layouts/application.html.haml1
-rw-r--r--public/favicon-dev.icobin0 -> 9854 bytes
3 files changed, 6 insertions, 0 deletions
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index ba6803b4b..d25b12998 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -13,4 +13,9 @@ module ApplicationHelper
     other_classes = "#{other_classes} rtl" if [:ar, :fa].include?(I18n.locale)
     other_classes
   end
+
+  def favicon_path
+    env_suffix = Rails.env.production? ? '' : '-dev'
+    asset_path "favicon#{env_suffix}.ico"
+  end
 end
diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml
index 8e9439310..01c42db93 100755
--- a/app/views/layouts/application.html.haml
+++ b/app/views/layouts/application.html.haml
@@ -5,6 +5,7 @@
     %meta{:name => 'viewport', :content => 'width=device-width, initial-scale=1'}/
     %meta{'http-equiv' => 'X-UA-Compatible', :content => 'IE=edge'}/
 
+    %link{:rel => "icon", :href => favicon_path, :type => "image/x-icon"}/
     %link{:rel => "apple-touch-icon", :sizes => "180x180", :href => "/apple-touch-icon.png"}/
     %link{:rel => "mask-icon", :href => "/mask-icon.svg", :color => "#2B90D9"}/
     %link{:rel => "manifest", :href => "/manifest.json"}/
diff --git a/public/favicon-dev.ico b/public/favicon-dev.ico
new file mode 100644
index 000000000..5f725d587
--- /dev/null
+++ b/public/favicon-dev.ico
Binary files differ