bsDocs components

This commit is contained in:
Kevin Ross 2016-03-09 10:23:01 -06:00
parent 21f2e45731
commit 68f61c8eb1
25 changed files with 155 additions and 108 deletions

View File

@ -303,38 +303,38 @@ module.exports = function (grunt) {
],
dest: 'docs/assets/scss/'
},
'bs-docs-components': {
options: {
//'bs-docs-components': {
// 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/components',
// src: [
// '**/*'
// ],
// dest: 'docs/components/'
//},
//'bs-docs-getting-started': {
// 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/components',
src: [
'**/*'
],
dest: 'docs/components/'
},
'bs-docs-getting-started': {
options: {
// https://regex101.com/r/cZ7aO8/2
process: function (content, srcpath) {
return content
// insert docs reference
.replace(/(---[\s\S]+?---)([\s\S]+)/mg, referenceDocNotice)
// remove sample text 'display' as this is a particular style and is confusing
.replace(/Fancy display heading/, 'Fancy heading');
}
},
expand: true,
cwd: '../bootstrap/docs/getting-started',
src: [
'browsers-devices.md' // only one file
],
dest: 'docs/getting-started/'
},
// process: function (content, srcpath) {
// return content
// // insert docs reference
// .replace(/(---[\s\S]+?---)([\s\S]+)/mg, referenceDocNotice)
// // remove sample text 'display' as this is a particular style and is confusing
// .replace(/Fancy display heading/, 'Fancy heading');
// }
// },
// expand: true,
// cwd: '../bootstrap/docs/getting-started',
// src: [
// 'browsers-devices.md' // only one file
// ],
// dest: 'docs/getting-started/'
//},
//'bs-docs-content': {
// options: {
// // https://regex101.com/r/cZ7aO8/2
@ -592,7 +592,7 @@ module.exports = function (grunt) {
grunt.registerTask('docs-copy-bootstrap-docs', [
'copy:bs-docs-js-vendor',
'copy:bs-docs-scss',
'copy:bs-docs-getting-started',
//'copy:bs-docs-getting-started',
'copy:bs-docs-components',
'copy:bs-docs-content',
'copy:bs-docs-plugins'

View File

@ -15,6 +15,7 @@ See the <a href="/material-design/buttons">Material Design</a> section for more
Provide contextual feedback messages for typical user actions with the handful of available and flexible alert messages.
## Contents

View File

@ -15,6 +15,7 @@ See the <a href="/material-design/buttons">Material Design</a> section for more
Indicate the current page's location within a navigational hierarchy. Separators are automatically added in CSS through [`::before`](https://developer.mozilla.org/en-US/docs/Web/CSS/::before) and [`content`](https://developer.mozilla.org/en-US/docs/Web/CSS/content).
{% example html %}

View File

@ -15,6 +15,7 @@ See the <a href="/material-design/buttons">Material Design</a> section for more
Use any button to trigger a dropdown menu by placing it within a `.btn-group` and providing the proper dropdown menu markup.
{% callout danger %}

View File

@ -15,6 +15,7 @@ See the <a href="/material-design/buttons">Material Design</a> section for more
Group a series of buttons together on a single line with the button group. Add on optional JavaScript radio and checkbox style behavior with [our buttons plugin]({{ site.baseurl }}/components/buttons/#button-plugin).
## Contents

View File

@ -16,6 +16,7 @@ See the <a href="/material-design/buttons">Material Design</a> section for more
Use Bootstrap's custom button styles for actions in forms, dialogs, and more. Includes support for a handful of contextual variations, sizes, states, and more.
## Contents

View File

@ -15,6 +15,7 @@ See the <a href="/material-design/buttons">Material Design</a> section for more
A **card** is a flexible and extensible content container. It includes options for headers and footers, a wide variety of content, contextual background colors, and powerful display options.
If you're familiar with Bootstrap 3, cards replace our old panels, wells, and thumbnails. Similar functionality to those components is available as modifier classes for cards.

View File

@ -15,6 +15,7 @@ See the <a href="/material-design/buttons">Material Design</a> section for more
A slideshow component for cycling through elements—images or slides of text—like a carousel. In browsers where the [Page Visibility API](http://www.w3.org/TR/page-visibility/) is supported, the carousel will avoid sliding when the webpage is not visible to the user (such as when the browser tab is inactive, the browser window is minimized, etc.). **Nested carousels are not supported.**
## Contents

View File

@ -15,6 +15,7 @@ See the <a href="/material-design/buttons">Material Design</a> section for more
The Bootstrap collapse plugin allows you to toggle content on your pages with a bit of JavaScript and some classes. Flexible plugin that utilizes a handful of classes (from the **required [transitions plugin]({{ site.baseurl }}/components/transitions/)**) for easy toggle behavior.
## Contents

View File

@ -15,6 +15,7 @@ See the <a href="/material-design/buttons">Material Design</a> section for more
Dropdowns are toggleable, contextual overlays for displaying lists of links and more. They're made interactive with the included Bootstrap dropdown JavaScript plugin. They're toggled by clicking, not by hovering; this is [an intentional design decision.](http://markdotto.com/2012/02/27/bootstrap-explained-dropdowns/)
## Contents

View File

@ -15,6 +15,7 @@ See the <a href="/material-design/buttons">Material Design</a> section for more
Bootstrap provides several form control styles, layout options, and custom components for creating a wide variety of forms.
## Contents

View File

@ -15,6 +15,7 @@ See the <a href="/material-design/buttons">Material Design</a> section for more
Easily extend form controls by adding text, buttons, or button groups on either side of textual `<input>`s.
## Contents

View File

@ -15,6 +15,7 @@ See the <a href="/material-design/buttons">Material Design</a> section for more
A lightweight, flexible component that can optionally extend the entire viewport to showcase key marketing messages on your site.
## Example

View File

@ -15,6 +15,7 @@ See the <a href="/material-design/buttons">Material Design</a> section for more
List groups are a flexible and powerful component for displaying not only simple lists of elements, but complex ones with custom content.
## Contents

View File

@ -15,6 +15,7 @@ See the <a href="/material-design/buttons">Material Design</a> section for more
Modals are streamlined, but flexible, dialog prompts with the minimum required functionality and smart defaults.
## Contents

View File

@ -15,6 +15,7 @@ See the <a href="/material-design/buttons">Material Design</a> section for more
The navbar is a simple wrapper for positioning branding, navigation, and other elements into a concise navigation header. It's easily extensible and, with the help of our collapse plugin, it can easily integrate offscreen content.
## Contents

View File

@ -15,6 +15,7 @@ See the <a href="/material-design/buttons">Material Design</a> section for more
Navigation available in Bootstrap share general markup and styles, from the base `.nav` class to the active and disabled states. Swap modifier classes to switch between each style.
## Contents

View File

@ -15,6 +15,7 @@ See the <a href="/material-design/buttons">Material Design</a> section for more
Provide pagination links for your site or app with the multi-page pagination component.
## Contents

View File

@ -15,6 +15,7 @@ See the <a href="/material-design/buttons">Material Design</a> section for more
Add small overlay content, like those found in iOS, to any element for housing secondary information.
## Contents

View File

@ -15,6 +15,7 @@ See the <a href="/material-design/buttons">Material Design</a> section for more
Stylize [the HTML5 `<progress>` element](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/progress) with a few extra classes and some crafty browser-specific CSS. Be sure to read up on the browser support.
## Contents

View File

@ -15,6 +15,7 @@ See the <a href="/material-design/buttons">Material Design</a> section for more
## Contents
* Will be replaced with the ToC, excluding the "Contents" header

View File

@ -15,6 +15,7 @@ See the <a href="/material-design/buttons">Material Design</a> section for more
Small and adaptive tag for adding context to just about any content.
## Example

View File

@ -15,6 +15,7 @@ See the <a href="/material-design/buttons">Material Design</a> section for more
Inspired by the excellent Tipsy jQuery plugin written by Jason Frame. Tooltips are an updated version, which don't rely on images, use CSS3 for animations, and data-attributes for local title storage.
## Contents

View File

@ -15,6 +15,7 @@ See the <a href="/material-design/buttons">Material Design</a> section for more
Bootstrap includes dozens of utilities—classes with a single purpose. They're designed to reduce the frequency of highly repetitive declarations in your CSS while allowing for quick and easy development.
## Contents

View File

@ -154,6 +154,12 @@ let docs = [
]
const docsProcess = (content, srcpath) => { // https://regex101.com/r/cZ7aO8/2
return content
.replace(/(---[\s\S]+?---)([\s\S]+)/mg, referenceDocNotice) // insert docs reference
.replace(/Fancy display heading/, 'Fancy heading') // remove sample text 'display' as this is a particular MD style and is confusing
}
let bsDocs = [
new Copy(gulp, docsPreset, docsConfig, {
task: {name: 'copy:bs-docs-content'},
@ -162,10 +168,28 @@ let bsDocs = [
glob: ['**/*']
},
dest: 'docs/content/',
process: (content, srcpath) => { // https://regex101.com/r/cZ7aO8/2
return content
.replace(/(---[\s\S]+?---)([\s\S]+)/mg, referenceDocNotice) // insert docs reference
.replace(/Fancy display heading/, 'Fancy heading') // remove sample text 'display' as this is a particular MD style and is confusing
}
})
process: docsProcess
}),
//new Copy(gulp, docsPreset, docsConfig, {
// task: {name: 'copy:bs-docs-getting-started'},
// source: {
// options: {cwd: '../bootstrap/docs/getting-started'},
// glob: ['**/*']
// },
// dest: 'docs/getting-started/',
// process: docsProcess
//}),
new Copy(gulp, docsPreset, docsConfig, {
task: {name: 'copy:bs-docs-components'},
source: {
options: {cwd: '../bootstrap/docs/components'},
glob: ['**/*']
},
dest: 'docs/components/',
process: docsProcess
}),
]
new TaskSeries(gulp, 'bsDocs', bsDocs)