1.6.0 • Published 5 years ago

c-breadcrumbs v1.6.0

Weekly downloads
3
License
MIT
Repository
github
Last release
5 years ago

Using npm:

$ npm i fgn-breadcrumbs

In Pug Template:

- let Data = [{ 
  name: "Como Solicitar", 
  href: "#" 
}, { 
  name: "Cartão de crédito", 
  href: "#" 
}, { 
  name: "Nubank", 
  href: "#" 
}]

+breadcrumb(Data)

Mixin Doc:

- let BreadcrumbList = 'http://schema.org/BreadcrumbList'
- let ListItem = 'http://schema.org/ListItem'

/** return breadcrumb component
 ** @param {object} props - object w/ {name: "", href: ""}
 **/
mixin breadcrumb(props)
  ol.c-breadcrumb.o-list(itemscope itemtype=BreadcrumbList)
    each prop, index in props
      - let position = index

      li.c-breadcrumb__item(itemprop="itemListElement" itemscope itemtype=ListItem)
        a.c-breadcrumb__anchor(itemprop="item" href=prop.href)
          span(itemprop="name")=prop.name
          meta(itemprop="position" content=(++position))
1.6.0

5 years ago

1.5.9

5 years ago

1.5.8

5 years ago

1.5.7

5 years ago

1.5.6

5 years ago

2.0.0

5 years ago

1.0.0

5 years ago