From f8d7a075fa0b28b299e33c1bdc2a9d25dd668847 Mon Sep 17 00:00:00 2001 From: Yan Zhu Date: Sun, 20 May 2018 09:57:10 +0800 Subject: Move more Docs pages to Pug --- docs/src/contents/responsive.pug | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 docs/src/contents/responsive.pug (limited to 'docs/src/contents/responsive.pug') diff --git a/docs/src/contents/responsive.pug b/docs/src/contents/responsive.pug new file mode 100644 index 0000000..e69de29 -- cgit v1.3.1-26-gb76a From 17423a6156ba7cdc4de6744b0098d61702111101 Mon Sep 17 00:00:00 2001 From: Yan Zhu Date: Sun, 3 Jun 2018 21:48:19 +0800 Subject: Update responsive and navbar to new Pug templates --- docs/layout.html | 332 +++++++++++++++++++++++++++++++++++++++ docs/src/contents/navbar.pug | 66 ++++++++ docs/src/contents/responsive.pug | 254 ++++++++++++++++++++++++++++++ 3 files changed, 652 insertions(+) (limited to 'docs/src/contents/responsive.pug') diff --git a/docs/layout.html b/docs/layout.html index 7878690..95f95f2 100644 --- a/docs/layout.html +++ b/docs/layout.html @@ -327,9 +327,341 @@

Responsive

+

Spectre provides a neat responsive layout grid system and responsive visibility utilities.

+
+
+
col-10
col-lg-8
col-md-6
col-sm-4
+
+
+
col-2
col-lg-4
col-md-6
col-sm-8
+
+
+

There are col-xs-<1-12>, col-sm-<1-12>, col-md-<1-12>, col-lg-<1-12> and col-xl-<1-12> available for flexible grid across mobile, tablet and desktop viewport usage.

+
    +
  • col-xs-<1-12> apply to window width smaller than or equal to 480px.
  • +
  • col-sm-<1-12> apply to window width smaller than or equal to 600px.
  • +
  • col-md-<1-12> apply to window width smaller than or equal to 840px.
  • +
  • col-lg-<1-12> apply to window width smaller than or equal to 960px.
  • +
  • col-xl-<1-12> apply to window width smaller than or equal to 1280px.
  • +
  • col-<1-12> apply to all window width, including the width wider than 1280px.
  • +
+
<div class="container">
+  <div class="columns">
+    <div class="column col-xs-6">col-xs-6</div>
+    <div class="column col-xs-3">col-xs-3</div>
+    <div class="column col-xs-3">col-xs-3</div>
+  </div>
+</div>
+
+

Responsive container

+

+ The responsive layout also provides fixed-width containers. + Use grid-xs(480px), grid-sm(600px), grid-md(840px), grid-lg(960px) or grid-xl(1280px) to the container for a fixed-width container with the specific max-width. +

+
<!-- 100% width container with max-width set to grid-lg (960px) -->
+<div class="container grid-lg">
+  <div class="columns">
+    ...
+  </div>
+</div>
+
+

Responsive visibility

+

The responsive visibility utilities help show and hide elements on specific viewport sizes.

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
size-xssize-smsize-mdsize-lgsize-xl
hide-xs +
+
+
+
+
+
+
+
+
+
hide-sm +
+
+
+
+
+
+
+
+
+
hide-md +
+
+
+
+
+
+
+
+
+
hide-lg +
+
+
+
+
+
+
+
+
+
hide-xl +
+
+
+
+
+
+
+
+
+
+
+
+

For hiding elements on specific viewport sizes, there are classes hide-xs, hide-sm, hide-md, hide-lg and hide-xl available.

+
    +
  • hide-xs hides elements when the window width is smaller than or equal to 480px.
  • +
  • hide-sm hides elements when the window width is smaller than or equal to 600px.
  • +
  • hide-md hides elements when the window width is smaller than or equal to 840px.
  • +
  • hide-lg hides elements when the window width is smaller than or equal to 960px.
  • +
  • hide-xl hides elements when the window width is smaller than or equal to 1280px.
  • +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
size-xssize-smsize-mdsize-lgsize-xl
show-xs +
+
+
+
+
+
+
+
+
+
show-sm +
+
+
+
+
+
+
+
+
+
show-md +
+
+
+
+
+
+
+
+
+
show-lg +
+
+
+
+
+
+
+
+
+
show-xl +
+
+
+
+
+
+
+
+
+
+
+
+

