Breadcrumb trails.
This commit is contained in:
parent
3b88df6bbe
commit
5491a7702b
@ -1,5 +1,7 @@
|
||||
%h1= item[:title]
|
||||
|
||||
= render "partials/breadcrumbs"
|
||||
|
||||
%p
|
||||
The blueprint module is a simple way of importing all of the most
|
||||
commonly used blueprint modules. In addition, it provides
|
||||
|
@ -1,5 +1,6 @@
|
||||
---
|
||||
title: Blueprint Module
|
||||
crumb: Blueprint
|
||||
framework: blueprint
|
||||
stylesheet: _blueprint.sass
|
||||
classnames:
|
||||
|
@ -1,5 +1,7 @@
|
||||
%h1= item[:title]
|
||||
|
||||
= render "partials/breadcrumbs"
|
||||
|
||||
%p
|
||||
The blueprint colors module defines the default colors that are used by the blueprint
|
||||
framework.
|
||||
|
@ -1,5 +1,6 @@
|
||||
---
|
||||
title: Blueprint Color Module
|
||||
crumb: Colors
|
||||
framework: blueprint
|
||||
stylesheet: blueprint/_colors.sass
|
||||
classnames:
|
||||
|
@ -78,4 +78,10 @@ table.constants
|
||||
td, th
|
||||
padding: 0.25em 0.5em
|
||||
|
||||
|
||||
ol#breadcrumbs
|
||||
+horizontal-list
|
||||
+no-bullets
|
||||
li:after
|
||||
content: " > "
|
||||
li.last:after
|
||||
content: ""
|
6
doc-src/layouts/partials/breadcrumbs.haml
Normal file
6
doc-src/layouts/partials/breadcrumbs.haml
Normal file
@ -0,0 +1,6 @@
|
||||
%ol#breadcrumbs
|
||||
- breadcrumbs_trail.each_with_index do |bc, index|
|
||||
- klass = "first" if index == 0
|
||||
- klass = "last" if index == breadcrumbs_trail.size - 1
|
||||
%li{:class => klass}= link_to_unless_current((bc[:crumb] || bc[:title]), bc.reps.find { |r| r.name == :default })
|
||||
|
1
doc-src/layouts/partials/breadcrumbs.yaml
Normal file
1
doc-src/layouts/partials/breadcrumbs.yaml
Normal file
@ -0,0 +1 @@
|
||||
--- {}
|
@ -4,6 +4,7 @@
|
||||
include Nanoc3::Helpers::LinkTo
|
||||
include Nanoc3::Helpers::Capturing
|
||||
include Nanoc3::Helpers::Rendering
|
||||
include Nanoc3::Helpers::Breadcrumbs
|
||||
|
||||
def body_class(item)
|
||||
(item[:classnames] || []).join(" ")
|
||||
|
Loading…
Reference in New Issue
Block a user