Sha256: 9ca8125d5203ee47834b42dca8a2f5c4155cdad02799feffc27487bfa04de450

Contents?: true

Size: 741 Bytes

Versions: 15

Compression:

Stored size: 741 Bytes

Contents

class NavBar
  include Inesita::Component

  def render
    nav class: 'navbar navbar-default' do
      div class: 'container' do
        div class: 'navbar-header' do
          span class: 'navbar-brand' do
            text '<%= config[:project_name] %>'
          end
          ul class: 'nav navbar-nav' do
            li class: "#{"active" if router.current_url?(:home)}" do
              a href: router.url_for(:home) do
                text 'Home'
              end
            end
            li class: "#{"active" if router.current_url?(:description)}" do
              a href: router.url_for(:description) do
                text 'Description'
              end
            end
          end
        end
      end
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
inesita-0.6.1 lib/inesita/cli/template/app/components/navbar.rb.tt
inesita-0.6.0 lib/inesita/cli/template/app/components/navbar.rb.tt
inesita-0.6.0.beta.1 lib/inesita/cli/template/app/components/navbar.rb.tt
inesita-0.5.1 lib/inesita/cli/template/app/components/navbar.rb.tt
inesita-0.5.0 lib/inesita/cli/template/app/components/navbar.rb.tt
inesita-0.4.4 lib/inesita/cli/template/app/components/navbar.rb.tt
inesita-0.4.1 lib/inesita/cli/template/app/components/navbar.rb.tt
inesita-0.4.0 lib/inesita/cli/template/app/components/navbar.rb.tt
inesita-0.3.5 lib/inesita/cli/template/app/components/navbar.rb.tt
inesita-0.3.2 lib/inesita/cli/template/app/components/navbar.rb.tt
inesita-0.3.1 lib/inesita/cli/template/app/components/navbar.rb.tt
inesita-0.3.0 lib/inesita/cli/template/app/components/navbar.rb.tt
inesita-0.2.3 lib/inesita/cli/template/app/components/navbar.rb.tt
inesita-0.2.2 lib/inesita/cli/template/app/components/navbar.rb.tt
inesita-0.2.1 lib/inesita/cli/template/app/components/navbar.rb.tt