diff --git a/README.md b/README.md
index 345129968..b6316873c 100644
--- a/README.md
+++ b/README.md
@@ -73,7 +73,7 @@ Have a bug or a feature request? [Please open a new issue](https://github.com/ta
## Contributors
-This project exists thanks to all the people who contribute. [[Contribute](CONTRIBUTING.md)].
+This project exists thanks to all the people who contribute. [[Contribute](https://github.com/tabler/tabler/graphs/contributors)].
## Backers
diff --git a/_config.yml b/_config.yml
index a591934ea..c8869170c 100644
--- a/_config.yml
+++ b/_config.yml
@@ -11,18 +11,25 @@ debug: false
dark-theme: false
plugins:
-- jekyll-random
-- jekyll-tidy
-- jekyll-timeago
-- jekyll-redirect-from
+ - jekyll-random
+ - jekyll-tidy
+ - jekyll-timeago
+ - jekyll-redirect-from
+
+tabler-plugins:
+ - tabler-flags
+ - tabler-payments
+ - tabler-buttons
+ - tabler-dark
+ - tabler-rtl
exclude:
-- .jekyll-cache
+ - .jekyll-cache
keep_files:
-- css/ui-kit.css
-- css/dark.css
-- css/rtl.css
+ - css/ui-kit.css
+ - css/dark.css
+ - css/rtl.css
#- js/ui-kit.js
markdown: kramdown
@@ -49,31 +56,28 @@ collections:
output: true
defaults:
- -
- scope:
+ - scope:
type: "pages"
path: "*.md"
values:
layout: markdown
- menu-layout: vertical
+ menu-layout: horizontal
- scope:
type: "pages"
values:
layout: default
- menu-layout: vertical
- -
- scope:
+ menu-layout: horizontal
+ - scope:
type: "docs"
values:
layout: docs
- menu-layout: vertical
- -
- scope:
+ menu-layout: horizontal
+ - scope:
type: "components"
values:
layout: component
- menu-layout: vertical
+ menu-layout: horizontal
colors:
diff --git a/build/banner.js b/build/banner.js
index c29b10f61..611e2b019 100644
--- a/build/banner.js
+++ b/build/banner.js
@@ -8,10 +8,10 @@
'use strict';
const pkg = require('../package.json'),
- year = new Date().getFullYear();
+ year = new Date().getFullYear();
function getBanner(pluginFilename) {
- return `/*!
+ return `/*!
* Tabler${pluginFilename ? ` ${pluginFilename}` : ''} v${pkg.version} (${pkg.homepage})
* Copyright 2018-${year} ${pkg.author}
* Licensed under ${pkg.license} (https://github.com/tabler/tabler/blob/master/LICENSE)
diff --git a/build/browsersync.js b/build/browsersync.js
index 86c38c0d4..d8d735fe1 100755
--- a/build/browsersync.js
+++ b/build/browsersync.js
@@ -8,30 +8,30 @@
const bs = require('browser-sync').create();
bs.init({
- watch: true,
- server: {
- routes: {
- '/': 'tmp',
- '/dist': 'tmp-dist',
- '/libs': 'static/libs',
- '/tmp-dist/img': 'img',
- '/static': 'static',
- '/node_modules': 'node_modules',
- },
- },
- files: ['tmp/**/*', 'tmp-dist/css/*.css', 'tmp-dist/js/*.js', 'tmp-dist/img/*.svg'],
- watchOptions: {
- ignoreInitial: true,
- },
- reloadDelay: 1000,
- notify: false,
- open: false,
- snippetOptions: {
- rule: {
- match: /<\/head>/i,
- fn: function (snippet, match) {
- return snippet + match;
- }
- }
- }
+ watch: true,
+ server: {
+ routes: {
+ '/': 'tmp',
+ '/dist': 'tmp-dist',
+ '/libs': 'static/libs',
+ '/tmp-dist/img': 'img',
+ '/static': 'static',
+ '/node_modules': 'node_modules',
+ },
+ },
+ files: ['tmp/**/*', 'tmp-dist/css/*.css', 'tmp-dist/js/*.js', 'tmp-dist/img/*.svg'],
+ watchOptions: {
+ ignoreInitial: true,
+ },
+ reloadDelay: 1000,
+ notify: false,
+ open: false,
+ snippetOptions: {
+ rule: {
+ match: /<\/head>/i,
+ fn: function (snippet, match) {
+ return snippet + match;
+ }
+ }
+ }
});
diff --git a/build/capture-components.sh b/build/capture-components.sh
index aa4c1f33f..6b160b652 100755
--- a/build/capture-components.sh
+++ b/build/capture-components.sh
@@ -1,12 +1,11 @@
rm -rf ../static/img/components/*
-for file in ../pages/_components/*.html
-do
+for file in ../pages/_components/*.html; do
file="$(basename -- $file)"
file="${file%.html}"
url="http://localhost:3001/components/$file.html"
echo $url
- capture-website $url --element="#component-wrapper" --scale-factor=2 > ../static/img/components/$file.png
+ capture-website $url --element="#component-wrapper" --scale-factor=2 >../static/img/components/$file.png
convert ../static/img/components/$file.png -gravity Center -crop 1648x824-0-0! -background "#F5F7FB" -flatten +repage -resize 1280x640 ../static/img/components/$file.png
done
diff --git a/build/copy-libs.js b/build/copy-libs.js
index af64242b8..1ad991943 100755
--- a/build/copy-libs.js
+++ b/build/copy-libs.js
@@ -1,8 +1,8 @@
if (!Array.prototype.flat) {
Object.defineProperty(Array.prototype, 'flat', {
- value: function(depth = 1) {
+ value: function (depth = 1) {
return this.reduce(function (flat, toFlatten) {
- return flat.concat((Array.isArray(toFlatten) && (depth>1)) ? toFlatten.flat(depth-1) : toFlatten);
+ return flat.concat((Array.isArray(toFlatten) && (depth > 1)) ? toFlatten.flat(depth - 1) : toFlatten);
}, []);
}
});
@@ -10,24 +10,24 @@ if (!Array.prototype.flat) {
const all_libs = require('../pages/_data/libs'),
- path = require('path'),
- { exec } = require('child_process');
+ path = require('path'),
+ { exec } = require('child_process');
let files = [];
Object.keys(all_libs.js).forEach(function (lib) {
- files.push(Array.isArray(all_libs.js[lib]) ? all_libs.js[lib] : [all_libs.js[lib]]);
+ files.push(Array.isArray(all_libs.js[lib]) ? all_libs.js[lib] : [all_libs.js[lib]]);
});
Object.keys(all_libs.css).forEach(function (lib) {
- files.push(Array.isArray(all_libs.css[lib]) ? all_libs.css[lib] : [all_libs.css[lib]]);
+ files.push(Array.isArray(all_libs.css[lib]) ? all_libs.css[lib] : [all_libs.css[lib]]);
});
files = files.flat();
files.forEach(function (file) {
- let dirname = path.dirname(file).replace('@', '');
- let cmd = `mkdir -p "dist/libs/${dirname}" && cp -r node_modules/${file} dist/libs/${file.replace('@', '')}`;
+ let dirname = path.dirname(file).replace('@', '');
+ let cmd = `mkdir -p "dist/libs/${dirname}" && cp -r node_modules/${file} dist/libs/${file.replace('@', '')}`;
- exec(cmd)
+ exec(cmd)
});
diff --git a/build/postcss.config.js b/build/postcss.config.js
index 8e43ebeed..97c8cb9fe 100644
--- a/build/postcss.config.js
+++ b/build/postcss.config.js
@@ -8,17 +8,15 @@
'use strict';
module.exports = ctx => ({
- map: ctx.file.dirname.includes('examples') ?
- false :
- {
- inline: false,
- annotation: true,
- sourcesContent: true
- },
- plugins: {
- autoprefixer: {
- cascade: false,
- grid: "autoplace"
- }
- }
+ map: {
+ inline: false,
+ annotation: true,
+ sourcesContent: true
+ },
+ plugins: {
+ autoprefixer: {
+ cascade: false,
+ grid: "autoplace"
+ }
+ }
});
diff --git a/build/rollup.config.js b/build/rollup.config.js
index 31ce5351b..597351cbe 100644
--- a/build/rollup.config.js
+++ b/build/rollup.config.js
@@ -7,7 +7,7 @@
'use strict';
-const BUNDLE = process.env.BUNDLE === 'true';
+const BUNDLE = process.env.BUNDLE === 'true';
const dir = BUNDLE ? 'dist' : 'tmp-dist';
import path from 'path';
@@ -17,39 +17,38 @@ import minify from 'rollup-plugin-babel-minify';
import commonjs from 'rollup-plugin-commonjs';
const fileDest = 'tabler',
- banner = require('./banner');
+ banner = require('./banner');
let plugins = [
- resolve(),
- commonjs()
+ resolve(),
+ commonjs()
];
if (BUNDLE) {
- plugins = plugins.concat([
- babel({
- exclude: 'node_modules/**'
- }),
- minify({
- comments: false
- })
- ]);
+ plugins = plugins.concat([
+ babel({
+ exclude: 'node_modules/**'
+ }),
+ minify({
+ comments: false
+ })
+ ]);
}
-
module.exports = {
- context: "window",
- input: {
- tabler: path.resolve(__dirname, '../js/tabler.js'),
- // 'tabler-charts': path.resolve(__dirname, '../js/tabler-charts.js'),
- 'tabler-range-sliders': path.resolve(__dirname, '../js/tabler-range-sliders.js')
- },
- output: {
- banner,
- // name: 'tabler',
- dir: path.resolve(__dirname, `../${dir}/js/`),
- entryFileNames: BUNDLE ? '[name].min.js' : '[name].js',
- format: 'cjs'
- },
- plugins,
+ context: "window",
+ input: {
+ tabler: path.resolve(__dirname, '../js/tabler.js'),
+ // 'tabler-charts': path.resolve(__dirname, '../js/tabler-charts.js'),
+ 'tabler-range-sliders': path.resolve(__dirname, '../js/tabler-range-sliders.js')
+ },
+ output: {
+ banner,
+ // name: 'tabler',
+ dir: path.resolve(__dirname, `../${dir}/js/`),
+ entryFileNames: BUNDLE ? '[name].min.js' : '[name].js',
+ format: 'cjs'
+ },
+ plugins,
};
diff --git a/build/scss-compile.js b/build/scss-compile.js
index 802da3c8d..ced1cb88c 100644
--- a/build/scss-compile.js
+++ b/build/scss-compile.js
@@ -5,46 +5,46 @@
* Licensed under MIT (https://github.com/tabler/tabler/blob/master/LICENSE)
*/
-const BUNDLE = process.env.BUNDLE === 'true';
+const BUNDLE = process.env.BUNDLE === 'true';
const path = require('path'),
- glob = require("glob"),
- fs = require("fs"),
- sass = require("node-sass"),
- packageImporter = require('node-sass-package-importer');
+ glob = require("glob"),
+ fs = require("fs"),
+ sass = require("node-sass"),
+ packageImporter = require('node-sass-package-importer');
const dir = BUNDLE ? 'dist' : 'tmp-dist';
glob("scss/tabler*.scss", {}, function (er, files) {
- files.forEach(function(file){
- var basename = path.basename(file, '.scss');
-
- sass.render(
- {
- file: file,
- outFile: `${dir}/css/${basename}.css`,
- sourceMap: true,
- sourceMapContents: true,
- precision: 7,
- importer: packageImporter()
- },
- (error, result) => {
- if (!error) {
- fs.writeFile(`${dir}/css/${basename}.css`, result.css, error => {
- if (error) {
- console.log(error);
- }
- });
+ files.forEach(function (file) {
+ var basename = path.basename(file, '.scss');
- fs.writeFile(`${dir}/css/${basename}.css.map`, result.map, error => {
- if (error) {
- console.log(error);
- }
- });
- } else {
- throw error;
- }
- }
- );
- });
+ sass.render(
+ {
+ file: file,
+ outFile: `${dir}/css/${basename}.css`,
+ sourceMap: true,
+ sourceMapContents: true,
+ precision: 7,
+ importer: packageImporter()
+ },
+ (error, result) => {
+ if (!error) {
+ fs.writeFile(`${dir}/css/${basename}.css`, result.css, error => {
+ if (error) {
+ console.log(error);
+ }
+ });
+
+ fs.writeFile(`${dir}/css/${basename}.css.map`, result.map, error => {
+ if (error) {
+ console.log(error);
+ }
+ });
+ } else {
+ throw error;
+ }
+ }
+ );
+ });
});
diff --git a/build/unused-files.js b/build/unused-files.js
index f4884e930..2c37bb616 100644
--- a/build/unused-files.js
+++ b/build/unused-files.js
@@ -1,26 +1,26 @@
const glob = require("glob"),
- fs = require("fs");
+ fs = require("fs");
let foundFiles = [];
glob.sync("pages/**/*.{html,md}").forEach(function (file) {
- let fileContent = fs.readFileSync(file);
+ let fileContent = fs.readFileSync(file);
- fileContent.toString().replace(/\{% include(_cached)? ([a-z0-9\/_-]+\.html)/g, function(f, c, filename){
- filename = 'pages/_includes/' + filename;
+ fileContent.toString().replace(/\{% include(_cached)? ([a-z0-9\/_-]+\.html)/g, function (f, c, filename) {
+ filename = 'pages/_includes/' + filename;
- if(!foundFiles.includes(filename)) {
- foundFiles.push(filename);
- }
- });
+ if (!foundFiles.includes(filename)) {
+ foundFiles.push(filename);
+ }
+ });
});
let includeFiles = glob.sync("pages/_includes/**/*.html");
-includeFiles.forEach(function(file){
- if(! foundFiles.includes(file)) {
- console.log('file', file);
- }
+includeFiles.forEach(function (file) {
+ if (!foundFiles.includes(file)) {
+ console.log('file', file);
+ }
});
// console.log('foundFiles', foundFiles);
diff --git a/demo/400.html b/demo/400.html
index ae7fc3fdb..8b9a32874 100644
--- a/demo/400.html
+++ b/demo/400.html
@@ -25,17 +25,19 @@