For showing elements on specific viewport sizes, there are classes show-xs, show-sm, show-md, show-lg and show-xl available.

+
    +
  • show-xs shows elements when the window width is smaller than or equal to 480px.
  • +
  • show-sm shows elements when the window width is smaller than or equal to 600px.
  • +
  • show-md shows elements when the window width is smaller than or equal to 840px.
  • +
  • show-lg shows elements when the window width is smaller than or equal to 960px.
  • +
  • show-xl shows elements when the window width is smaller than or equal to 1280px.
  • +
+

+ Spectre also has a responsive web test tool Responsive Resizer. + You can clone the GitHub Repo to use it locally or use it online. +

+

Responsive Resizer

diff --git a/docs/src/contents/navbar.pug b/docs/src/contents/navbar.pug index e69de29..21d13e4 100644 --- a/docs/src/contents/navbar.pug +++ b/docs/src/contents/navbar.pug @@ -0,0 +1,66 @@ +p Navbar is a layout container that appears in the header of apps and websites. + +.columns + .column + .navbar + .navbar-section + a.navbar-brand.mr-2(href="#navbar") Spectre.css + a.btn.btn-link(href="#navbar") Docs + a.btn.btn-link(href="https://github.com/picturepan2/spectre") GitHub + .navbar-section + .input-group.input-inline + input.form-input(type="text" placeholder="search") + button.btn.btn-primary.input-group-btn Search + +p + | The navbar component can include logo brand, nav links and buttons, search box or any combination of those elements. + | Each section with the #[code navbar-section] class will be evenly distributed in the container. + +pre.code(data-lang='HTML') + code + :highlight(lang="html") + + +p + | You can use #[code navbar-center] class to have a centered section. + +.columns + .column.col-12 + .navbar + .navbar-section + a.btn.btn-link(href="#navbar") Docs + a.btn.btn-link(href="#navbar") Examples + .navbar-center + img(src="img/spectre-logo.svg" alt="Spectre.css") + .navbar-section + a.btn.btn-link(href="https://twitter.com/spectrecss") Twitter + a.btn.btn-link(href="https://github.com/picturepan2/spectre") GitHub + +pre.code(data-lang='HTML') + code + :highlight(lang="html") + \ No newline at end of file diff --git a/docs/src/contents/responsive.pug b/docs/src/contents/responsive.pug index e69de29..8898958 100644 --- a/docs/src/contents/responsive.pug +++ b/docs/src/contents/responsive.pug @@ -0,0 +1,254 @@ +p Spectre provides a neat responsive layout grid system and responsive visibility utilities. + +.columns + .column.col-10.col-lg-8.col-md-6.col-sm-4 + .bg-gray.docs-block + | col-10 + br + | col-lg-8 + br + | col-md-6 + br + | col-sm-4 + .column.col-2.col-lg-4.col-md-6.col-sm-8 + .bg-gray.docs-block + | col-2 + br + | col-lg-4 + br + | col-md-6 + br + | col-sm-8 + +p + | There are #[code col-xs-<1-12>], #[code col-sm-<1-12>], #[code col-md-<1-12>], #[code col-lg-<1-12>] and #[code col-xl-<1-12>] available for flexible grid across mobile, tablet and desktop viewport usage. + +ul + li + | #[code col-xs-<1-12>] apply to window width smaller than or equal to #[strong 480px]. + li + | #[code col-sm-<1-12>] apply to window width smaller than or equal to #[strong 600px]. + li + | #[code col-md-<1-12>] apply to window width smaller than or equal to #[strong 840px]. + li + | #[code col-lg-<1-12>] apply to window width smaller than or equal to #[strong 960px]. + li + | #[code col-xl-<1-12>] apply to window width smaller than or equal to #[strong 1280px]. + li + | #[code col-<1-12>] apply to all window width, including the width wider than #[strong 1280px]. + +pre.code(data-lang='HTML') + code + :highlight(lang="html") +
+
+
col-xs-6
+
col-xs-3
+
col-xs-3
+
+
+ ++docs-subheading('responsive-container', 'Responsive container') + +p + | The responsive layout also provides fixed-width containers. + | Use #[code grid-xs](480px), #[code grid-sm](600px), #[code grid-md](840px), #[code grid-lg](960px) or #[code grid-xl](1280px) to the container for a fixed-width container with the specific max-width. + +pre.code(data-lang='HTML') + code + :highlight(lang="html") + +
+
+ ... +
+
+ ++docs-subheading('responsive-visibility', 'Responsive visibility') + +p The responsive visibility utilities help show and hide elements on specific viewport sizes. + +.columns + .column.col-12 + table.docs-table.table.table-striped.text-center + thead + tr + th + th size-xs + th size-sm + th size-md + th size-lg + th size-xl + tbody + tr + td.text-left hide-xs + td + .bg-secondary.docs-dot + td + .bg-primary.docs-dot + td + .bg-primary.docs-dot + td + .bg-primary.docs-dot + td + .bg-primary.docs-dot + tr + td.text-left hide-sm + td + .bg-secondary.docs-dot + td + .bg-secondary.docs-dot + td + .bg-primary.docs-dot + td + .bg-primary.docs-dot + td + .bg-primary.docs-dot + tr + td.text-left hide-md + td + .bg-secondary.docs-dot + td + .bg-secondary.docs-dot + td + .bg-secondary.docs-dot + td + .bg-primary.docs-dot + td + .bg-primary.docs-dot + tr + td.text-left hide-lg + td + .bg-secondary.docs-dot + td + .bg-secondary.docs-dot + td + .bg-secondary.docs-dot + td + .bg-secondary.docs-dot + td + .bg-primary.docs-dot + tr + td.text-left hide-xl + td + .bg-secondary.docs-dot + td + .bg-secondary.docs-dot + td + .bg-secondary.docs-dot + td + .bg-secondary.docs-dot + td + .bg-secondary.docs-dot + +p + | For hiding elements on specific viewport sizes, there are classes #[code hide-xs], #[code hide-sm], #[code hide-md], #[code hide-lg] and #[code hide-xl] available. + +ul + li + | #[code hide-xs] hides elements when the window width is smaller than or equal to #[strong 480px]. + li + | #[code hide-sm] hides elements when the window width is smaller than or equal to #[strong 600px]. + li + | #[code hide-md] hides elements when the window width is smaller than or equal to #[strong 840px]. + li + | #[code hide-lg] hides elements when the window width is smaller than or equal to #[strong 960px]. + li + | #[code hide-xl] hides elements when the window width is smaller than or equal to #[strong 1280px]. + +.columns + .column.col-12 + table.docs-table.table.table-striped.text-center + thead + tr + th + th size-xs + th size-sm + th size-md + th size-lg + th size-xl + tbody + tr + td.text-left show-xs + td + .bg-primary.docs-dot + td + .bg-secondary.docs-dot + td + .bg-secondary.docs-dot + td + .bg-secondary.docs-dot + td + .bg-secondary.docs-dot + tr + td.text-left show-sm + td + .bg-primary.docs-dot + td + .bg-primary.docs-dot + td + .bg-secondary.docs-dot + td + .bg-secondary.docs-dot + td + .bg-secondary.docs-dot + tr + td.text-left show-md + td + .bg-primary.docs-dot + td + .bg-primary.docs-dot + td + .bg-primary.docs-dot + td + .bg-secondary.docs-dot + td + .bg-secondary.docs-dot + tr + td.text-left show-lg + td + .bg-primary.docs-dot + td + .bg-primary.docs-dot + td + .bg-primary.docs-dot + td + .bg-primary.docs-dot + td + .bg-secondary.docs-dot + tr + td.text-left show-xl + td + .bg-primary.docs-dot + td + .bg-primary.docs-dot + td + .bg-primary.docs-dot + td + .bg-primary.docs-dot + td + .bg-primary.docs-dot + +p + | For showing elements on specific viewport sizes, there are classes #[code show-xs], #[code show-sm], #[code show-md], #[code show-lg] and #[code show-xl] available. + +ul + li + | #[code show-xs] shows elements when the window width is smaller than or equal to #[strong 480px]. + li + | #[code show-sm] shows elements when the window width is smaller than or equal to #[strong 600px]. + li + | #[code show-md] shows elements when the window width is smaller than or equal to #[strong 840px]. + li + | #[code show-lg] shows elements when the window width is smaller than or equal to #[strong 960px]. + li + | #[code show-xl] shows elements when the window width is smaller than or equal to #[strong 1280px]. + +p + | Spectre also has a responsive web test tool Responsive Resizer. + | You can clone the + a(href="https://github.com/picturepan2/responsive-resizer" target="_blank") GitHub Repo + | to use it locally or use it online. +p + a.btn.btn-primary(href="https://picturepan2.github.io/responsive-resizer/" target="_blank") Responsive Resizer + -- cgit v1.3.1-26-gb76a From c67deb4708c44178c3a0ea46d8279da1672c32b7 Mon Sep 17 00:00:00 2001 From: Yan Zhu Date: Tue, 5 Jun 2018 21:31:02 +0800 Subject: Update docs demo margin --- docs/components.html | 70 +++++++++++++-------------- docs/dist/docs.css | 9 ++-- docs/dist/docs.min.css | 2 +- docs/elements.html | 96 +++++++++++++++++--------------------- docs/experimentals.html | 26 +++++------ docs/layout.html | 18 +++---- docs/src/contents/accordions.pug | 2 +- docs/src/contents/autocomplete.pug | 4 +- docs/src/contents/avatars.pug | 6 +-- docs/src/contents/badges.pug | 4 +- docs/src/contents/bars.pug | 7 +-- docs/src/contents/breadcrumbs.pug | 2 +- docs/src/contents/buttons.pug | 25 +++++----- docs/src/contents/calendars.pug | 4 +- docs/src/contents/cards.pug | 2 +- docs/src/contents/carousels.pug | 2 +- docs/src/contents/chips.pug | 2 +- docs/src/contents/colors.pug | 6 +-- docs/src/contents/comparison.pug | 2 +- docs/src/contents/cursor.pug | 2 +- docs/src/contents/divider.pug | 8 ++-- docs/src/contents/empty.pug | 2 +- docs/src/contents/filters.pug | 2 +- docs/src/contents/forms.pug | 49 +++++++++---------- docs/src/contents/grid.pug | 8 ++-- docs/src/contents/labels.pug | 2 +- docs/src/contents/loading.pug | 4 +- docs/src/contents/media.pug | 6 +-- docs/src/contents/menu.pug | 6 +-- docs/src/contents/meters.pug | 2 +- docs/src/contents/modals.pug | 6 +-- docs/src/contents/nav.pug | 2 +- docs/src/contents/navbar.pug | 4 +- docs/src/contents/off-canvas.pug | 2 +- docs/src/contents/pagination.pug | 4 +- docs/src/contents/panels.pug | 2 +- docs/src/contents/parallax.pug | 2 +- docs/src/contents/popovers.pug | 3 +- docs/src/contents/progress.pug | 2 +- docs/src/contents/responsive.pug | 6 +-- docs/src/contents/shapes.pug | 2 +- docs/src/contents/sliders.pug | 2 +- docs/src/contents/steps.pug | 2 +- docs/src/contents/tables.pug | 2 +- docs/src/contents/tabs.pug | 6 +-- docs/src/contents/tiles.pug | 4 +- docs/src/contents/timelines.pug | 2 +- docs/src/contents/toasts.pug | 4 +- docs/src/contents/tooltips.pug | 2 +- docs/src/contents/typography.pug | 6 +-- docs/src/scss/docs.scss | 9 ++-- docs/utilities.html | 20 ++++---- 52 files changed, 222 insertions(+), 252 deletions(-) (limited to 'docs/src/contents/responsive.pug') diff --git a/docs/components.html b/docs/components.html index 4185433..f30a70e 100644 --- a/docs/components.html +++ b/docs/components.html @@ -132,7 +132,7 @@

Accordions

Accordions are used to toggle sections of content.

-
+
@@ -239,7 +239,7 @@

Avatars

Avatars are user profile pictures.

-
+
Avatar XL
Avatar LG
@@ -264,7 +264,7 @@ Add the avatar class and avatar size class to <div> element. The data-initial attribute is the name appear inside the avatar.

-
+
AvatarAvatar
AvatarAvatar
@@ -290,7 +290,7 @@ <img src="img/avatar-1.png" alt="..."> </figure> -
+
@@ -312,7 +312,7 @@

Badges

Badges are often used as unread number indicators.

-
+
Notifications
Notifications
Notifications
@@ -323,7 +323,7 @@ The badge will appear in the top-right direction of the element.

If there is no data-badge or the attribute is not specified, the badge will appear as a dot.

-
+
@@ -361,21 +361,17 @@ Bars represent the progress of a task or the value within the known range. Bars are custom components for displaying HTML5 <progress>, <meter> and input range elements.

-
+
-
-
-
-
25%
@@ -403,7 +399,7 @@ </div>

Slider bars

-
+
@@ -411,8 +407,6 @@
-
-
@@ -449,7 +443,7 @@