From 807c1b6d068c95bb076ffaac8542665065fb054b Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Mon, 5 Nov 2018 13:24:55 +0200 Subject: [PATCH] Add an examples layout. Reduces duplication and makes maintenance easier. --- site/_includes/stylesheet.html | 8 +- site/_layouts/examples.html | 40 ++ site/docs/4.1/examples/album/index.html | 387 +++++------ site/docs/4.1/examples/blog/index.html | 387 +++++------ site/docs/4.1/examples/carousel/index.html | 325 +++++---- .../4.1/examples/checkout/form-validation.js | 20 + site/docs/4.1/examples/checkout/index.html | 474 ++++++------- site/docs/4.1/examples/cover/index.html | 82 +-- site/docs/4.1/examples/dashboard/dashboard.js | 53 ++ site/docs/4.1/examples/dashboard/index.html | 530 +++++++-------- .../4.1/examples/floating-labels/index.html | 70 +- site/docs/4.1/examples/grid/index.html | 235 +++---- site/docs/4.1/examples/jumbotron/index.html | 165 ++--- .../4.1/examples/navbar-bottom/index.html | 96 ++- .../docs/4.1/examples/navbar-fixed/index.html | 93 +-- .../4.1/examples/navbar-static/index.html | 93 +-- site/docs/4.1/examples/navbars/index.html | 639 +++++++++--------- site/docs/4.1/examples/offcanvas/index.html | 270 ++++---- site/docs/4.1/examples/pricing/index.html | 239 +++---- site/docs/4.1/examples/product/index.html | 298 ++++---- site/docs/4.1/examples/sign-in/index.html | 57 +- .../4.1/examples/starter-template/index.html | 107 ++- .../examples/sticky-footer-navbar/index.html | 113 ++-- .../4.1/examples/sticky-footer/index.html | 54 +- 24 files changed, 2230 insertions(+), 2605 deletions(-) create mode 100644 site/_layouts/examples.html create mode 100644 site/docs/4.1/examples/checkout/form-validation.js create mode 100644 site/docs/4.1/examples/dashboard/dashboard.js diff --git a/site/_includes/stylesheet.html b/site/_includes/stylesheet.html index ad04d86782..3846f9fe1c 100644 --- a/site/_includes/stylesheet.html +++ b/site/_includes/stylesheet.html @@ -1,12 +1,16 @@ -{% if jekyll.environment == "production" %} +{%- if jekyll.environment == "production" %} {% else %} -{% endif %} +{% endif -%} +{%- if page.layout == "docs" or page.layout != "examples" -%} {% if page.layout == "docs" %} {% endif %} +{% if page.layout != "examples" %} +{% endif %} +{%- endif -%} diff --git a/site/_layouts/examples.html b/site/_layouts/examples.html new file mode 100644 index 0000000000..257b36df1b --- /dev/null +++ b/site/_layouts/examples.html @@ -0,0 +1,40 @@ + + + + + + + + + {{ page.title | smartify }} · {{ site.title | smartify }} + + {% include stylesheet.html %} + + {%- for css in page.extra_css %} + + + {%- endfor %} + + + {{ content }} + + {%- if page.include_js != false -%} + + + + {%- if jekyll.environment == "production" -%} + + {%- else -%} + + {%- endif -%} + + {%- if page.include_holder == true -%} + + {%- endif -%} + + {%- for js in page.extra_js %} + + {%- endfor %} + {%- endif -%} + + diff --git a/site/docs/4.1/examples/album/index.html b/site/docs/4.1/examples/album/index.html index 77123eb1e8..b5aaf2ca9a 100644 --- a/site/docs/4.1/examples/album/index.html +++ b/site/docs/4.1/examples/album/index.html @@ -1,231 +1,208 @@ - - - - - - - - +--- +layout: examples +title: Album example +extra_css: "album.css" +include_holder: true +--- - Album example for Bootstrap +
+ + +
- - +
- - - +
+
+

Album example

+

Something short and leading about the collection below—its contents, the creator, etc. Make it short and sweet, but not too short so folks don't simply skip over it entirely.

+

+ Main call to action + Secondary action +

+
+
- +
+
-
-
- -
- -
-
-

Album example

-

Something short and leading about the collection below—its contents, the creator, etc. Make it short and sweet, but not too short so folks don't simply skip over it entirely.

-

- Main call to action - Secondary action -

+
+
+ Card image cap +
+

This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.

+
+
+ + +
+ 9 mins +
+
+
-
-
-
+
+
+ Card image cap +
+

This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.

+
+
+ + +
+ 9 mins +
+
+
+
+
+
+ Card image cap +
+

This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.

+
+
+ + +
+ 9 mins +
+
+
+
+
+
+ Card image cap +
+

This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.

+
+
+ + +
+ 9 mins +
+
+
+
-
-
-
- Card image cap -
-

This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.

-
-
- - -
- 9 mins -
+
+
+ Card image cap +
+

