Sha256: 4e39401e3c89848c708af0e5011f7260c30c42c04f1b0bece296728fe7cb7b35

Contents?: true

Size: 917 Bytes

Versions: 11

Compression:

Stored size: 917 Bytes

Contents

class NavBar
  include Inesita::Component

  def render
    nav.navbar.navbar_expand_lg.navbar_light.bg_light do
      span.navbar_brand do
        text '<%= config[:project_name] %>'
      end
      div.collapse.navbar_collapse do
        ul.nav.navbar_nav.mr_auto do
          li.nav_item class: class_names(active: router.current_url?(:home)) do
            a.nav_link href: router.url_for(:home) do
              text 'Home'
            end
          end
          li.nav_item class: class_names(active: router.current_url?(:description)) do
            a.nav_link href: router.url_for(:description) do
              text 'Description'
            end
          end
          li.nav_item class: class_names(active: router.current_url?(:counter)) do
            a.nav_link href: router.url_for(:counter) do
              text 'Example Counter'
            end
          end
        end
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
inesita-1.0.pre.9 lib/inesita/cli/template/app/components/navbar.rb.tt
inesita-1.0.pre.8 lib/inesita/cli/template/app/components/navbar.rb.tt
inesita-1.0.pre.7 lib/inesita/cli/template/app/components/navbar.rb.tt
inesita-1.0.pre.6 lib/inesita/cli/template/app/components/navbar.rb.tt
inesita-1.0.pre.5 lib/inesita/cli/template/app/components/navbar.rb.tt
inesita-1.0.pre.4 lib/inesita/cli/template/app/components/navbar.rb.tt
inesita-1.0.pre.3 lib/inesita/cli/template/app/components/navbar.rb.tt
inesita-1.0.pre.2 lib/inesita/cli/template/app/components/navbar.rb.tt
inesita-1.0.pre.1 lib/inesita/cli/template/app/components/navbar.rb.tt
inesita-0.9.2 lib/inesita/cli/template/app/components/navbar.rb.tt
inesita-0.9.1 lib/inesita/cli/template/app/components/navbar.rb.tt