Sha256: 41d0ca2800b69d1924bb37b4ba22970db0926c10cae83c4c46757ba3020f06e2
Contents?: true
Size: 1.64 KB
Versions: 5
Compression:
Stored size: 1.64 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 ☑ (checked ballot) and ☐ (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>' - if "#{@id}".start_with?("expandlist") .ulist class=[checklist,@style,role] - if title? .title=title // the id has been moved as the jquery script will search about it to collapse/elapse the list ul id=@id class=(checklist || @style) - items.each do |item| li // We have also removed the <p> tag element - if checklist && (item.attr? :checkbox) =%(#{(item.attr? :checked) ? marker_checked : marker_unchecked}#{item.text}) - else =item.text - if item.blocks? =item.content - else .ulist id=@id class=[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
Version data entries
5 entries across 5 versions & 1 rubygems