mirror of
https://git.kescher.at/CatCatNya/catstodon.git
synced 2024-11-22 18:48:06 +01:00
Replace render_symbol
method with inline_svg_tag
usage (#29647)
This commit is contained in:
parent
bc6f9befde
commit
d7ab5655ef
3 changed files with 3 additions and 14 deletions
|
@ -21,15 +21,4 @@ module BrandingHelper
|
||||||
def render_logo
|
def render_logo
|
||||||
image_pack_tag('logo.svg', alt: 'Mastodon', class: 'logo logo--icon')
|
image_pack_tag('logo.svg', alt: 'Mastodon', class: 'logo logo--icon')
|
||||||
end
|
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
|
end
|
||||||
|
|
|
@ -44,5 +44,5 @@
|
||||||
= content_for?(:content) ? yield(:content) : yield
|
= content_for?(:content) ? yield(:content) : yield
|
||||||
|
|
||||||
.logo-resources{ 'tabindex' => '-1', 'inert' => true, 'aria-hidden' => true }
|
.logo-resources{ 'tabindex' => '-1', 'inert' => true, 'aria-hidden' => true }
|
||||||
= render_symbol :icon
|
= inline_svg_tag 'logo-symbol-icon.svg'
|
||||||
= render_symbol :wordmark
|
= inline_svg_tag 'logo-symbol-wordmark.svg'
|
||||||
|
|
|
@ -21,4 +21,4 @@
|
||||||
= yield
|
= yield
|
||||||
|
|
||||||
.logo-resources{ 'tabindex' => '-1', 'inert' => true, 'aria-hidden' => true }
|
.logo-resources{ 'tabindex' => '-1', 'inert' => true, 'aria-hidden' => true }
|
||||||
= render_symbol :icon
|
= inline_svg_tag 'logo-symbol-icon.svg'
|
||||||
|
|
Loading…
Reference in a new issue