about summary refs log tree commit diff
path: root/app/helpers/application_helper.rb
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2022-06-09 22:25:23 +0200
committerGitHub <noreply@github.com>2022-06-09 22:25:23 +0200
commit45aa5781ce611ea411e34e3b18358a9fe15f67ce (patch)
tree0db5891187dd468f8d7ef9034eb666aea4182527 /app/helpers/application_helper.rb
parenta2871cd74719a7a5a104daaa3dcc0e2670b7c2df (diff)
Change brand color and logotypes (#18592)
- Add rake task for generating Apple/Android icons and favicons from SVG
- Add rake task for generating PNG icons and logos for e-mails from SVG
- Remove obsolete Microsoft icons and configuration
- Remove PWA shortcut icons
Diffstat (limited to 'app/helpers/application_helper.rb')
-rw-r--r--app/helpers/application_helper.rb11
1 files changed, 3 insertions, 8 deletions
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index 705cc2e3f..db33292c1 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -99,11 +99,6 @@ module ApplicationHelper
     end
   end
 
-  def favicon_path
-    env_suffix = Rails.env.production? ? '' : '-dev'
-    "/favicon#{env_suffix}.ico"
-  end
-
   def title
     Rails.env.production? ? site_title : "#{site_title} (Dev)"
   end
@@ -147,8 +142,8 @@ module ApplicationHelper
     end
   end
 
-  def custom_emoji_tag(custom_emoji, animate = true)
-    if animate
+  def custom_emoji_tag(custom_emoji)
+    if prefers_autoplay?
       image_tag(custom_emoji.image.url, class: 'emojione', alt: ":#{custom_emoji.shortcode}:")
     else
       image_tag(custom_emoji.image.url(:static), class: 'emojione custom-emoji', alt: ":#{custom_emoji.shortcode}", 'data-original' => full_asset_url(custom_emoji.image.url), 'data-static' => full_asset_url(custom_emoji.image.url(:static)))
@@ -198,7 +193,7 @@ module ApplicationHelper
 
   def quote_wrap(text, line_width: 80, break_sequence: "\n")
     text = word_wrap(text, line_width: line_width - 2, break_sequence: break_sequence)
-    text.split("\n").map { |line| '> ' + line }.join("\n")
+    text.split("\n").map { |line| "> #{line}" }.join("\n")
   end
 
   def render_initial_state