Module: Trestle::TitleHelper

Defined in:
app/helpers/trestle/title_helper.rb

Instance Method Summary collapse

Instance Method Details

#trestle_titleObject



3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# File 'app/helpers/trestle/title_helper.rb', line 3

def trestle_title
  if Trestle.config.
    if Trestle.config.site_logo_small
      safe_join([
        image_tag(Trestle.config., class: "visible-xs-inline visible-lg-inline", alt: Trestle.config.site_title),
        image_tag(Trestle.config.site_logo_small, class: "visible-sm-inline visible-md-inline", alt: Trestle.config.site_title)
      ], "\n")
    else
      image_tag(Trestle.config.)
    end
  elsif Trestle.config.site_logo_small
    safe_join([
      image_tag(Trestle.config.site_logo_small, alt: ""),
      (:span, Trestle.config.site_title, class: "visible-xs-inline visible-lg-inline")
    ], "\n")
  else
    safe_join([
      (:span, Trestle.config.site_title, class: "visible-xs-inline visible-lg-inline"),
      (:span, Trestle.config.site_title.split(/ /).map(&:first).first(3).join, class: "visible-sm-inline visible-md-inline")
    ], "\n")
  end
end