From d1711c819447c8b7e3b15dbe3ab8326bc3e5a448 Mon Sep 17 00:00:00 2001 From: codecalm Date: Wed, 8 Jan 2020 21:44:17 +0100 Subject: [PATCH] buttons, float buttons --- package.json | 3 +++ pages/_includes/parts/buttons-table.html | 4 ++-- pages/buttons.html | 9 +++++++++ pages/tmp2.html | 3 +++ scss/ui/_buttons.scss | 8 ++++++++ 5 files changed, 25 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 85a011396..6577b974e 100644 --- a/package.json +++ b/package.json @@ -121,6 +121,9 @@ "peity": "3.3.0", "selectize": "0.12.6" }, + "resolutions": { + "**/**/node-gyp": "5.0.0" + }, "bundlesize": [ { "path": "./dist/css/tabler.css", diff --git a/pages/_includes/parts/buttons-table.html b/pages/_includes/parts/buttons-table.html index 068a1c636..aab21cb82 100644 --- a/pages/_includes/parts/buttons-table.html +++ b/pages/_includes/parts/buttons-table.html @@ -11,7 +11,7 @@ {% for type in variants %} {% if show-link or type[0] != 'link' %}
- {% if include.icon == true %} + {% if include.icon or include.icon-only %} {% assign icon = type[1].icon %} {% endif %} @@ -25,7 +25,7 @@ {% assign text = type[1].title %} {% assign color = type[0] %} - {% include ui/button.html block=true color=false class=class icon=icon icon-only=icon-only text=text %} + {% include ui/button.html block=true color=false class=class icon=icon icon-only=include.icon-only text=text %}
{% endif %} {% endfor %} diff --git a/pages/buttons.html b/pages/buttons.html index 02009b470..00bcbc083 100644 --- a/pages/buttons.html +++ b/pages/buttons.html @@ -69,6 +69,15 @@ menu: base.buttons +
+
+

Icon buttons

+
+
+ {% include parts/buttons-table.html variants=site.socials hide-labels=true icon-only=true auto-columns=true %} +
+
+

Social colors

diff --git a/pages/tmp2.html b/pages/tmp2.html index b5d2ad5fb..da5d95ac1 100644 --- a/pages/tmp2.html +++ b/pages/tmp2.html @@ -2,6 +2,9 @@ page-title: Search results --- +{% include ui/button.html color="primary" icon="plus" icon-only=true class="btn-floating" size="lg" %} + +
diff --git a/scss/ui/_buttons.scss b/scss/ui/_buttons.scss index 9c23cfbdf..6f514b7a6 100644 --- a/scss/ui/_buttons.scss +++ b/scss/ui/_buttons.scss @@ -116,3 +116,11 @@ height: 1rem; } } + +.btn-floating { + position: fixed; + z-index: $zindex-fixed; + bottom: 1.5rem; + right: 1.5rem; + border-radius: 50%; +}