This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.

+
+
+ +
+ 9 mins
-
-
- Card image cap -
-

This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.

-
-
- - -
- 9 mins -
+
+
+
+
+ Card image cap +
+

This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.

+
+
+ +
+ 9 mins
-
-
- Card image cap -
-

This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.

-
-
- - -
- 9 mins -
-
-
-
- -
-
- Card image cap -
-

This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.

-
-
- - -
- 9 mins -
-
-
-
-
-
- Card image cap -
-

This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.

-
-
- - -
- 9 mins -
-
-
-
-
-
- Card image cap -
-

This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.

-
-
- - -
- 9 mins -
-
-
-
- -
-
- Card image cap -
-

This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.

-
-
- - -
- 9 mins -
-
-
-
-
-
- Card image cap -
-

This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.

-
-
- - -
- 9 mins -
-
-
-
-
-
- Card image cap -
-

This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.

-
-
- - -
- 9 mins -
+
+
+
+
+ Card image cap +
+

This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.

+
+
+ +
+ 9 mins
+
+
-
+
- - - - - - - - - - + diff --git a/site/docs/4.1/examples/blog/index.html b/site/docs/4.1/examples/blog/index.html index cffde77372..8448033a18 100644 --- a/site/docs/4.1/examples/blog/index.html +++ b/site/docs/4.1/examples/blog/index.html @@ -1,230 +1,201 @@ - - - - - - - - +--- +layout: examples +title: Blog Template +extra_css: + - "https://fonts.googleapis.com/css?family=Playfair+Display:700,900" + - "blog.css" +include_holder: true +--- - Blog Template for Bootstrap - - - - - - - - - - - -
-
-
-
- Subscribe -
-
- -
- -
-
- - + diff --git a/site/docs/4.1/examples/pricing/index.html b/site/docs/4.1/examples/pricing/index.html index 204b3b18cd..20357c61a6 100644 --- a/site/docs/4.1/examples/pricing/index.html +++ b/site/docs/4.1/examples/pricing/index.html @@ -1,141 +1,110 @@ - - - - - - - - +--- +layout: examples +title: Pricing example +extra_css: "pricing.css" +include_js: false +--- - Pricing example for Bootstrap +
+
Company name
+ + Sign up +
- - +
+

Pricing

+

Quickly build an effective pricing table for your potential customers with this Bootstrap example. It's built with default Bootstrap components and utilities with little customization.

+
- - - - - - -
-
Company name
- - Sign up -
- -
-

Pricing

-

Quickly build an effective pricing table for your potential customers with this Bootstrap example. It's built with default Bootstrap components and utilities with little customization.

-
- -
-
-
-
-

Free

-
-
-

$0 / mo

-
    -
  • 10 users included
  • -
  • 2 GB of storage
  • -
  • Email support
  • -
  • Help center access
  • -
- -
-
-
-
-

Pro

-
-
-

$15 / mo

-
    -
  • 20 users included
  • -
  • 10 GB of storage
  • -
  • Priority email support
  • -
  • Help center access
  • -
- -
-
-
-
-

Enterprise

-
-
-

$29 / mo

-
    -
  • 30 users included
  • -
  • 15 GB of storage
  • -
  • Phone and email support
  • -
  • Help center access
  • -
- -
-
+
+
+
+
+

Free

+
+
+

$0 / mo

+
    +
  • 10 users included
  • +
  • 2 GB of storage
  • +
  • Email support
  • +
  • Help center access
  • +
+
- -
+
+
+

Pro

+
+
+

$15 / mo

+
    +
  • 20 users included
  • +
  • 10 GB of storage
  • +
  • Priority email support
  • +
  • Help center access
  • +
+ +
+
+
+
+

Enterprise

+
+
+

$29 / mo

+
    +
  • 30 users included
  • +
  • 15 GB of storage
  • +
  • Phone and email support
  • +
  • Help center access
  • +
+ +
+
+
- - - - - - - - - - + +
diff --git a/site/docs/4.1/examples/product/index.html b/site/docs/4.1/examples/product/index.html index b18fc903b8..ffba581929 100644 --- a/site/docs/4.1/examples/product/index.html +++ b/site/docs/4.1/examples/product/index.html @@ -1,177 +1,145 @@ - - - - - - - - +--- +layout: examples +title: Product example +extra_css: "product.css" +--- - Product example for Bootstrap + - - +
+
+

Punny headline

+

And an even wittier subheading to boot. Jumpstart your marketing efforts with this example based on Apple's marketing pages.

+ Coming soon +
+
+
+
- - - - - - - - -
-
-

Punny headline

-

And an even wittier subheading to boot. Jumpstart your marketing efforts with this example based on Apple's marketing pages.

- Coming soon -
-
-
+
+
+
+

Another headline

+

And an even wittier subheading.

- -
-
-
-

Another headline

-

And an even wittier subheading.

-
-
-
-
-
-

