| Cameras | {{ device.cameras | size }} |
|---|---|
{%- endfor %} {%- endif %} |
|
| Dimensions | {%- if device.dimensions.first.size == 1 %}
{%- comment %}The size of "first" will be 1 when there is a list of models{% endcomment -%}
{%- for model in device.dimensions %}
{%- assign modelname = model.first[0] %}
{%- assign dimension_data = model.first[1] %}
{%- include snippets/dimensions.html %}
{%- unless forloop.last -%}
{%- endunless -%} {% endfor -%} {%- else %} {%- assign dimension_data = device.dimensions %} {%- include snippets/dimensions.html %} {%- endif %} |
| Battery |
{%- if device.battery.first.size == 1 -%}
{%- comment %}The size of "first" will be 1 when there is a list of models{% endcomment -%}
{% for model in device.battery -%}
{%- assign modelname = model.first[0] %}
{%- assign battery_data = model.first[1] %}
{% include snippets/battery.html %}
{%- unless forloop.last -%}
{%- endunless %} {% endfor -%} {%- else %} {%- assign battery_data = device.battery %} {% include snippets/battery.html %} {%- endif -%} |
| Peripherals | {{ device.peripherals | size }} |
|
{%- assign unique_peripherals = "" | split: " " %}
{%- for peripheral in device.peripherals %}
{%- for other_device in devices %}
{%- unless other_device.peripherals contains peripheral %}
{%- assign unique_peripherals = unique_peripherals | push: peripheral %}
{%- break %}
{%- endunless %}
{%- endfor %}
{%- endfor %}
{%- assign peripheral_list = unique_peripherals | join: ", " %}
{{ peripheral_list }} |
|