Class: Components::SkipLinks

Inherits:
Base
  • Object
show all
Defined in:
lib/backpack/components/skip_links.rb

Constant Summary collapse

{
  content: "Aller au contenu",
  navigation: "Aller à la navigation"
}.freeze

Constants included from Backpack::Attributes

Backpack::Attributes::HTMLAttribute, Backpack::Attributes::HTMLAttributes, Backpack::Attributes::MandatoryHTMLAttribute

Instance Method Summary collapse

Methods included from Backpack::Classes

#root_classes

Methods included from Backpack::Identifier

#identifier

Instance Method Details

#view_templateObject



9
10
11
12
13
14
15
16
17
# File 'lib/backpack/components/skip_links.rb', line 9

def view_template
  ul(**root_attributes) do
    LINKS.each do |target, label|
      li do
        a(href: "##{target}") { plain(label) }
      end
    end
  end
end