recipe-site/_includes/method.html

16 lines
603 B
HTML

{%- if page.method | size != 0 %}
{%- assign tag = "h2" -%}
{%- if page.collection == "subrecipes" -%}
{%- assign tag = "h4" -%}
{%- endif -%}
<{{tag}}>Method</{{tag}}>
{%- assign prefix = page.id | downcase | split: "/" | last | url_encode | prepend: "cb-" -%}
<ol class='method' data-cb-prefix='{{ prefix }}'>
{% assign i = 1 -%}
{%- for item in page.method -%}
<li><label for='{{ prefix }}-{{ i }}'>{{ item }}</label><input id='{{ prefix }}-{{ i }}' class='method-checkbox' data-number='{{ i }}' type='checkbox'></li>
{% assign i = i | plus: 1 -%}
{%- endfor %}
</ol>
{%- endif -%}