1
0
mirror of https://github.com/whippyshou/mastodon synced 2024-11-27 14:28:55 +09:00
whippy-edition/app/helpers/branding_helper.rb
2023-11-06 03:31:50 +09:00

36 lines
1.0 KiB
Ruby

# frozen_string_literal: true
module BrandingHelper
def logo_as_symbol(version = :icon)
case version
when :icon
_logo_as_symbol_icon
when :wordmark
_logo_as_symbol_wordmark
end
end
def _logo_as_symbol_wordmark
content_tag(:img, nil, src:full_pack_url('media/images/logos/wordmark_dark.png'), alt: 'Whippy Edition', class: 'logo logo--wordmark')
end
def _logo_as_symbol_icon
content_tag(:img, nil, src:full_pack_url('media/images/logos/logo_dark.png'), alt: 'Whippy Edition', class: 'logo logo--icon')
end
def render_logo
content_tag(:img, nil, src:full_pack_url('media/images/logos/logo_dark.png'), alt: 'Whippy Edition', 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