Sha256: 905afb1b9be7f9f45027d0cc7f20b48b75250f3a609e26dc7c5b2de789aa92db

Contents?: true

Size: 809 Bytes

Versions: 4

Compression:

Stored size: 809 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 'Inesita'
          end
          ul class: 'nav navbar-nav' do
            li class: "#{"active" if url == '/'}" do
              a href: '/' do
                text 'Home'
              end
            end
            li class: "#{"active" if url == '/welcome'}" do
              a href: '/welcome' do
                text 'Welcome'
              end
            end
            li class: "#{"active" if url == '/goodbye'}" do
              a href: '/goodbye' do
                text 'Goodbye'
              end
            end
          end
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
inesita-0.0.12 lib/inesita/cli/template/app/components/navbar.rb
inesita-0.0.11 lib/inesita/cli/template/app/components/navbar.rb
inesita-0.0.10 lib/inesita/cli/template/app/components/navbar.rb
inesita-0.0.9 lib/inesita/cli/template/app/components/navbar.rb