|
1 | 1 | @import "locate://bit-docs-site/styles/variables.less";
|
2 | 2 |
|
3 | 3 | /**
|
4 |
| -* @stylesheet code.less Code Rendering |
5 |
| -* @parent Styles.baseline-elements |
6 |
| -* |
7 |
| -* @description |
8 |
| -* Enables both the layout of code wells, and also the syntax highlighting of the specific code language. Syntax coloring provided by prettify.js with the <a href="https://github.com/chriskempson/tomorrow-theme">Tomorrow Theme</a>. |
9 |
| -* |
10 |
| -* Code "wells" are styled based on the use of the `<pre>` and `<code>` tags around your desired code example. |
11 |
| -* |
12 |
| -* Below are a few examples in various languages. This is not an exhaustive list of supported languages. |
13 |
| -* |
14 |
| -* ### HTML |
15 |
| -* ``` |
16 |
| -* <pre> |
17 |
| - <code> |
18 |
| - <div class="example"><!--with a comment --> |
19 |
| - <h1>Example</h1> |
20 |
| - <p>This is some example code that is being styled.</p> |
21 |
| - </div> |
22 |
| - </code> |
23 |
| - </pre> |
24 |
| -* |
25 |
| -* ``` |
26 |
| -* ### JavaScript |
27 |
| -*``` |
28 |
| -var foo = require('f'), |
29 |
| - bar = require('br'), |
30 |
| - writeFile = f.denodify(br.writeFile), |
31 |
| - path = require('path'); |
32 |
| -
|
33 |
| -module.exports = function(littlePromise, options){ |
34 |
| - return littlePromise.then(function(little){ |
35 |
| - return writeFile( |
36 |
| - path.join(options.dest,'little.json'), |
37 |
| - JSON.stringify(little) ); |
38 |
| - }); |
39 |
| -}; |
40 |
| -* ``` |
41 |
| -* ### JSON |
42 |
| -*``` |
43 |
| -{ |
44 |
| - "sites": { |
45 |
| - "docs": { |
46 |
| - "key" : "value" |
47 |
| - } |
48 |
| - } |
49 |
| -} |
50 |
| -* ``` |
51 |
| -* |
52 |
| -**/ |
| 4 | + * @parent bit-docs-prettify/static |
| 5 | + * @module bit-docs-prettify/prettify.less |
| 6 | + * |
| 7 | + * @description Layout of code wells and syntax highlighting of code languages. |
| 8 | + * |
| 9 | + * @body |
| 10 | + * |
| 11 | + * Syntax highlighting and colors provided by |
| 12 | + * [JavaScript code prettifier](https://github.com/google/code-prettify) and |
| 13 | + * [Tomorrow Theme](https://github.com/chriskempson/tomorrow-theme). |
| 14 | + * |
| 15 | + * Code "wells" are styled based on the use of the `<pre>` and `<code>` tags |
| 16 | + * around your desired code example. |
| 17 | + * |
| 18 | + * Below are examples in a few of the supported languages. |
| 19 | + * |
| 20 | + * ### HTML |
| 21 | + * |
| 22 | + * ```html |
| 23 | + * <pre> |
| 24 | + * <code> |
| 25 | + * <div class="example"><!--with a comment --> |
| 26 | + * <h1>example</h1> |
| 27 | + * <p>this is some example code that is being styled.</p> |
| 28 | + * </div> |
| 29 | + * </code> |
| 30 | + * </pre> |
| 31 | + * |
| 32 | + * ``` |
| 33 | + * |
| 34 | + * ### JavaScript |
| 35 | + * |
| 36 | + *```js |
| 37 | + * var foo = require('f'), |
| 38 | + * bar = require('br'), |
| 39 | + * writefile = f.denodify(br.writefile), |
| 40 | + * path = require('path'); |
| 41 | + * |
| 42 | + * module.exports = function(littlepromise, options){ |
| 43 | + * return littlepromise.then(function(little){ |
| 44 | + * return writefile( |
| 45 | + * path.join(options.dest,'little.json'), |
| 46 | + * json.stringify(little) ); |
| 47 | + * }); |
| 48 | + * }; |
| 49 | + * ``` |
| 50 | + * |
| 51 | + * ### JSON |
| 52 | + * |
| 53 | + *```json |
| 54 | + * { |
| 55 | + * "sites": { |
| 56 | + * "docs": { |
| 57 | + * "key" : "value" |
| 58 | + * } |
| 59 | + * } |
| 60 | + * } |
| 61 | + * ``` |
| 62 | + */ |
53 | 63 | code {
|
54 | 64 | background-color: @colorCode;
|
55 | 65 | border-radius: 5px;
|
|
0 commit comments