colors.html 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. ---
  2. title: Colors
  3. page-header: Colors
  4. menu: base.colors
  5. ---
  6. {% assign colors = '' | split: '' %}
  7. {% for color in site.colors %}
  8. {% assign colors = colors | push: color[0] %}
  9. {% endfor %}
  10. {% assign colors = colors | push: 'dark' %}
  11. {% assign colors = colors | push: 'muted' %}
  12. <div class="card">
  13. <div class="card-body">
  14. <div class="table-responsive">
  15. <table class="table text-center">
  16. <tr>
  17. {% for color in colors %}
  18. <td>
  19. <div class="avatar bg-{{ color }} text-{{ color }}-fg" data-demo-color>{{ color | slice: 0, 2 }}
  20. </div>
  21. </td>
  22. {% endfor %}
  23. </tr>
  24. <tr>
  25. {% for color in colors %}
  26. <td>
  27. <div class="avatar bg-{{ color }}-lt" data-demo-color>{{ color | slice: 0, 2 }}</div>
  28. </td>
  29. {% endfor %}
  30. </tr>
  31. <tr>
  32. {% for color in colors %}
  33. <td>
  34. <div class="avatar text-{{ color }} bg-transparent" data-demo-color>{{ color | slice: 0, 2 }}</div>
  35. </td>
  36. {% endfor %}
  37. </tr>
  38. <tr class="bg-light">
  39. {% for color in colors %}
  40. <td>
  41. <div class="avatar text-{{ color }} bg-transparent" data-demo-color>{{ color | slice: 0, 2 }}</div>
  42. </td>
  43. {% endfor %}
  44. </tr>
  45. <tr class="bg-dark text-white">
  46. {% for color in colors %}
  47. <td>
  48. {% if color == 'dark' %}{% assign c = 'white' %}{% else %}{% assign c = color %}{% endif %}
  49. <div class="avatar text-{{ c }} bg-transparent" data-demo-color>{{ c | slice: 0, 2 }}</div>
  50. </td>
  51. {% endfor %}
  52. </tr>
  53. <tr class="bg-dark text-white">
  54. {% for color in colors %}
  55. <td>
  56. {% if color == 'dark' %}{% assign c = 'white' %}{% else %}{% assign c = color %}{% endif %}
  57. <div class="avatar bg-{{ c }}-lt" data-demo-color>{{ c | slice: 0, 2 }}</div>
  58. <div class="mt-2" data-demo-color-contrast></div>
  59. </td>
  60. {% endfor %}
  61. </tr>
  62. </table>
  63. </div>
  64. </div>
  65. </div>