Another headline

-

And an even wittier subheading.

-
-
-
+
+
+
+
+

Another headline

+

And an even wittier subheading.

+
+
+
-
-
-
-

Another headline

-

And an even wittier subheading.

-
-
-
-
-
-

Another headline

-

And an even wittier subheading.

-
-
-
+
+
+
+

Another headline

+

And an even wittier subheading.

- -
-
-
-

Another headline

-

And an even wittier subheading.

-
-
-
-
-
-

Another headline

-

And an even wittier subheading.

-
-
-
+
+
+
+
+

Another headline

+

And an even wittier subheading.

+
+
+
-
-
-
-

Another headline

-

And an even wittier subheading.

-
-
-
-
-
-

Another headline

-

And an even wittier subheading.

-
-
-
+
+
+
+

Another headline

+

And an even wittier subheading.

+
+
+
+
+

Another headline

+

And an even wittier subheading.

+
+
+
+
- +
+
+
+

Another headline

+

And an even wittier subheading.

+
+
+
+
+
+

Another headline

+

And an even wittier subheading.

+
+
+
+
- - - - - - - - - - + diff --git a/site/docs/4.1/examples/sign-in/index.html b/site/docs/4.1/examples/sign-in/index.html index 2c94366436..be03ad7054 100644 --- a/site/docs/4.1/examples/sign-in/index.html +++ b/site/docs/4.1/examples/sign-in/index.html @@ -1,36 +1,23 @@ - - - - - - - - +--- +layout: examples +title: Signin Template +extra_css: "signin.css" +body_class: "text-center" +include_js: false +--- - Signin Template for Bootstrap - - - - - - - - - - - - + diff --git a/site/docs/4.1/examples/starter-template/index.html b/site/docs/4.1/examples/starter-template/index.html index f70179fd04..299637fc67 100644 --- a/site/docs/4.1/examples/starter-template/index.html +++ b/site/docs/4.1/examples/starter-template/index.html @@ -1,70 +1,47 @@ - - - - - - - - +--- +layout: examples +title: Starter Template +extra_css: "starter-template.css" +--- - Starter Template for Bootstrap + - - - +
- +
+

Bootstrap starter template

+

Use this document as a way to quickly start any new project.
All you get is this text and a mostly barebones HTML document.

+
- - -
- -
-

Bootstrap starter template

-

Use this document as a way to quickly start any new project.
All you get is this text and a mostly barebones HTML document.

-
- -
- - - - - - - - +
diff --git a/site/docs/4.1/examples/sticky-footer-navbar/index.html b/site/docs/4.1/examples/sticky-footer-navbar/index.html index 01a1c52704..034a7552b8 100644 --- a/site/docs/4.1/examples/sticky-footer-navbar/index.html +++ b/site/docs/4.1/examples/sticky-footer-navbar/index.html @@ -1,70 +1,49 @@ - - - - - - - - +--- +layout: examples +title: Sticky Footer Navbar Template +extra_css: "sticky-footer-navbar.css" +html_class: "h-100" +body_class: "d-flex flex-column h-100" +--- - Sticky Footer Navbar Template for Bootstrap +
+ + +
- - + +
+
+

Sticky footer with fixed navbar

+

Pin a footer to the bottom of the viewport in desktop browsers with this custom HTML and CSS. A fixed navbar has been added with padding-top: 60px; on the main > .container.

+

Back to the default sticky footer minus the navbar.

+
+
- - - - - - -
- - -
- - -
-
-

Sticky footer with fixed navbar

-

Pin a footer to the bottom of the viewport in desktop browsers with this custom HTML and CSS. A fixed navbar has been added with padding-top: 60px; on the main > .container.

-

Back to the default sticky footer minus the navbar.

-
-
- -
-
- Place sticky footer content here. -
-
- - - - - - - - +
+
+ Place sticky footer content here. +
+
diff --git a/site/docs/4.1/examples/sticky-footer/index.html b/site/docs/4.1/examples/sticky-footer/index.html index 868211c195..828f7a5217 100644 --- a/site/docs/4.1/examples/sticky-footer/index.html +++ b/site/docs/4.1/examples/sticky-footer/index.html @@ -1,36 +1,22 @@ - - - - - - - - +--- +layout: examples +title: Sticky Footer Template +extra_css: "sticky-footer.css" +html_class: "h-100" +body_class: "d-flex flex-column h-100" +--- - Sticky Footer Template for Bootstrap + +
+
+

Sticky footer

+

Pin a footer to the bottom of the viewport in desktop browsers with this custom HTML and CSS.

+

Use the sticky footer with a fixed navbar if need be, too.

+
+
- - - - - - - - - - -
-
-

Sticky footer

-

Pin a footer to the bottom of the viewport in desktop browsers with this custom HTML and CSS.

-

Use the sticky footer with a fixed navbar if need be, too.

-
-
- -
-
- Place sticky footer content here. -
-
- - +