diff --git a/content/templates/_components/c-example/03-with-source.md b/content/templates/_components/c-example/03-with-source.md new file mode 100644 index 00000000..43e88cce --- /dev/null +++ b/content/templates/_components/c-example/03-with-source.md @@ -0,0 +1,6 @@ +--- +title: Example (2) +source: Unofficial +--- + +Example of a component with a named source. diff --git a/content/templates/_components/c-example/03-with-source.pug b/content/templates/_components/c-example/03-with-source.pug new file mode 100644 index 00000000..ae9d5f32 --- /dev/null +++ b/content/templates/_components/c-example/03-with-source.pug @@ -0,0 +1,2 @@ +.example + p This is an example component with a named source. diff --git a/core/scss/prototype.scss b/core/scss/prototype.scss index 0b66778c..8424ea3b 100644 --- a/core/scss/prototype.scss +++ b/core/scss/prototype.scss @@ -521,4 +521,18 @@ $br-bordered-list-title-font-size: 1.5rem*$br-rem-multiplier !defa background-color: #FFF; } } -} \ No newline at end of file +} + +/* Category + ========================================================================== */ + +.br-sample-category { + background: #EEE; + display: inline-block; + border-radius: 12px; + padding: 0.2rem 0.8rem; + font-size: 90%; + margin: 0 0 0 1rem; + position: relative; + top: 0.7rem; +} diff --git a/core/templates/mixins/sample.pug b/core/templates/mixins/sample.pug index d0217f37..d5e5339f 100644 --- a/core/templates/mixins/sample.pug +++ b/core/templates/mixins/sample.pug @@ -3,6 +3,8 @@ mixin sample(component) .br-sample-header.br-sample-clearfix if component.docs h3.br-sample-heading(class=styleguideSampleHeadingClass)= component.docs.attributes.title || component.name + if component.docs.attributes.source + p.br-sample-category=component.docs.attributes.source else h3.br-sample-heading(class=styleguideSampleHeadingClass)= component.name a.br-sample-header-link(href="#component-"+component.name) # diff --git a/package.json b/package.json index 2739b517..4202b665 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "bedrock", - "version": "1.13", + "version": "1.13.0", "description": "Static site generator to easily make HTML prototypes", "main": "gulpfile.js", "scripts": { @@ -70,5 +70,6 @@ "vinyl-buffer": "^1.0.0", "vinyl-source-stream": "^1.1.0", "watchify": "^3.6.0" - } + }, + "dependencies": {} }