variables.html 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  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 elements/anchor.html name=anchor_name %}
  24. <div class="content">
  25. <p>{{ content | strip }}</p>
  26. </div>
  27. <div class="table-container">
  28. <table class="table {{ table_class }}">
  29. <thead>
  30. <tr>
  31. <th>Name</th>
  32. <th>Default value</th>
  33. </tr>
  34. </thead>
  35. <tfoot>
  36. <tr>
  37. <th>Name</th>
  38. <th>Default value</th>
  39. </tr>
  40. </tfoot>
  41. <tbody>
  42. {% for variable_hash in variables %}
  43. {% assign variable = variable_hash[1] %}
  44. <tr>
  45. <td >
  46. <code style="white-space: nowrap;">{{ variable.name }}</code>
  47. </td>
  48. <td>
  49. <code>{{ variable.value }}</code>
  50. </td>
  51. </tr>
  52. {% endfor %}
  53. </tbody>
  54. </table>
  55. </div>