闭社主体 forked from https://github.com/tootsuite/mastodon
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
558 B

8 years ago
8 years ago
  1. # frozen_string_literal: true
  2. module ApplicationHelper
  3. def active_nav_class(path)
  4. current_page?(path) ? 'active' : ''
  5. end
  6. def show_landing_strip?
  7. !user_signed_in? && !single_user_mode?
  8. end
  9. def add_rtl_body_class(other_classes)
  10. other_classes = "#{other_classes} rtl" if [:ar, :fa].include?(I18n.locale)
  11. other_classes
  12. end
  13. def favicon_path
  14. env_suffix = Rails.env.production? ? '' : '-dev'
  15. asset_path "favicon#{env_suffix}.ico"
  16. end
  17. def title
  18. Rails.env.production? ? site_title : "#{site_title} (Dev)"
  19. end
  20. end