]> cat aescling's git repositories - mastodon.git/commitdiff
Red favicon for dev (#2470)
authorLindsey Bieda <LindseyB@users.noreply.github.com>
Wed, 26 Apr 2017 13:45:27 +0000 (09:45 -0400)
committerEugen Rochko <eugen@zeonfederated.com>
Wed, 26 Apr 2017 13:45:27 +0000 (15:45 +0200)
* Set a dev specific favicon

* Consistent spacing

* Add trailing slash for consistency

* Update to remove interpolation

app/helpers/application_helper.rb
app/views/layouts/application.html.haml
public/favicon-dev.ico [new file with mode: 0644]

index ba6803b4b84722aedcf53e5dafa4d2c6c6e04d8f..d25b12998ab2b2033a732a5f8635fdf6362d775d 100644 (file)
@@ -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
index 8e94393100045d4488fbebf327ccab9f2bbb810c..01c42db93572c6bfa58bd0209c9b97edbf69f92e 100755 (executable)
@@ -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 (file)
index 0000000..5f725d5
Binary files /dev/null and b/public/favicon-dev.ico differ