default.html 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6. {% if environment == 'preview' %}
  7. {% assign pageSection = "" %}
  8. {% if page.url contains "/ui/" %}
  9. {% assign pageSection = "UI" %}
  10. {% elsif page.url contains "/icons/" %}
  11. {% assign pageSection = "Icons" %}
  12. {% elsif page.url contains "/illustrations/" %}
  13. {% assign pageSection = "Illustrations" %}
  14. {% elsif page.url contains "/emails/" %}
  15. {% assign pageSection = "Emails" %}
  16. {% endif %}
  17. {% assign metaTitle = title %}
  18. {% if seoTitle %}
  19. {% assign metaTitle = seoTitle %}
  20. {% endif %}
  21. {% assign metaDescription = description %}
  22. {% if seoDescription %}
  23. {% assign metaDescription = seoDescription %}
  24. {% endif %}
  25. {% assign siteName = "Tabler Documentation" %}
  26. {% if pageSection != "" %}
  27. {% assign siteName = "Tabler " | append: pageSection | append: " Documentation" %}
  28. {% endif %}
  29. <title>{{ metaTitle }} | {{ siteName }}</title>
  30. {% if metaDescription %}<meta name="description" content="{{ metaDescription }}">{% endif %}
  31. <link rel="canonical" href="{{ page.url | absolute_url }}">
  32. <!-- Open Graph / Social Media Meta Tags -->
  33. <meta property="og:type" content="website">
  34. <meta property="og:title" content="{{ metaTitle }}">
  35. {% if metaDescription %}<meta property="og:description" content="{{ metaDescription }}">{% endif %}
  36. <meta property="og:site_name" content="{{ siteName }}">
  37. <!-- Twitter Card data -->
  38. <meta name="twitter:card" content="summary">
  39. <meta name="twitter:title" content="{{ metaTitle }}">
  40. {% if metaDescription %}<meta name="twitter:description" content="{{ metaDescription }}">{% endif %}
  41. <script defer data-api="/stats/event" data-domain="docs.tabler.io" src="/stats/js/script.js"></script>
  42. {% elsif environment == 'development' %}
  43. <link rel="icon" href="{{ page | relative }}/favicon-dev.ico" type="image/x-icon" />
  44. <link rel="shortcut icon" href="{{ page | relative }}/favicon-dev.ico" type="image/x-icon" />
  45. {% endif %}
  46. <link rel="stylesheet" href="/dist/css/tabler{% if environment != 'development' %}.min{% endif %}.css{% if environment != 'development' %}?{{ 'now' | date: '%s' }}{% endif %}" />
  47. {% for plugin in site.cssPlugins %}
  48. <link
  49. href="/dist/css/tabler-{{ plugin }}{% if environment != 'development' %}.min{% endif %}.css{% if environment != 'development' %}?{{ 'now' | date: '%s' }}{% endif %}"
  50. rel="stylesheet" />
  51. {% endfor %}
  52. {% if docs-libs -%}
  53. {% for lib in libs.css -%}
  54. {% if docs-libs contains lib[0] -%}
  55. {% for file in lib[1] -%}
  56. <link
  57. href="{% if file contains 'http://' or file contains 'https://' %}{{ file }}{% else %}{{ page | relative }}/libs/{% if environment != 'development' %}{{ file | replace: '@', '' }}{% else %}{{ file }}{% endif %}{% if environment != 'development' %}?{{ 'now' | date: '%s' }}{% endif %}{% endif %}"
  58. rel="stylesheet" />
  59. {% endfor -%}
  60. {% endif -%}
  61. {% endfor -%}
  62. {% endif %}
  63. <style>@import url('https://rsms.me/inter/inter.css');</style>
  64. <link rel="stylesheet" href="/css/docs{% if environment != 'development' %}.min{% endif %}.css" />
  65. </head>
  66. <body class="d-flex flex-column" style="background: var(--tblr-bg-surface)">
  67. <script src="/dist/js/tabler-theme{% if environment != 'development' %}.min{% endif %}.js"></script>
  68. {% include "docs/navbar.html" %}
  69. <div class="flex-fill">
  70. <div class="container">
  71. <div class="row g-0">
  72. <div class="col-docs d-none d-lg-block border-end">
  73. <div class="py-4">
  74. <div class="space-y space-y-5">
  75. <div class="nav nav-vertical">
  76. {% for link in docs-links %}
  77. <a href="{{ link.url }}" class="nav-link" target="_blank">
  78. <span class="border me-2 rounded p-1">{% include "ui/icon.html" icon=link.icon %}</span>
  79. {{ link.title }}
  80. </a>
  81. {% endfor %}
  82. </div>
  83. <div class="flex-fill">
  84. {% include "docs/menu.html" %}
  85. </div>
  86. </div>
  87. </div>
  88. </div>
  89. <div class="col bg-docs-gradient">
  90. <div class="py-lg-5 ps-lg-5">
  91. <div class="py-6 ps-lg-6 p-xxl-6">
  92. <div class="markdown" data-bs-spy="scroll" data-bs-target="#toc" data-bs-root-margin="50px 0px -0%" data-bs-smooth-scroll="true" tabindex="0">
  93. <h1>
  94. {{ title }}
  95. </h1>
  96. <p class="text-secondary fs-3 lh-3">{{ summary }}</p>
  97. {{ content | headings-id }}
  98. {% include "docs/pagination.html" %}
  99. <div class="mt-7">
  100. <div>
  101. <a href="{{ site.githubUrl }}/tree/dev/docs/{{ page.inputPath }}" class="link-primary" target="_blank">{% include
  102. "ui/icon.html" icon="edit" class="icon-inline" %} Edit this page on GitHub</a>
  103. </div>
  104. <div class="mt-5">
  105. <div class="row">
  106. <div class="col text-secondary">
  107. © {% year %} Tabler. All rights reserved.
  108. </div>
  109. <div class="col text-end">
  110. <a href="{{ site.githubUrl }}" class="link-secondary" target="_blank">{% include "ui/icon.html"
  111. icon="brand-github" %}</a>
  112. <a href="{{ site.githubSponsorsUrl }}" class="link-secondary" target="_blank">{% include "ui/icon.html"
  113. icon="heart" %}</a>
  114. <a href="{{ site.opencollectiveUrl }}" class="link-secondary" target="_blank">{% include "ui/icon.html"
  115. icon="hearts" %}</a>
  116. <a href="{{ site.xUrl }}" class="link-secondary" target="_blank">{% include "ui/icon.html" icon="brand-x"
  117. %}</a>
  118. <a href="{{ site.linkedinUrl }}" class="link-secondary" target="_blank">{% include "ui/icon.html"
  119. icon="brand-linkedin" %}</a>
  120. </div>
  121. </div>
  122. </div>
  123. </div>
  124. </div>
  125. </div>
  126. </div>
  127. </div>
  128. <div class="col-2 d-none d-xxl-block">
  129. <div class="py-6 sticky-top">
  130. {% include "docs/toc.html" %}
  131. </div>
  132. </div>
  133. </div>
  134. </div>
  135. </div>
  136. {% for lib in libs -%}
  137. {% if docs-libs contains lib[0] or libs.global-libs contains lib[0] or lib[0] == "clipboard" -%}
  138. {% for file in lib[1].js -%}
  139. <script
  140. src="{% if file contains 'http://' or file contains 'https://' %}{{ file | replace: 'GOOGLE_MAPS_KEY', google-maps-key }}{% else %}/dist/libs/{{ lib[1].npm }}/{% if environment != 'development' %}{{ file | replace: '@', '' }}{% else %}{{ file }}{% endif %}{% if environment != 'development' %}?{{ 'now' | date: '%s' }}{% endif %}{% endif %}"
  141. ></script>
  142. {% endfor -%}
  143. {% endif -%}
  144. {% endfor -%}
  145. <script>
  146. document.addEventListener('DOMContentLoaded', function () {
  147. const elements = document.querySelectorAll('[data-clipboard-text]');
  148. elements.forEach(function (element) {
  149. const clipboard = new ClipboardJS(element, {
  150. text: function (trigger) {
  151. return element.getAttribute('data-clipboard-text');
  152. }
  153. });
  154. clipboard.on('success', function (e) {
  155. e.clearSelection();
  156. e.trigger.classList.add('btn-success');
  157. e.trigger.classList.remove('btn-dark');
  158. e.trigger.children[0].classList.add('d-none');
  159. e.trigger.children[1].classList.remove('d-none');
  160. setTimeout(function () {
  161. e.trigger.classList.remove('btn-success');
  162. e.trigger.classList.add('btn-dark');
  163. e.trigger.children[0].classList.remove('d-none');
  164. e.trigger.children[1].classList.add('d-none');
  165. }, 2000);
  166. });
  167. clipboard.on('error', function (e) {
  168. console.error('Error copying text: ', e);
  169. });
  170. });
  171. })
  172. </script>
  173. <script src="/dist/js/tabler{% if environment != 'development' %}.min{% endif %}.js"></script>
  174. <script src="/js/docs{% if environment != 'development' %}.min{% endif %}.js" defer></script>
  175. {% if environment == 'production' %}
  176. <script src="https://scripts.tabler.io/banner.js" defer data-tblr-ref="tabler-docs"></script>
  177. {% endif %}
  178. </body>
  179. </html>