diff --git a/Gruntfile.js b/Gruntfile.js index c6fe7982..717c0395 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -73,7 +73,7 @@ module.exports = function (grunt) { 'dist-css': 'dist/css', 'dist-js': 'dist/js', 'docs-dist-js': 'docs/dist/js', - 'docs-dist-css': 'docs/dist/css', + 'docs-dist-css': 'docs/dist/css' }, eslint: { @@ -263,6 +263,15 @@ module.exports = function (grunt) { }, copy: { + 'dist-to-docs': { // for example templates + expand: true, + cwd: 'dist', + src: [ + 'js/*.iife*', + 'css/*.*' + ], + dest: 'docs/dist/' + }, 'bs-docs-js-vendor': { expand: true, cwd: '../bootstrap/docs/assets/js/vendor', @@ -276,9 +285,7 @@ module.exports = function (grunt) { 'bs-docs-plugins': { expand: true, cwd: '../bootstrap/docs/_plugins', - src: [ - '**/*', '!bridge.rb' - ], + src: ['**/*', '!bridge.rb'], dest: 'docs/_plugins/' }, @@ -346,20 +353,6 @@ module.exports = function (grunt) { '**/*' ], dest: 'docs/content/' - }, - 'bs-docs-examples': { - options: { - // //https://regex101.com/r/cZ7aO8/2 - process: function (content, srcpath) { - return content.replace(/(---[\s\S]+?---)([\s\S]+)/mg, referenceDocNotice); - } - }, - expand: true, - cwd: '../bootstrap/docs/examples', - src: [ - '**/*' - ], - dest: 'docs/examples/' } }, @@ -608,7 +601,6 @@ module.exports = function (grunt) { 'copy:bs-docs-getting-started', 'copy:bs-docs-components', 'copy:bs-docs-content', - 'copy:bs-docs-examples', 'copy:bs-docs-plugins' ]); diff --git a/docs/_includes/footer-example.html b/docs/_includes/footer-example.html new file mode 100644 index 00000000..b28af1ba --- /dev/null +++ b/docs/_includes/footer-example.html @@ -0,0 +1,19 @@ + + + + +{% if site.data.minified %} + +{% else %} + +{% endif %} + + + + + + diff --git a/docs/_includes/header-example.html b/docs/_includes/header-example.html new file mode 100644 index 00000000..b2d2e262 --- /dev/null +++ b/docs/_includes/header-example.html @@ -0,0 +1,12 @@ +{% include meta.html %} + + + + + + +{% if site.data.minified %} + +{% else %} + +{% endif %} diff --git a/docs/_includes/header.html b/docs/_includes/header.html index 9053c1f5..528c804c 100644 --- a/docs/_includes/header.html +++ b/docs/_includes/header.html @@ -1,17 +1,4 @@ - - - - - - - - - {% if page.layout == "home" %} - {{ page.title }} - {% else %} - {{ page.title }} · Bootstrap Material Design - {% endif %} - +{% include meta.html %} diff --git a/docs/_includes/meta.html b/docs/_includes/meta.html new file mode 100644 index 00000000..7562fcf9 --- /dev/null +++ b/docs/_includes/meta.html @@ -0,0 +1,14 @@ + + + + + + + + + {% if page.layout == "home" %} + {{ page.title }} + {% else %} + {{ page.title }} · Bootstrap Material Design + {% endif %} + diff --git a/docs/_layouts/example.html b/docs/_layouts/example.html new file mode 100644 index 00000000..cbcd0220 --- /dev/null +++ b/docs/_layouts/example.html @@ -0,0 +1,11 @@ + + + + {% include header-example.html %} + + + {{ content }} + + {% include footer-example.html %} + + diff --git a/docs/examples/index.md b/docs/examples/index.md index 59dd9bd9..aa5028f9 100644 --- a/docs/examples/index.md +++ b/docs/examples/index.md @@ -3,31 +3,29 @@ layout: simple title: Examples --- -[//]: # DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by grunt docs-copy-bootstrap-docs - -{% callout info %} -**Bootstrap Reference Documentation** -This is a part of the reference documentation from Bootstrap. -It is included here to demonstrate rendering with Material Design for Bootstrap default styling. -See the Material Design section for more elements and customization options. -{% endcallout %} - - - -[Download the Bootstrap source code]({{ site.download.source }}) to snag these examples. - ## Framework Examples that focus on implementing uses of built-in components provided by Bootstrap.
+ +
+

Starter Template

+

Nothing but the basics: compiled CSS and JavaScript.

+ + launch Launch +
+ + +
diff --git a/docs/examples/screenshots/blog.jpg b/docs/examples/screenshots/blog.jpg index f206794f..e69de29b 100644 Binary files a/docs/examples/screenshots/blog.jpg and b/docs/examples/screenshots/blog.jpg differ diff --git a/docs/examples/screenshots/equal-height-columns.jpg b/docs/examples/screenshots/equal-height-columns.jpg index 81934d2e..e69de29b 100644 Binary files a/docs/examples/screenshots/equal-height-columns.jpg and b/docs/examples/screenshots/equal-height-columns.jpg differ diff --git a/docs/examples/screenshots/offcanvas.jpg b/docs/examples/screenshots/offcanvas.jpg index 339be846..e69de29b 100644 Binary files a/docs/examples/screenshots/offcanvas.jpg and b/docs/examples/screenshots/offcanvas.jpg differ diff --git a/docs/examples/starter-template/index.html b/docs/examples/starter-template/index.html deleted file mode 100644 index fe28223f..00000000 --- a/docs/examples/starter-template/index.html +++ /dev/null @@ -1,58 +0,0 @@ - - - - - - - - - - - - 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.

-
- -
- - - - - - - - - - - - diff --git a/docs/examples/starter-template/index.md b/docs/examples/starter-template/index.md new file mode 100644 index 00000000..fb900658 --- /dev/null +++ b/docs/examples/starter-template/index.md @@ -0,0 +1,12 @@ +--- +layout: example +title: Starter Template +group: material-design +--- + +
+ +

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/docs/examples/starter-template/starter-template.css b/docs/examples/starter-template/starter-template.css deleted file mode 100644 index 5f64cd29..00000000 --- a/docs/examples/starter-template/starter-template.css +++ /dev/null @@ -1,7 +0,0 @@ -body { - padding-top: 5rem; -} -.starter-template { - padding: 3rem 1.5rem; - text-align: center; -} diff --git a/docs/examples/test/index.md b/docs/examples/test/index.md new file mode 100644 index 00000000..0fecb494 --- /dev/null +++ b/docs/examples/test/index.md @@ -0,0 +1,7 @@ +--- +layout: example +title: Test +group: material-design +--- + +