Sha256: fbb5839db6135d99373c270a233e7697f95129fd15a5ea1e14ff58bf7e83f339

Contents?: true

Size: 1.06 KB

Versions: 21

Compression:

Stored size: 1.06 KB

Contents

- if (checklist = (option? :checklist) ? 'checklist' : nil)
  - if option? :interactive
    - marker_checked = '<input type="checkbox" data-item-complete="1" checked>'
    - marker_unchecked = '<input type="checkbox" data-item-complete="0">'
  - else
    - if @document.attr? :icons, 'font'
      - marker_checked = '<i class="icon-check"></i>'
      - marker_unchecked = '<i class="icon-check-empty"></i>'
    - else 
      -# could use &#9745 (checked ballot) and &#9744 (ballot) w/o font instead
      - marker_checked = '<input type="checkbox" data-item-complete="1" checked disabled>'
      - marker_unchecked = '<input type="checkbox" data-item-complete="0" disabled>'
%div{:id=>@id, :class=>['ulist', checklist, @style, role]}
  - if title?
    .title=title
  %ul{:class=>(checklist || @style)}
    - items.each do |item|
      %li
        %p
          - if checklist && (item.attr? :checkbox)
            =%(#{(item.attr? :checked) ? marker_checked : marker_unchecked} #{item.text})
          - else
            =item.text
        - if item.blocks?
          =item.content.chomp

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
hyla-1.0.9 lib/resources/backends/haml/html5/block_ulist.html.haml
hyla-1.0.9.pre.3 lib/resources/backends/haml/html5/block_ulist.html.haml
hyla-1.0.9.pre.2 lib/resources/backends/haml/html5/block_ulist.html.haml
hyla-1.0.9.pre.1 lib/resources/backends/haml/html5/block_ulist.html.haml
hyla-1.0.8 lib/resources/backends/haml/html5/block_ulist.html.haml
hyla-1.0.7 lib/resources/backends/haml/html5/block_ulist.html.haml
hyla-1.0.7.pre.9 lib/resources/backends/haml/html5/block_ulist.html.haml
hyla-1.0.7.pre.8 lib/resources/backends/haml/html5/block_ulist.html.haml
hyla-1.0.7.pre.7 lib/resources/backends/haml/html5/block_ulist.html.haml
hyla-1.0.7.pre.6 lib/resources/backends/haml/html5/block_ulist.html.haml
hyla-1.0.7.pre.5 lib/resources/backends/haml/html5/block_ulist.html.haml
hyla-1.0.7.pre.3 lib/resources/backends/haml/html5/block_ulist.html.haml
hyla-1.0.7.pre.2 lib/resources/backends/haml/html5/block_ulist.html.haml
hyla-1.0.7.pre.1 lib/resources/backends/haml/html5/block_ulist.html.haml
hyla-1.0.6 lib/resources/backends/haml/html5/block_ulist.html.haml
hyla-1.0.5 lib/resources/backends/haml/html5/block_ulist.html.haml
hyla-1.0.5.pre.1 lib/resources/backends/haml/html5/block_ulist.html.haml
hyla-1.0.4 lib/resources/backends/haml/html5/block_ulist.html.haml
hyla-1.0.3 lib/resources/backends/haml/html5/block_ulist.html.haml
hyla-1.0.2 lib/resources/backends/haml/html5/block_ulist.html.haml