Sha256: 4e0588e1379ef09bc10694319b51f068a87c76de8a58ddd7e8470f3a6f0059be

Contents?: true

Size: 533 Bytes

Versions: 43

Compression:

Stored size: 533 Bytes

Contents

module Releaf::Builders::Page
  class HeaderBuilder
    include Releaf::Builders::Base
    include Releaf::Builders::Template

    def output
      safe_join do
        items
      end
    end

    def items
      [home_link]
    end

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

    def home_url
      url_for(:releaf_root)
    end

    def home_text
      "Releaf"
    end

    def home_image_path
      "releaf/logo.png"
    end
  end
end

Version data entries

43 entries across 43 versions & 1 rubygems

Version Path
releaf-core-3.1.0 app/builders/releaf/builders/page/header_builder.rb
releaf-core-3.0.3 app/builders/releaf/builders/page/header_builder.rb
releaf-core-3.0.2 app/builders/releaf/builders/page/header_builder.rb
releaf-core-3.0.1 app/builders/releaf/builders/page/header_builder.rb
releaf-core-3.0.0 app/builders/releaf/builders/page/header_builder.rb
releaf-core-2.2.1 app/builders/releaf/builders/page/header_builder.rb
releaf-core-2.2.0 app/builders/releaf/builders/page/header_builder.rb
releaf-core-2.1.2 app/builders/releaf/builders/page/header_builder.rb
releaf-core-2.1.1 app/builders/releaf/builders/page/header_builder.rb
releaf-core-2.1.0 app/builders/releaf/builders/page/header_builder.rb
releaf-core-2.0.1 app/builders/releaf/builders/page/header_builder.rb
releaf-core-2.0.0 app/builders/releaf/builders/page/header_builder.rb
releaf-core-1.1.22 app/builders/releaf/builders/page/header_builder.rb
releaf-core-1.1.21 app/builders/releaf/builders/page/header_builder.rb
releaf-core-1.1.20 app/builders/releaf/builders/page/header_builder.rb
releaf-core-1.1.19 app/builders/releaf/builders/page/header_builder.rb
releaf-core-1.1.18 app/builders/releaf/builders/page/header_builder.rb
releaf-core-1.1.17 app/builders/releaf/builders/page/header_builder.rb
releaf-core-1.1.16 app/builders/releaf/builders/page/header_builder.rb
releaf-core-1.1.15 app/builders/releaf/builders/page/header_builder.rb