variables.html 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. {% capture content %}
  2. {% assign anchor_name = include.anchor_name | default: 'Variables' %}
  3. {% assign tab = include.tab | default: page.doc-tab %}
  4. {% assign subtab = include.subtab | default: page.doc-subtab %}
  5. {% assign type = include.type | default: tab %}
  6. {% assign data = include.data | default: site.data.variables[tab][subtab] %}
  7. {% assign variables = include.variables | default: data.vars %}
  8. {% assign table_class = include.table_class | default: 'is-bordered' %}
  9. {% if include.custom_message %}
  10. {{ include.custom_message }}
  11. {% else %}
  12. {% assign variables_link_text = "these variables" %}
  13. {% capture variables_link %}
  14. {% if data.file_url %}
  15. <a href="{{ data.file_url }}" target="_blank">{{ variables_link_text }}</a>
  16. {% else %}
  17. {{ variables_link_text }}
  18. {% endif %}
  19. {% endcapture %}
  20. You can use {{ variables_link | strip }} to <strong>customize</strong> this {{ type }}. Simply set one or multiple of these variables <em>before</em> importing Bulma. <a href="{{ site.url }}/documentation/overview/customize/">Learn how</a>.
  21. {% endif %}
  22. {% endcapture %}
  23. {% include anchor.html name=anchor_name %}
  24. <div class="content">
  25. <p>{{ content | strip }}</p>
  26. </div>
  27. <table class="table {{ table_class }}">
  28. <thead>
  29. <tr>
  30. <th>Name</th>
  31. <th>Default value</th>
  32. </tr>
  33. </thead>
  34. <tfoot>
  35. <tr>
  36. <th>Name</th>
  37. <th>Default value</th>
  38. </tr>
  39. </tfoot>
  40. <tbody>
  41. {% for variable_hash in variables %}
  42. {% assign variable = variable_hash[1] %}
  43. <tr>
  44. <td>
  45. <code>{{ variable.name }}</code>
  46. </td>
  47. <td>
  48. <code>{{ variable.value }}</code>
  49. </td>
  50. </tr>
  51. {% endfor %}
  52. </tbody>
  53. </table>