summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatt Jankowski <matt@jankowski.online>2024-03-19 10:17:18 -0400
committerGitHub <noreply@github.com>2024-03-19 14:17:18 +0000
commitd7ab5655efde24fd73f9ad4cd6c763852a7004f8 (patch)
treee2df7d5a67d3a1045aef381b4238b5588efdaf0c
parentbc6f9befde4e08426127730acebdc13064e1eeb6 (diff)
Replace `render_symbol` method with `inline_svg_tag` usage (#29647)
-rw-r--r--app/helpers/branding_helper.rb11
-rwxr-xr-xapp/views/layouts/application.html.haml4
-rw-r--r--app/views/layouts/embedded.html.haml2
3 files changed, 3 insertions, 14 deletions
diff --git a/app/helpers/branding_helper.rb b/app/helpers/branding_helper.rb
index 2b9c233c23b..f72d6df5d9f 100644
--- a/app/helpers/branding_helper.rb
+++ b/app/helpers/branding_helper.rb
@@ -21,15 +21,4 @@ module BrandingHelper
def render_logo
image_pack_tag('logo.svg', alt: 'Mastodon', class: 'logo logo--icon')
end
-
- def render_symbol(version = :icon)
- path = case version
- when :icon
- 'logo-symbol-icon.svg'
- when :wordmark
- 'logo-symbol-wordmark.svg'
- end
-
- render(file: Rails.root.join('app', 'javascript', 'images', path)).html_safe # rubocop:disable Rails/OutputSafety
- end
end
diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml
index c7210736703..449657f8cab 100755
--- a/app/views/layouts/application.html.haml
+++ b/app/views/layouts/application.html.haml
@@ -44,5 +44,5 @@
= content_for?(:content) ? yield(:content) : yield
.logo-resources{ 'tabindex' => '-1', 'inert' => true, 'aria-hidden' => true }
- = render_symbol :icon
- = render_symbol :wordmark
+ = inline_svg_tag 'logo-symbol-icon.svg'
+ = inline_svg_tag 'logo-symbol-wordmark.svg'
diff --git a/app/views/layouts/embedded.html.haml b/app/views/layouts/embedded.html.haml
index d8aa522d800..54d4ba71576 100644
--- a/app/views/layouts/embedded.html.haml
+++ b/app/views/layouts/embedded.html.haml
@@ -21,4 +21,4 @@
= yield
.logo-resources{ 'tabindex' => '-1', 'inert' => true, 'aria-hidden' => true }
- = render_symbol :icon
+ = inline_svg_tag 'logo-symbol-icon.svg'