BigW Consortium Gitlab

appearances_helper.rb 557 Bytes
Newer Older
1
module AppearancesHelper
2
  def brand_title
3 4 5 6 7
    if brand_item && brand_item.title
      brand_item.title
    else
      'GitLab Community Edition'
    end
8 9 10
  end

  def brand_image
11 12 13 14 15
    if brand_item.logo?
      image_tag brand_item.logo
    else
      nil
    end
16 17 18
  end

  def brand_text
19 20 21 22 23
    markdown(brand_item.description)
  end

  def brand_item
    @appearance ||= Appearance.first
24
  end
25 26

  def brand_header_logo
27 28 29 30 31
    if brand_item && brand_item.header_logo?
      image_tag brand_item.header_logo
    else
      render 'shared/logo.svg'
    end
32
  end
33
end