From 300c2256364ee08d1e24db2579436e04f8bcc93b Mon Sep 17 00:00:00 2001 From: codecalm Date: Wed, 17 Feb 2021 22:21:52 +0100 Subject: [PATCH] tabler plugins --- _config.yml | 3 +- src/pages/_data/docs.yml | 6 ++-- src/pages/_docs/download.md | 33 +++++++++++++++++++ src/pages/_docs/getting-started.md | 4 +-- src/pages/_docs/usage.md | 47 ---------------------------- src/pages/_includes/docs/plugin.html | 13 +++++--- src/pages/_includes/layout/css.html | 2 +- src/pages/_layouts/docs.html | 8 ++--- 8 files changed, 54 insertions(+), 62 deletions(-) create mode 100644 src/pages/_docs/download.md delete mode 100644 src/pages/_docs/usage.md diff --git a/_config.yml b/_config.yml index a4fbb15c1..d13cccc3b 100644 --- a/_config.yml +++ b/_config.yml @@ -23,6 +23,7 @@ preview-url: https://preview.tabler.io mapbox-key: pk.eyJ1IjoiY29kZWNhbG0iLCJhIjoiSzRiOVJvQSJ9.BUVkTT6IYs83xSUs4H7bjQ google-maps-key: AIzaSyAr5mRB4U1KRkVznIrDWEvZjroYcD202DI google-maps-dev-key: AIzaSyCL-BY8-sq12m0S9H-S_yMqDmcun3A9znw +npm-package: "@tabler/core" debug: false @@ -34,7 +35,7 @@ plugins: - jekyll-timeago - jekyll-redirect-from -tabler-plugins: +tabler-css-plugins: - tabler-flags - tabler-payments - tabler-vendors diff --git a/src/pages/_data/docs.yml b/src/pages/_data/docs.yml index 6dfc1e4e5..a25b902d2 100644 --- a/src/pages/_data/docs.yml +++ b/src/pages/_data/docs.yml @@ -10,9 +10,9 @@ base: getting-started: title: Getting Started url: docs/getting-started.html - usage: - title: Usage - url: docs/usage.html + download: + title: Download + url: docs/download.html content: title: Content diff --git a/src/pages/_docs/download.md b/src/pages/_docs/download.md new file mode 100644 index 000000000..9ca1bb3de --- /dev/null +++ b/src/pages/_docs/download.md @@ -0,0 +1,33 @@ +--- +title: Download +menu: docs.base.download +description: Download Tabler to get the compiled CSS and JavaScript, source code, or include it with your favorite package managers like npm, yarn and more. +--- + + +## CDN via unpkg + +All files included in `{{ site.npm-package }}` npm package are available over a unpkg CDN. Use it to deliver cached version of Tabler’s compiled CSS and JS to your project. + +```html + + +``` + +You can also include additional Tabler plugins: + +```html +{% removeemptylines %} +{% for plugin in site.tabler-css-plugins %} + +{% endfor %} +{% endremoveemptylines %} +``` + +## Package managers + +Install Tabler in your Node.js powered apps with the npm package: + +``` +npm install {{ site.npm-package }} +``` \ No newline at end of file diff --git a/src/pages/_docs/getting-started.md b/src/pages/_docs/getting-started.md index 8b0e1fb6f..aca60db40 100644 --- a/src/pages/_docs/getting-started.md +++ b/src/pages/_docs/getting-started.md @@ -26,8 +26,8 @@ Once you've completed the setup, you'll be able to run the various commands prov ## Build Tabler locally 1. From the root `/tabler` directory, run `npm run start` in the command line. -2. Open [http://localhost:4000](http://localhost:4000) in your browser, and voilà. -3. Any change in `/pages` directory will build the application and refresh the page. +2. Open [http://localhost:3000](http://localhost:3000) in your browser, and voilà. +3. Any change in `/src` directory will build the application and refresh the page. ## Bugs and feature requests diff --git a/src/pages/_docs/usage.md b/src/pages/_docs/usage.md deleted file mode 100644 index caea2bb46..000000000 --- a/src/pages/_docs/usage.md +++ /dev/null @@ -1,47 +0,0 @@ ---- -title: Usage -menu: docs.base.usage -description: Tabler distributions are available on npm. Add tabler as a dependency in your npm project or use a specific version directly in your HTML files via CDN includes. ---- - -## Installation - -To install the latest `tabler` npm package in your project run: -```sh -npm install @tabler/core -``` - -Tabler `1.0.0` major version is now in active development. To get the latest `alpha` version run: -```sh -npm install @tabler/core@alpha -``` - -## CDN support - -All files included in `@tabler/core` npm package are available over a CDN. - -### Javascript - -```html - -``` - -### Styles - -```html - -``` - -### Other versions - -To load a specific version replace `latest` with the desired version number. - -```html - -``` - -To load the latest `alpha` version replace `latest` with `alpha`. - -```html - -``` diff --git a/src/pages/_includes/docs/plugin.html b/src/pages/_includes/docs/plugin.html index cbad90043..59635463b 100644 --- a/src/pages/_includes/docs/plugin.html +++ b/src/pages/_includes/docs/plugin.html @@ -1,4 +1,9 @@ -
-

Important!

-

This part of Tabler is distributed as plugin. To enable it you should include tabler-{{ include.plugin }}.css or tabler-{{ include.plugin }}.min.css file to your page.

-
\ No newline at end of file +

Installation

+ +

This part of Tabler is distributed as plugin. To enable it you should include tabler-{{ include.plugin }}.css or tabler-{{ include.plugin }}.min.css file to your page.

+ +

You can also include plugin via CDN:

+ +{% highlight html %} + +{% endhighlight %} \ No newline at end of file diff --git a/src/pages/_includes/layout/css.html b/src/pages/_includes/layout/css.html index 595730bbe..7e7d63c49 100644 --- a/src/pages/_includes/layout/css.html +++ b/src/pages/_includes/layout/css.html @@ -17,7 +17,7 @@ -{% for plugin in site.tabler-plugins %} +{% for plugin in site.tabler-css-plugins %} {% endfor %} diff --git a/src/pages/_layouts/docs.html b/src/pages/_layouts/docs.html index 368f62a44..fc2916ee2 100644 --- a/src/pages/_layouts/docs.html +++ b/src/pages/_layouts/docs.html @@ -29,13 +29,13 @@ page-header: Documentation {% endif %} - {% if page.plugin %} - {% include docs/plugin.html plugin=page.plugin %} - {% endif %} - {% if page.description %}

{{ page.description }}

{% endif %} + + {% if page.plugin %} + {% include docs/plugin.html plugin=page.plugin %} + {% endif %} {{ content }}