Class: Releaf::Builders::Page::HeaderBuilder

Inherits:
Object
  • Object
show all
Includes:
Base, Template
Defined in:
app/builders/releaf/builders/page/header_builder.rb

Instance Attribute Summary

Attributes included from Template

#template

Instance Method Summary collapse

Methods included from Template

#initialize

Methods included from Base

#default_translation_scope, #html_escape, #icon, #layout_settings, #locale_options, #resource_title, #safe_join, #t, #tag, #template_variable, #translate_locale, #wrapper

Instance Method Details

#home_image_pathObject


30
31
32
# File 'app/builders/releaf/builders/page/header_builder.rb', line 30

def home_image_path
  "releaf/logo.png"
end

16
17
18
19
20
# File 'app/builders/releaf/builders/page/header_builder.rb', line 16

def home_link
  tag(:a, class: "home", href: home_url) do
    image_tag(home_image_path, alt: home_text)
  end
end

#home_textObject


26
27
28
# File 'app/builders/releaf/builders/page/header_builder.rb', line 26

def home_text
  "Releaf"
end

#home_urlObject


22
23
24
# File 'app/builders/releaf/builders/page/header_builder.rb', line 22

def home_url
  url_for(:releaf_root)
end

#itemsObject


12
13
14
# File 'app/builders/releaf/builders/page/header_builder.rb', line 12

def items
  [home_link]
end

#outputObject


6
7
8
9
10
# File 'app/builders/releaf/builders/page/header_builder.rb', line 6

def output
  safe_join do
    items
  end
end