From 7389d5bbca43efc82d1aad84bf94e91e4397f42b Mon Sep 17 00:00:00 2001 From: chomik Date: Mon, 20 May 2019 23:02:56 +0200 Subject: [PATCH] form helpers --- _config.yml | 11 ----------- pages/_data/docs.yml | 14 ++++++++++++++ pages/_data/menu.yml | 2 +- pages/_docs/alerts.md | 8 ++++---- pages/_docs/avatars.md | 4 ++-- pages/_docs/badges.md | 10 +++++----- pages/_docs/form-helpers.md | 9 +++++++++ pages/_docs/spinners.md | 10 +++++----- pages/_docs/steps.md | 10 +++++----- pages/_docs/tables.md | 4 ++-- pages/_docs/toasts.md | 2 +- pages/_docs/typography.md | 23 +++++++++++++++++------ pages/_includes/layout/menu.html | 7 ++++--- pages/_layouts/docs.html | 1 + pages/_plugins/jekyll-example.rb | 4 ++++ scss/ui/_inputs.scss | 28 ++++++++++++++++++++++++++++ scss/utils/_text.scss | 12 ++++++++++++ 17 files changed, 114 insertions(+), 45 deletions(-) create mode 100644 pages/_data/docs.yml create mode 100644 pages/_docs/form-helpers.md diff --git a/_config.yml b/_config.yml index 5339f3a6..6f184817 100644 --- a/_config.yml +++ b/_config.yml @@ -111,14 +111,3 @@ socials: [facebook, twitter, google, youtube, vimeo, dribbble, github, instagram months_short: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'] months_long: ['January', 'Febuary', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'] - - -docs-menu: - intro: - title: Getting started - pages: [index] - components: - title: Components - pages: [alerts, avatars, badges, buttons, cards, carousel, ribbons, spinners, steps, tabs, toasts, tooltips, typography] - - diff --git a/pages/_data/docs.yml b/pages/_data/docs.yml new file mode 100644 index 00000000..99595998 --- /dev/null +++ b/pages/_data/docs.yml @@ -0,0 +1,14 @@ +- page: alerts +- page: avatars +- page: badges +- page: buttons +- page: cards +- page: carousel +- page: ribbons +- page: spinners +- page: steps +- page: tabs +- page: toasts +- page: tooltips +- page: typography +- page: form-helpers diff --git a/pages/_data/menu.yml b/pages/_data/menu.yml index 587ad866..e87f87ff 100644 --- a/pages/_data/menu.yml +++ b/pages/_data/menu.yml @@ -20,7 +20,7 @@ level-1: docs: title: Documentation icon: file-text - docs: components + docs: true changelog: url: changelog.html diff --git a/pages/_docs/alerts.md b/pages/_docs/alerts.md index f1a7c8ab..e81bd611 100644 --- a/pages/_docs/alerts.md +++ b/pages/_docs/alerts.md @@ -7,7 +7,7 @@ Bootstrap provides an easy way to create predefined alert messages. ## Default markup -{% example html %} +{% example %} {% for variant in site.variants %} {% capture variant-text %} This is a {{ variant.name }} alert — check it out! @@ -21,7 +21,7 @@ Bootstrap provides an easy way to create predefined alert messages. Add the `alert-link` class to any links inside the alert box to create "matching colored links": -{% example html %} +{% example %} {% for variant in site.variants %} {% capture variant-text %} This is a {{ variant.name }} alert — check it out! @@ -33,7 +33,7 @@ Add the `alert-link` class to any links inside the alert box to create "matching ## Closing Alerts -{% example html %} +{% example %} {% for variant in site.variants %} {% capture variant-text %} This is a {{ variant.name }} alert — check it out! @@ -44,7 +44,7 @@ Add the `alert-link` class to any links inside the alert box to create "matching ## Alerts with icons -{% example html %} +{% example %} {% for variant in site.variants %} {% capture variant-text %} This is a {{ variant.name }} alert — check it out! diff --git a/pages/_docs/avatars.md b/pages/_docs/avatars.md index a0f2f44c..d36ae94f 100644 --- a/pages/_docs/avatars.md +++ b/pages/_docs/avatars.md @@ -83,7 +83,7 @@ Change the shape of an avatar with the default Bootstrap image classes. ## Avatars list -{% example html %} +{% example %}
{% for person in site.data.people limit: 5 offset: 20 %} {% include ui/avatar.html person=person %} @@ -91,7 +91,7 @@ Change the shape of an avatar with the default Bootstrap image classes.
{% endexample %} -{% example html %} +{% example %}
{% for person in site.data.people limit: 5 offset: 30 %} {% include ui/avatar.html person=person element="a" %} diff --git a/pages/_docs/badges.md b/pages/_docs/badges.md index 3241ef2a..058233c9 100644 --- a/pages/_docs/badges.md +++ b/pages/_docs/badges.md @@ -7,7 +7,7 @@ A small count and labeling component. Please read the [official Bootstrap docume ## Default markup -{% example html %} +{% example %} {% for color in site.colors %} {{ color[0] }} {% endfor %} @@ -15,7 +15,7 @@ A small count and labeling component. Please read the [official Bootstrap docume ## Pill badges -{% example html %} +{% example %} {% for color in site.colors %} {{ forloop.index }} {% endfor %} @@ -24,7 +24,7 @@ A small count and labeling component. Please read the [official Bootstrap docume ## Soft badges -{% example html %} +{% example %} {% for color in site.colors %} {{ color[0] }} {% endfor %} @@ -33,7 +33,7 @@ A small count and labeling component. Please read the [official Bootstrap docume ## Links -{% example html %} +{% example %} {% for color in site.colors %} {{ color[0] }} {% endfor %} @@ -42,7 +42,7 @@ A small count and labeling component. Please read the [official Bootstrap docume ## Empty badges -{% example html %} +{% example %} {% for color in site.colors %} {% endfor %} diff --git a/pages/_docs/form-helpers.md b/pages/_docs/form-helpers.md new file mode 100644 index 00000000..9b380478 --- /dev/null +++ b/pages/_docs/form-helpers.md @@ -0,0 +1,9 @@ +--- +title: Form helpers +--- + +## Input help + +{% example %} +? +{% endexample %} diff --git a/pages/_docs/spinners.md b/pages/_docs/spinners.md index 683184a7..feedbf91 100644 --- a/pages/_docs/spinners.md +++ b/pages/_docs/spinners.md @@ -5,14 +5,14 @@ menu: docs.spinners ## Default markup -{% example html %} +{% example %} {% include ui/spinner.html %} {% endexample %} ## Colors -{% example html %} +{% example %} {% for color in site.colors %} {% assign c = color[0] %} {% include ui/spinner.html color=c %} @@ -21,18 +21,18 @@ menu: docs.spinners ## Size -{% example html %} +{% example %} {% include ui/spinner.html %} {% include ui/spinner.html size="sm" %} {% endexample %} ## Growing spinner -{% example html %} +{% example %} {% include ui/spinner.html type="grow" %} {% endexample %} -{% example html %} +{% example %} {% for color in site.colors %} {% assign c = color[0] %} {% include ui/spinner.html color=c type="grow" %} diff --git a/pages/_docs/steps.md b/pages/_docs/steps.md index 2f43988f..5ad605ba 100644 --- a/pages/_docs/steps.md +++ b/pages/_docs/steps.md @@ -7,31 +7,31 @@ Steps are progress indicators of a sequence of task steps. ## Default markup -{% example html %} +{% example %} {% include ui/steps.html show-title=true %} {% endexample %} ## Tooltips -{% example html %} +{% example %} {% include ui/steps.html show-title=true show-tooltip=true %} {% endexample %} ## Color -{% example html %} +{% example %} {% include ui/steps.html color="green" show-title=true %} {% include ui/steps.html color="red" show-title=true %} {% endexample %} ## Steps without title -{% example html %} +{% example %} {% include ui/steps.html show-tooltip=true %} {% endexample %} ## Steps with numbers -{% example html %} +{% example %} {% include ui/steps.html count=5 active=2 numbers=true color="lime" %} {% endexample %} diff --git a/pages/_docs/tables.md b/pages/_docs/tables.md index 6cc7e58a..9e2a2613 100644 --- a/pages/_docs/tables.md +++ b/pages/_docs/tables.md @@ -9,7 +9,7 @@ A basic Bootstrap table has a light padding and only horizontal dividers. The `.table` class adds basic styling to a table: -{% example html %} +{% example %} {% include ui/table.html %} {% endexample %} @@ -17,6 +17,6 @@ The `.table` class adds basic styling to a table: Prevents table cell content from wrapping to another line. -{% example html %} +{% example %} {% include ui/table.html nowrap=true responsive=true %} {% endexample %} diff --git a/pages/_docs/toasts.md b/pages/_docs/toasts.md index ca5118c7..f88b4842 100644 --- a/pages/_docs/toasts.md +++ b/pages/_docs/toasts.md @@ -7,6 +7,6 @@ The toast component is like an alert box that is only shown for a couple of seco ## Default markup -{% example html %} +{% example %} {% include ui/toast.html %} {% endexample %} diff --git a/pages/_docs/typography.md b/pages/_docs/typography.md index 307d2d1a..c7e562c9 100644 --- a/pages/_docs/typography.md +++ b/pages/_docs/typography.md @@ -8,7 +8,7 @@ description: Documentation and examples for common text utilities to control ali Easily realign text to components with text alignment classes. -{% example html %} +{% example %}

Left aligned text on all viewport sizes.

Center aligned text on all viewport sizes.

Right aligned text on all viewport sizes.

@@ -19,7 +19,7 @@ Easily realign text to components with text alignment classes. Transform text in components with text capitalization classes. -{% example html %} +{% example %}

Lowercased text.

Uppercased text.

Capitalized text.

@@ -29,7 +29,7 @@ Transform text in components with text capitalization classes. Utilities for controlling the tracking (letter spacing) of an element. -{% example html %} +{% example %}

Lorem ipsum dolor sit amet. Tight letter spacing.

Lorem ipsum dolor sit amet. Normal letter spacing.

Lorem ipsum dolor sit amet. Wide letter spacing.

@@ -39,18 +39,29 @@ Utilities for controlling the tracking (letter spacing) of an element. Utilities for controlling the leading (line height) of an element. -{% example html %} +{% example %}

Lorem ipsum dolor sit amet.
Dolor sit amet.

Lorem ipsum dolor sit amet.
Dolor sit amet.

Lorem ipsum dolor sit amet.
Dolor sit amet.

Lorem ipsum dolor sit amet.
Dolor sit amet.

{% endexample %} -## Basic elements +## Antialiasing + +Utilities for controlling the font smoothing of an element. + +Use the `.antialiased` utility to render text using subpixel antialiasing or use the `.subpixel-antialiased` render without antialiasing. + +{% example %} +
Text with antialiasing
+
Text without antialiasing
+{% endexample %} + +## Markdown elements When you can't use the CSS classes you want, or when you just want to directly use HTML tags, use `.markdown` as container. It can handle almost any HTML tag. -{% example html %} +{% example %}

Hello World

Lorem ipsum[1] dolor sit amet, consectetur adipiscing elit. Nulla accumsan, metus ultrices eleifend gravida, nulla nunc varius lectus, nec rutrum justo nibh eu lectus. Ut vulputate semper dui. Fusce erat odio, sollicitudin vel erat vel, interdum mattis neque. Subscript works as well!

diff --git a/pages/_includes/layout/menu.html b/pages/_includes/layout/menu.html index e388f8e0..8817d503 100644 --- a/pages/_includes/layout/menu.html +++ b/pages/_includes/layout/menu.html @@ -19,9 +19,9 @@