branding_helper.rb 633 B

123456789101112131415161718192021222324
  1. # frozen_string_literal: true
  2. module BrandingHelper
  3. def logo_as_symbol(version = :icon)
  4. case version
  5. when :icon
  6. _logo_as_symbol_icon
  7. when :wordmark
  8. _logo_as_symbol_wordmark
  9. end
  10. end
  11. def _logo_as_symbol_wordmark
  12. content_tag(:svg, tag.use(href: '#logo-symbol-wordmark'), viewBox: '0 0 261 66', class: 'logo logo--wordmark')
  13. end
  14. def _logo_as_symbol_icon
  15. content_tag(:svg, tag.use(href: '#logo-symbol-icon'), viewBox: '0 0 79 79', class: 'logo logo--icon')
  16. end
  17. def render_logo
  18. image_tag(frontend_asset_path('images/logo.svg'), alt: 'Mastodon', class: 'logo logo--icon')
  19. end
  20. end