From 546d54249fc76665cdb915a93d99e9298718904d Mon Sep 17 00:00:00 2001 From: codecalm Date: Mon, 23 Sep 2019 21:10:37 +0200 Subject: [PATCH] tabler components page --- pages/_components/input-colors.html | 6 ++ pages/_components/simple-card.html | 1 + pages/_components/widget-revenue.html | 6 ++ pages/_components/widget-sales.html | 1 + pages/_data/menu.yml | 5 ++ pages/_includes/cards/charts/revenue.html | 18 ++++++ pages/_includes/layout/homepage.html | 19 +----- pages/_includes/parts/input-color.html | 2 +- pages/_includes/redirect.html | 10 +++ pages/_layouts/component.html | 29 ++++++--- pages/_layouts/redirect.html | 11 +--- pages/_plugins/jekyll-example.rb | 14 ++--- pages/charts.html | 22 +++---- pages/components.html | 12 ++-- scss/_variables.scss | 2 +- scss/ui/_highlight.scss | 77 ++++++++++++++++++++++- 16 files changed, 166 insertions(+), 69 deletions(-) create mode 100644 pages/_components/input-colors.html create mode 100644 pages/_components/widget-revenue.html create mode 100644 pages/_includes/cards/charts/revenue.html create mode 100644 pages/_includes/redirect.html diff --git a/pages/_components/input-colors.html b/pages/_components/input-colors.html new file mode 100644 index 000000000..a1cf23c9b --- /dev/null +++ b/pages/_components/input-colors.html @@ -0,0 +1,6 @@ +--- +title: Color input +columns: false +--- + +{% include parts/input-color.html %} diff --git a/pages/_components/simple-card.html b/pages/_components/simple-card.html index 46d5aa4f4..0f21810e2 100644 --- a/pages/_components/simple-card.html +++ b/pages/_components/simple-card.html @@ -1,5 +1,6 @@ --- name: Simple box +columns: 1 --- {% include cards/card.html %} diff --git a/pages/_components/widget-revenue.html b/pages/_components/widget-revenue.html new file mode 100644 index 000000000..b7644c126 --- /dev/null +++ b/pages/_components/widget-revenue.html @@ -0,0 +1,6 @@ +--- +title: Revenue chart +columns: 1 +--- + +{% include cards/charts/revenue.html %} diff --git a/pages/_components/widget-sales.html b/pages/_components/widget-sales.html index ca2a1f2e4..6b76222be 100644 --- a/pages/_components/widget-sales.html +++ b/pages/_components/widget-sales.html @@ -1,5 +1,6 @@ --- title: Sales widget +columns: 1 --- {% include cards/charts/sales.html %} diff --git a/pages/_data/menu.yml b/pages/_data/menu.yml index 9e8790b71..4a4644e99 100644 --- a/pages/_data/menu.yml +++ b/pages/_data/menu.yml @@ -61,6 +61,11 @@ changelog: icon: file-plus label: v1.0 +components: + url: components.html + title: Components + icon: truck + customize: url: '#customize' title: Customize diff --git a/pages/_includes/cards/charts/revenue.html b/pages/_includes/cards/charts/revenue.html new file mode 100644 index 000000000..cb2dfd296 --- /dev/null +++ b/pages/_includes/cards/charts/revenue.html @@ -0,0 +1,18 @@ +
+
+
+
Revenue
+
+ {% include parts/dropdown/days.html %} +
+
+
+
$4,300
+
+ 24% {% include ui/icon.html icon="trending-up" class="icon-thin" %} +
+
+
+
+ {% include js/charts.html id="card-chart-1" chart-id="revenue-bg" %} +
diff --git a/pages/_includes/layout/homepage.html b/pages/_includes/layout/homepage.html index 5ba86153c..d74af3e22 100644 --- a/pages/_includes/layout/homepage.html +++ b/pages/_includes/layout/homepage.html @@ -3,24 +3,7 @@ {% include cards/charts/sales.html %}
-
-
-
-
Revenue
-
- {% include parts/dropdown/days.html %} -
-
-
-
$4,300
-
- 24% {% include ui/icon.html icon="trending-up" class="icon-thin" %} -
-
-
-
- {% include js/charts.html id="card-chart-1" chart-id="revenue-bg" %} -
+ {% include cards/charts/revenue.html %}
diff --git a/pages/_includes/parts/input-color.html b/pages/_includes/parts/input-color.html index 60463a750..d6e5940cd 100644 --- a/pages/_includes/parts/input-color.html +++ b/pages/_includes/parts/input-color.html @@ -1,4 +1,4 @@ -
+
{% for color in site.colors limit: 9 offset: 1 %} diff --git a/pages/_includes/redirect.html b/pages/_includes/redirect.html new file mode 100644 index 000000000..4e523f21b --- /dev/null +++ b/pages/_includes/redirect.html @@ -0,0 +1,10 @@ + + + +Redirecting… + + + + + + diff --git a/pages/_layouts/component.html b/pages/_layouts/component.html index fc2142563..cb13fdbeb 100644 --- a/pages/_layouts/component.html +++ b/pages/_layouts/component.html @@ -1,18 +1,27 @@ --- -layout: base +layout: default +menu: components --- {% assign columns = page.columns | default: 0 %} -{% assign columns = 1 %} -
-
-
0 %} style="max-width: {{ columns | times: 298 | minus: 24 }}px"{% endif %}> - {{ content }} +
+
+
+ {% for component in site.components %} + {{ component.title }} + {% endfor %} +
+
+
+
+
0 %}class="flex-fill" style="max-width: {{ columns | times: 298 | minus: 24 }}px"{% endif %}> + {{ content }} +
+
+ +
+ {{ content | highlight_tidy: 'html' }}
- -
- {{ content | highlight_tidy }} -
diff --git a/pages/_layouts/redirect.html b/pages/_layouts/redirect.html index 8fffa70fa..873b90485 100644 --- a/pages/_layouts/redirect.html +++ b/pages/_layouts/redirect.html @@ -1,10 +1 @@ - - - -Redirecting… - - - - -