diff --git a/bedrock.config.js b/bedrock.config.js index 31f26c9..297cdbb 100644 --- a/bedrock.config.js +++ b/bedrock.config.js @@ -5,6 +5,17 @@ */ module.exports = { + /** + * Page tree generation: existence of this section + * determines whether the page tree gets generated + */ + pageTree: { + layoutStyle: 'sidebar' // 'sidebar' or 'fixed' + }, + /** + * CSS and JS minification + * Adjust these values to set up your project for production or dev + */ js: { minify: false }, @@ -13,39 +24,44 @@ module.exports = { minify: false, purge: false }, + /** + * Styleguide generation: existence of this section + * determines whether the styleguide gets generated + */ styleguide: { + /** + * search [boolean] + * Feature flag for search feature + */ search: true, colors: './content/scss/_colors.scss', + /** + * categoryOrder + * Determines the order of documentation categories + */ categoryOrder: [ 'Style guide', 'Design patterns', 'Components' ], + /** + * componentCategories + * The prefix on folder names in /components determines the category + */ componentCategories: { aov: 'Overviews', c: 'Components', } }, + /** + * Icon + * Set up whether Bedrock should generate icon fonts + * Set up CSS classnames for SVG icons and icon font + */ icons: { generateIconFont: false, iconFontPath: "./content/scss/_icon-font.scss", svgIconClassPrefix: 'o-svg-icon', iconFontClassPrefix: 'if' }, - pug: { - pretty: true, - basedir: "./content" - }, - prettify: { - indentWithTabs: true, - preserveNewlines: true, - inline: '', - logSuccess: false, - indentSize: 2, - unformatted: ['pre', 'textarea'], - extraLiners: ['body'] - }, - express: { - port: 8000, - }, }; diff --git a/content/templates/_layouts/master.pug b/content/templates/_layouts/master.pug index 84b957c..3f740b7 100644 --- a/content/templates/_layouts/master.pug +++ b/content/templates/_layouts/master.pug @@ -45,10 +45,16 @@ html(dir="ltr" lang="en" class=htmlClass ? htmlClass : '') body(class=bodyClass ? bodyClass : '') - .br-prototype-wrapper - include ../../../core/templates/includes/prototype-nav - .br-prototype-content - block body + if config.pageTree && config.pageTree.layoutStyle == 'sidebar' + .br-prototype-wrapper + include ../../../core/templates/includes/prototype-nav + .br-prototype-content + block body + else + block body + if config.pageTree && config.pageTree.layoutStyle == 'fixed' + .br-pagetree-fixed-wrapper + include ../../../core/templates/includes/prototype-nav = "\n" script(src='/js/bundle-prototype.js') diff --git a/core/discovery/config.js b/core/discovery/config.js index 77ced8c..1f9db83 100644 --- a/core/discovery/config.js +++ b/core/discovery/config.js @@ -1,4 +1,7 @@ const DEFAULT_CONFIG = { + pageTree: { + layoutStyle: 'sidebar' + }, js: { minify: false }, diff --git a/core/scss/prototype.scss b/core/scss/prototype.scss index fabc010..1ed409b 100644 --- a/core/scss/prototype.scss +++ b/core/scss/prototype.scss @@ -39,6 +39,17 @@ $br-styleguide-content-padding-left: 4.8rem*$br-rem-multiplier !default; @import "../../content/scss/br-variables-override"; + +/* Fixed layout + ========================================================================== */ + +.br-pagetree-fixed-wrapper { + position: fixed; + right: 0; + bottom: 0; + height: 100vh; +} + /* Basic setup ========================================================================== */