umberto 1.14.0 → 1.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -0
- package/package.json +4 -3
- package/scripts/helper/normalize-badges.js +26 -0
- package/scripts/helper/u-toc.js +10 -1
- package/scripts/utils/normalizebadges.js +50 -0
- package/scripts/utils/parselinks.js +81 -33
- package/src/tasks/compile-sass.js +35 -4
- package/themes/umberto/layout/_mixin/nav-tree-item.pug +5 -1
- package/themes/umberto/layout/_mixin/nav-tree-level.pug +4 -0
- package/themes/umberto/layout/_partial/head.pug +2 -0
- package/themes/umberto/layout/index.pug +1 -1
- package/themes/umberto/layout/page.pug +1 -1
- package/themes/umberto/layout/sdk.pug +1 -1
- package/themes/umberto/source/assets/_img/star-in-circle.svg +1 -0
- package/themes/umberto/src/css/_api-props-filter.scss +1 -1
- package/themes/umberto/src/css/_badge.scss +1 -1
- package/themes/umberto/src/css/_collapsinglist.scss +2 -2
- package/themes/umberto/src/css/_content.scss +2 -2
- package/themes/umberto/src/css/_footer.scss +1 -1
- package/themes/umberto/src/css/_formatted.scss +5 -5
- package/themes/umberto/src/css/_guide-content.scss +1 -1
- package/themes/umberto/src/css/_notice.scss +4 -4
- package/themes/umberto/src/css/_secondary-navigation.scss +1 -1
- package/themes/umberto/src/css/_toggler.scss +2 -2
- package/themes/umberto/src/css/_top.scss +5 -5
- package/themes/umberto/src/css/_tree.scss +21 -3
- package/themes/umberto/src/css/helpers/_color.scss +3 -3
- package/themes/umberto/src/css/helpers/_font.scss +1 -1
- package/themes/umberto/src/css/helpers/_globals.scss +2 -2
- package/themes/umberto/src/css/styles.scss +9 -1
- package/themes/umberto/src/js/_tooltips.js +39 -0
- package/themes/umberto/src/js/app.js +4 -1
- package/CHANGELOG.md +0 -1322
package/README.md
CHANGED
|
@@ -258,6 +258,8 @@ title: Overview [optional]
|
|
|
258
258
|
slug: overview [optional]
|
|
259
259
|
order: 10 [optional]
|
|
260
260
|
toc: false [optional]
|
|
261
|
+
toc-limit: 5 [optional]
|
|
262
|
+
badges: [ premium, ... ] [optional]
|
|
261
263
|
sitenav: false [optional]
|
|
262
264
|
feedback-widget: false [optional]
|
|
263
265
|
menu-title: Overview whatever [optional]
|
|
@@ -306,6 +308,10 @@ Can be set to sort the guides within the same category. If skipped, guides are s
|
|
|
306
308
|
|
|
307
309
|
If defined and set to `false`, table of contents will not be rendered.
|
|
308
310
|
|
|
311
|
+
#### toc-limit [optional]
|
|
312
|
+
|
|
313
|
+
If defined and set to `0` or greater integer, the table of contents will be limited to the defined depth (e.g. for value `2`, only `<h2>` and `<h3>` headings will be shown in the table of contents). Value `0` is an equivalent of using `toc: false`.
|
|
314
|
+
|
|
309
315
|
#### sitenav [optional]
|
|
310
316
|
|
|
311
317
|
If defined and set to `false`, there will be no left-side navigation and main content will be centered.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "umberto",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.18.0",
|
|
4
4
|
"description": "CKSource Documentation builder",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"files": [
|
|
@@ -42,14 +42,15 @@
|
|
|
42
42
|
"medium-zoom": "^1.0.5",
|
|
43
43
|
"mkdirp": "^1.0.4",
|
|
44
44
|
"moment": "^2.27.0",
|
|
45
|
-
"node-sass": "^4.14.1",
|
|
46
45
|
"nyc": "15.1.0",
|
|
47
46
|
"pug": "^3.0.0",
|
|
47
|
+
"sass": "^1.43.4",
|
|
48
48
|
"sitemap": "^6.1.6",
|
|
49
|
+
"tippy.js": "^6.3.2",
|
|
49
50
|
"tree-model": "^1.0.7",
|
|
50
51
|
"upath": "^2.0.0",
|
|
51
52
|
"vnu-jar": "^20.5.29",
|
|
52
|
-
"webpack": "^
|
|
53
|
+
"webpack": "^5.58.1"
|
|
53
54
|
},
|
|
54
55
|
"devDependencies": {
|
|
55
56
|
"@ckeditor/ckeditor5-dev-env": "^21.0.0",
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2017-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
'use strict';
|
|
7
|
+
|
|
8
|
+
const normalizeBadges = require( '../utils/normalizebadges' );
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Normalizes badged in page configuration
|
|
12
|
+
*
|
|
13
|
+
* badges: [ premium, badgeFoo, unknownBadge ]
|
|
14
|
+
*
|
|
15
|
+
* to Pug-friendly format with unknown badges filtered out:
|
|
16
|
+
*
|
|
17
|
+
* [
|
|
18
|
+
* { name: 'premium', label: 'Premium feature' },
|
|
19
|
+
* { name: 'foo', label: 'A foo page label' }
|
|
20
|
+
* ]
|
|
21
|
+
*
|
|
22
|
+
* @protected
|
|
23
|
+
* @param {Object} data
|
|
24
|
+
* @return {Array.<Object>}
|
|
25
|
+
*/
|
|
26
|
+
hexo.extend.helper.register( 'normalizeBadges', normalizeBadges );
|
package/scripts/helper/u-toc.js
CHANGED
|
@@ -9,7 +9,16 @@ const cheerio = require( 'cheerio' );
|
|
|
9
9
|
|
|
10
10
|
hexo.extend.helper.register( 'uToc', ( data, options = {} ) => {
|
|
11
11
|
const $ = cheerio.load( data );
|
|
12
|
-
|
|
12
|
+
|
|
13
|
+
let usedHeadings = [ 'h2', 'h3', 'h4', 'h5', 'h6' ];
|
|
14
|
+
|
|
15
|
+
if ( options.tocLimit >= 0 ) {
|
|
16
|
+
usedHeadings = usedHeadings.slice( 0, options.tocLimit );
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
usedHeadings = usedHeadings.join( ',' );
|
|
20
|
+
|
|
21
|
+
const headings = $( usedHeadings )
|
|
13
22
|
.filter( function() {
|
|
14
23
|
return !$( this ).parents( '.live-snippet, .collapsing-list__item' ).length;
|
|
15
24
|
} );
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2017-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
'use strict';
|
|
7
|
+
|
|
8
|
+
const KNOWN_BADGES = {
|
|
9
|
+
premium: {
|
|
10
|
+
name: 'premium',
|
|
11
|
+
label: 'Premium feature'
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Normalizes badged in page configuration
|
|
17
|
+
*
|
|
18
|
+
* badges: [ premium, badgeFoo, unknownBadge ]
|
|
19
|
+
*
|
|
20
|
+
* to Pug-friendly format with unknown badges filtered out:
|
|
21
|
+
*
|
|
22
|
+
* [
|
|
23
|
+
* { name: 'premium', label: 'Premium feature' },
|
|
24
|
+
* { name: 'foo', label: 'A foo page label' }
|
|
25
|
+
* ]
|
|
26
|
+
*
|
|
27
|
+
* @protected
|
|
28
|
+
* @param {Object} data
|
|
29
|
+
* @return {Array.<Object>}
|
|
30
|
+
*/
|
|
31
|
+
module.exports = function normalizeBadges( data ) {
|
|
32
|
+
if ( !data.badges ) {
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
return data.badges
|
|
37
|
+
.filter( badgeName => {
|
|
38
|
+
if ( !KNOWN_BADGES[ badgeName ] ) {
|
|
39
|
+
console.warn(
|
|
40
|
+
`Warning: Unknown badge "${ badgeName }" set for the page "${ data.title }". ` +
|
|
41
|
+
`Known badges are: ${ Object.keys( KNOWN_BADGES ).map( badgeName => `"${ badgeName }"` ).join( ', ' ) }`
|
|
42
|
+
);
|
|
43
|
+
|
|
44
|
+
return false;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
return true;
|
|
48
|
+
} )
|
|
49
|
+
.map( badgeName => KNOWN_BADGES[ badgeName ] );
|
|
50
|
+
};
|
|
@@ -19,10 +19,7 @@ const LINK_REGEXP = /\\?{(?:@linkapi|@link|@linksdk|@linkexample)\s+[^{]+?({[^}]
|
|
|
19
19
|
* @return {Boolean}
|
|
20
20
|
*/
|
|
21
21
|
module.exports = function parseLinks( page, hexo ) {
|
|
22
|
-
|
|
23
|
-
return;
|
|
24
|
-
}
|
|
25
|
-
|
|
22
|
+
const isSilentError = hexo.projectGlobals.common._disabledFilters.has( parseLinks.name );
|
|
26
23
|
const relativeUrlHelper = hexo.extend.helper.store.relative_url;
|
|
27
24
|
|
|
28
25
|
page.content = page.content.replace( LINK_REGEXP, match => {
|
|
@@ -30,11 +27,11 @@ module.exports = function parseLinks( page, hexo ) {
|
|
|
30
27
|
return match.replace( /^\\{/, '{' ).replace( /\\}$/, '}' );
|
|
31
28
|
}
|
|
32
29
|
if ( match.includes( 'module:' ) || match.includes( '@linkapi' ) ) {
|
|
33
|
-
return linkToApi( match, page, hexo, { relativeUrlHelper } );
|
|
30
|
+
return linkToApi( match, page, hexo, { relativeUrlHelper, isSilentError } );
|
|
34
31
|
} else if ( match.includes( '@linksdk' ) || match.includes( '@linkexample' ) ) {
|
|
35
|
-
return linkToSdk( match, page, hexo, { relativeUrlHelper } );
|
|
32
|
+
return linkToSdk( match, page, hexo, { relativeUrlHelper, isSilentError } );
|
|
36
33
|
} else {
|
|
37
|
-
return linkToGuide( match, page, hexo, { relativeUrlHelper } );
|
|
34
|
+
return linkToGuide( match, page, hexo, { relativeUrlHelper, isSilentError } );
|
|
38
35
|
}
|
|
39
36
|
} );
|
|
40
37
|
|
|
@@ -47,18 +44,27 @@ module.exports = function parseLinks( page, hexo ) {
|
|
|
47
44
|
* @param {Object} hexo
|
|
48
45
|
* @param {Object} options
|
|
49
46
|
* @param {Function} options.relativeUrlHelper
|
|
47
|
+
* @param {Boolean} options.isSilentError
|
|
50
48
|
*/
|
|
51
|
-
function linkToApi( str, data, hexo, { relativeUrlHelper } ) {
|
|
49
|
+
function linkToApi( str, data, hexo, { relativeUrlHelper, isSilentError } ) {
|
|
52
50
|
const linkMatchResult = str.match( /^{((?:@linkapi|@link)[\s\S]+)}$/ );
|
|
53
51
|
|
|
54
52
|
if ( !linkMatchResult ) {
|
|
55
|
-
return onError(
|
|
53
|
+
return onError( {
|
|
54
|
+
value: str,
|
|
55
|
+
source: data.source,
|
|
56
|
+
isSilent: isSilentError
|
|
57
|
+
} );
|
|
56
58
|
}
|
|
57
59
|
|
|
58
60
|
const linkContentMatchResult = linkMatchResult[ 1 ].match( /^(?:@linkapi|@link)\s*(?:@(\w+))*\s*(\S+)\s*([\s\S]*)$/ );
|
|
59
61
|
|
|
60
62
|
if ( !linkContentMatchResult ) {
|
|
61
|
-
return onError(
|
|
63
|
+
return onError( {
|
|
64
|
+
value: str,
|
|
65
|
+
source: data.source,
|
|
66
|
+
isSilent: isSilentError
|
|
67
|
+
} );
|
|
62
68
|
}
|
|
63
69
|
|
|
64
70
|
const projectName = linkContentMatchResult[ 1 ] || data.projectName;
|
|
@@ -72,14 +78,16 @@ function linkToApi( str, data, hexo, { relativeUrlHelper } ) {
|
|
|
72
78
|
}
|
|
73
79
|
|
|
74
80
|
if ( !itemName ) {
|
|
75
|
-
return onError(
|
|
81
|
+
return onError( {
|
|
82
|
+
value: str,
|
|
83
|
+
source: data.source,
|
|
84
|
+
isSilent: isSilentError
|
|
85
|
+
} );
|
|
76
86
|
}
|
|
77
87
|
|
|
78
88
|
const baseItemName = getBaseItemName( itemName );
|
|
79
|
-
|
|
80
89
|
const hashWithoutPrefix = itemName.replace( baseItemName, '' ).slice( 1 );
|
|
81
90
|
const hash = hashWithoutPrefix ? `#${ hashWithoutPrefix }` : '';
|
|
82
|
-
|
|
83
91
|
const project = hexo.projectGlobals[ projectName ];
|
|
84
92
|
|
|
85
93
|
let apiSlug;
|
|
@@ -89,7 +97,12 @@ function linkToApi( str, data, hexo, { relativeUrlHelper } ) {
|
|
|
89
97
|
} else if ( isIgnoredProject( projectName, hexo ) || hexo.projectGlobals.common.isSingleProject ) {
|
|
90
98
|
return str;
|
|
91
99
|
} else {
|
|
92
|
-
return onError(
|
|
100
|
+
return onError( {
|
|
101
|
+
value: str,
|
|
102
|
+
source: data.source,
|
|
103
|
+
isSilent: isSilentError,
|
|
104
|
+
description: `Project ${ chalk.redBright( projectName ) } is not defined.`
|
|
105
|
+
} );
|
|
93
106
|
}
|
|
94
107
|
|
|
95
108
|
const basePath = projectName === data.projectName ?
|
|
@@ -125,9 +138,12 @@ function linkToApi( str, data, hexo, { relativeUrlHelper } ) {
|
|
|
125
138
|
// When link tag follows notation: ...SomeClass#methodName, then must use 'extraId' as the hash.
|
|
126
139
|
href = relativeUrlHelper( data.path, upath.join( basePath, apiSlug, fileName + `#${ docletByBaseAndHash.extraId }` ) );
|
|
127
140
|
} else {
|
|
128
|
-
onError(
|
|
129
|
-
|
|
130
|
-
|
|
141
|
+
return onError( {
|
|
142
|
+
value: str,
|
|
143
|
+
source: data.source,
|
|
144
|
+
isSilent: isSilentError,
|
|
145
|
+
description: 'No doclet found. Link remain not transformed.'
|
|
146
|
+
} );
|
|
131
147
|
}
|
|
132
148
|
}
|
|
133
149
|
|
|
@@ -170,13 +186,18 @@ function getFileName( itemName ) {
|
|
|
170
186
|
* @param {Object} hexo
|
|
171
187
|
* @param {Object} options
|
|
172
188
|
* @param {Function} options.relativeUrlHelper
|
|
189
|
+
* @param {Boolean} options.isSilentError
|
|
173
190
|
*/
|
|
174
|
-
function linkToSdk( str, data, hexo, { relativeUrlHelper } ) {
|
|
191
|
+
function linkToSdk( str, data, hexo, { relativeUrlHelper, isSilentError } ) {
|
|
175
192
|
const regExp = /(?:@linksdk|@linkexample) (?:@(\w+) )?(\w+)(?:\.html)?(#\S+)? ([^}]+)/;
|
|
176
193
|
const match = regExp.exec( str );
|
|
177
194
|
|
|
178
195
|
if ( !match ) {
|
|
179
|
-
return onError(
|
|
196
|
+
return onError( {
|
|
197
|
+
value: str,
|
|
198
|
+
source: data.source,
|
|
199
|
+
isSilent: isSilentError
|
|
200
|
+
} );
|
|
180
201
|
}
|
|
181
202
|
|
|
182
203
|
const projectName = match[ 1 ] ? match[ 1 ] : data.projectName;
|
|
@@ -196,13 +217,18 @@ function linkToSdk( str, data, hexo, { relativeUrlHelper } ) {
|
|
|
196
217
|
* @param {Object} hexo
|
|
197
218
|
* @param {Object} options
|
|
198
219
|
* @param {Function} options.relativeUrlHelper
|
|
220
|
+
* @param {Boolean} options.isSilentError
|
|
199
221
|
*/
|
|
200
|
-
function linkToGuide( str, data, hexo, { relativeUrlHelper } ) {
|
|
222
|
+
function linkToGuide( str, data, hexo, { relativeUrlHelper, isSilentError } ) {
|
|
201
223
|
const rgxp = /@link(?:\s+@(\w+))?\s+([^}\s]+)\s*([^}]*)}/;
|
|
202
224
|
const match = rgxp.exec( str );
|
|
203
225
|
|
|
204
226
|
if ( !match ) {
|
|
205
|
-
return onError(
|
|
227
|
+
return onError( {
|
|
228
|
+
value: str,
|
|
229
|
+
source: data.source,
|
|
230
|
+
isSilent: isSilentError
|
|
231
|
+
} );
|
|
206
232
|
}
|
|
207
233
|
|
|
208
234
|
const pathToGuideSplit = match[ 2 ].split( '#' );
|
|
@@ -215,9 +241,14 @@ function linkToGuide( str, data, hexo, { relativeUrlHelper } ) {
|
|
|
215
241
|
if ( shouldIgnoreGuideLink( match, data, projectName, hexo ) ) {
|
|
216
242
|
if ( isIgnoredProject( projectName, hexo ) || hexo.projectGlobals.common.isSingleProject ) {
|
|
217
243
|
return str;
|
|
218
|
-
} else {
|
|
219
|
-
return onError( str, data.source, `Project ${ chalk.redBright( projectName ) } is not defined.` );
|
|
220
244
|
}
|
|
245
|
+
|
|
246
|
+
return onError( {
|
|
247
|
+
value: str,
|
|
248
|
+
source: data.source,
|
|
249
|
+
isSilent: isSilentError,
|
|
250
|
+
description: `Project ${ chalk.redBright( projectName ) } is not defined.`
|
|
251
|
+
} );
|
|
221
252
|
}
|
|
222
253
|
|
|
223
254
|
const projectBasePath = match[ 1 ] ? hexo.projectGlobals[ projectName ].BASE_PATH : data.BASE_PATH;
|
|
@@ -228,7 +259,11 @@ function linkToGuide( str, data, hexo, { relativeUrlHelper } ) {
|
|
|
228
259
|
targetPath = upath.join( projectBasePath, 'index.html' );
|
|
229
260
|
} else {
|
|
230
261
|
if ( !pagePaths ) {
|
|
231
|
-
return onError(
|
|
262
|
+
return onError( {
|
|
263
|
+
value: str,
|
|
264
|
+
source: data.source,
|
|
265
|
+
isSilent: isSilentError
|
|
266
|
+
} );
|
|
232
267
|
}
|
|
233
268
|
|
|
234
269
|
// pathToGuide is guide's physical path in project directory before being processed by hexo.
|
|
@@ -241,7 +276,11 @@ function linkToGuide( str, data, hexo, { relativeUrlHelper } ) {
|
|
|
241
276
|
} );
|
|
242
277
|
|
|
243
278
|
if ( !pagePathData && pathToGuide !== 'index' ) {
|
|
244
|
-
return onError(
|
|
279
|
+
return onError( {
|
|
280
|
+
value: str,
|
|
281
|
+
source: data.source,
|
|
282
|
+
isSilent: isSilentError
|
|
283
|
+
} );
|
|
245
284
|
}
|
|
246
285
|
|
|
247
286
|
targetPath = pagePathData.newDataPath;
|
|
@@ -252,15 +291,24 @@ function linkToGuide( str, data, hexo, { relativeUrlHelper } ) {
|
|
|
252
291
|
return `<a href=${ href }${ hash }>${ linkText }</a>`;
|
|
253
292
|
}
|
|
254
293
|
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
294
|
+
/**
|
|
295
|
+
* @param {String} value An expression that could not be transformed into a link.
|
|
296
|
+
* @param {String} source A path to the file where the link was found.
|
|
297
|
+
* @param {Boolean} [isSilent] Whether to report an error when conversion into the link failed.
|
|
298
|
+
* @param {String} [description] Optional message describing the error.
|
|
299
|
+
* @return {String}
|
|
300
|
+
*/
|
|
301
|
+
function onError( { value, source, isSilent, description } ) {
|
|
302
|
+
if ( !isSilent ) {
|
|
303
|
+
process.exitCode = 1;
|
|
304
|
+
|
|
305
|
+
console.log(
|
|
306
|
+
`${ chalk.red( 'Error: ' ) }Failed while convert ${ chalk.cyanBright( value ) } tag in ` +
|
|
307
|
+
`${ chalk.magentaBright( source ) }.${ description ? chalk.italic( ' ' + description ) : '' }`
|
|
308
|
+
);
|
|
309
|
+
}
|
|
262
310
|
|
|
263
|
-
return
|
|
311
|
+
return value;
|
|
264
312
|
}
|
|
265
313
|
|
|
266
314
|
function isIgnoredProject( projectName, hexo ) {
|
|
@@ -5,16 +5,47 @@
|
|
|
5
5
|
|
|
6
6
|
'use strict';
|
|
7
7
|
|
|
8
|
-
const sass = require( '
|
|
8
|
+
const sass = require( 'sass' );
|
|
9
9
|
const fs = require( 'fs-extra' );
|
|
10
10
|
const upath = require( 'upath' );
|
|
11
11
|
|
|
12
12
|
module.exports = ( src, dst ) => {
|
|
13
13
|
return new Promise( ( resolve, reject ) => {
|
|
14
|
-
|
|
14
|
+
const options = {
|
|
15
15
|
file: src,
|
|
16
|
-
outputStyle: 'compressed'
|
|
17
|
-
|
|
16
|
+
outputStyle: 'compressed',
|
|
17
|
+
importer( url, file, done ) {
|
|
18
|
+
// In case of an import from the `node_modules` directory.
|
|
19
|
+
if ( url.startsWith( '~' ) ) {
|
|
20
|
+
// Resolve the path regarding the current working directory.
|
|
21
|
+
const absolutePath = require.resolve( url.substr( 1 ) );
|
|
22
|
+
|
|
23
|
+
return fs.readFile( absolutePath, 'utf-8', ( err, data ) => {
|
|
24
|
+
if ( err ) {
|
|
25
|
+
return done( err );
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
return done( {
|
|
29
|
+
contents: data
|
|
30
|
+
} );
|
|
31
|
+
} );
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
// Import a local file (a relative path).
|
|
35
|
+
const directory = upath.dirname( file );
|
|
36
|
+
|
|
37
|
+
// Replace "directory/filename" with "directory/_filename.scss".
|
|
38
|
+
const fileName = url.replace( /(.+)(?:\/(.+))$/, ( match, dirName, fileName ) => {
|
|
39
|
+
return dirName + '/_' + fileName + '.scss';
|
|
40
|
+
} );
|
|
41
|
+
|
|
42
|
+
return done( {
|
|
43
|
+
file: upath.join( directory, fileName )
|
|
44
|
+
} );
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
sass.render( options, ( err, result ) => {
|
|
18
49
|
if ( err ) {
|
|
19
50
|
return reject( err );
|
|
20
51
|
}
|
|
@@ -6,4 +6,8 @@ mixin navTreeItem( data )
|
|
|
6
6
|
div( class=_class )
|
|
7
7
|
span( class="tree__item--guide tree__item__text" ) #{ menuTitle }
|
|
8
8
|
- if( data.shouldDisplayNewIndicator )
|
|
9
|
-
span( class="tree__item__badge tree__item__badge_new" ) New
|
|
9
|
+
span( class="tree__item__badge tree__item__badge_new" data-badge-tooltip="New or updated content" ) New
|
|
10
|
+
- if( data.badges )
|
|
11
|
+
each badge in normalizeBadges( data )
|
|
12
|
+
span( class="tree__item__badge tree__item__badge_" + badge.name data-badge-tooltip=badge.label )
|
|
13
|
+
span( class="tree__item__badge__text" ) #{ badge.label }
|
|
@@ -21,6 +21,10 @@ mixin navTreeLevel( data, isRoot )
|
|
|
21
21
|
li
|
|
22
22
|
div.tree__item__wrapper
|
|
23
23
|
span( class="tree__item--folder tree__item__text" ) #{ data.name }
|
|
24
|
+
- if( data.badges )
|
|
25
|
+
each badge in normalizeBadges( data )
|
|
26
|
+
span( class="tree__item__badge tree__item__badge_" + badge.name data-badge-tooltip=badge.label )
|
|
27
|
+
span( class="tree__item__badge__text" ) #{ badge.label }
|
|
24
28
|
ul.tree__item-nested-list
|
|
25
29
|
each item in dataArr
|
|
26
30
|
//- Categories have a property 'name', guides don't have property 'name'.
|
|
@@ -15,6 +15,8 @@ if ( page[ 'twitter-card' ] || ogConfig.description )
|
|
|
15
15
|
meta( name='twitter:card' content= page[ 'twitter-card' ] || ogConfig.description )
|
|
16
16
|
meta( name='twitter:site' content= '@ckeditor' )
|
|
17
17
|
|
|
18
|
+
meta( name= 'x-generated-at' content= Date() )
|
|
19
|
+
|
|
18
20
|
if ( mainOg || ( projectLocals && projectLocals.og ) || page[ 'og-description' ] )
|
|
19
21
|
meta( property='og:title' content= page[ 'og-title' ] || title )
|
|
20
22
|
if ( ogConfig.description || page[ 'og-description' ] )
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg width="16" height="16" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><defs><filter x="-11.8%" y="-7.1%" width="123.7%" height="119%" filterUnits="objectBoundingBox" id="c"><feOffset dy="1" in="SourceAlpha" result="shadowOffsetOuter1"/><feGaussianBlur stdDeviation=".5" in="shadowOffsetOuter1" result="shadowBlurOuter1"/><feColorMatrix values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.0784203589 0" in="shadowBlurOuter1"/></filter><rect id="a" x="0" y="0" width="16" height="16" rx="8"/><path id="d" d="m8 11.12-4.114 2.543 1.147-4.699-3.69-3.127 4.823-.361L8 1l1.834 4.476 4.823.361-3.69 3.127 1.147 4.699z"/></defs><g fill="none" fill-rule="evenodd"><mask id="b" fill="#fff"><use xlink:href="#a"/></mask><use fill="#EAA930" xlink:href="#a"/><path fill-opacity=".243" fill="#FFF400" mask="url(#b)" d="M-4-3H8v21H-4z"/><g mask="url(#b)"><use fill="#000" filter="url(#c)" xlink:href="#d"/><use fill="#FFF" xlink:href="#d"/></g></g></svg>
|
|
@@ -185,7 +185,7 @@ ul.collapsing-list {
|
|
|
185
185
|
overflow: hidden;
|
|
186
186
|
height: $u-line-height-base + em;
|
|
187
187
|
white-space: nowrap;
|
|
188
|
-
margin-bottom: u-spacing( 0 )
|
|
188
|
+
margin-bottom: math.div( u-spacing( 0 ), 2 );
|
|
189
189
|
}
|
|
190
190
|
}
|
|
191
191
|
|
|
@@ -233,7 +233,7 @@ ul.collapsing-list {
|
|
|
233
233
|
&__dev-names {
|
|
234
234
|
code#{&}--active {
|
|
235
235
|
display: block;
|
|
236
|
-
color: u-color( 'text', 40 );
|
|
236
|
+
color: u-color( 'text', 40% );
|
|
237
237
|
font-size: u-font-size( -1 );
|
|
238
238
|
cursor: default;
|
|
239
239
|
}
|
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
|
|
81
81
|
h1 {
|
|
82
82
|
&:first-of-type {
|
|
83
|
-
margin-bottom: u-spacing( 0 )
|
|
83
|
+
margin-bottom: math.div( u-spacing( 0 ), 2 );
|
|
84
84
|
}
|
|
85
85
|
}
|
|
86
86
|
|
|
@@ -124,7 +124,7 @@
|
|
|
124
124
|
font-size: 0.9em;
|
|
125
125
|
padding: 0;
|
|
126
126
|
margin: -0.4em 0 0 0;
|
|
127
|
-
color: u-color( 'text', 50 );
|
|
127
|
+
color: u-color( 'text', 50% );
|
|
128
128
|
|
|
129
129
|
&--hidden {
|
|
130
130
|
display: none;
|
|
@@ -146,9 +146,9 @@
|
|
|
146
146
|
kbd {
|
|
147
147
|
display: inline-block;
|
|
148
148
|
background: u-color( 'background-dark' );
|
|
149
|
-
border: solid 1px u-border-color( 'background-hue', 5 );
|
|
150
|
-
border-bottom-color: u-border-color( 'background-hue', -5 );
|
|
151
|
-
box-shadow: inset 0 -1px 0 u-border-color( 'background-hue', -5 );
|
|
149
|
+
border: solid 1px u-border-color( 'background-hue', 5% );
|
|
150
|
+
border-bottom-color: u-border-color( 'background-hue', -5% );
|
|
151
|
+
box-shadow: inset 0 -1px 0 u-border-color( 'background-hue', -5% );
|
|
152
152
|
font-family: $u-font-face-mono;
|
|
153
153
|
font-size: .8em; // 12px;
|
|
154
154
|
padding: u-spacing( -3 ) u-spacing( -2 );
|
|
@@ -173,7 +173,7 @@
|
|
|
173
173
|
margin-bottom: 0;
|
|
174
174
|
|
|
175
175
|
&:last-of-type {
|
|
176
|
-
margin-bottom: u-spacing( 0 )
|
|
176
|
+
margin-bottom: math.div( u-spacing( 0 ), 3 );
|
|
177
177
|
}
|
|
178
178
|
}
|
|
179
179
|
|
|
@@ -211,7 +211,7 @@
|
|
|
211
211
|
}
|
|
212
212
|
|
|
213
213
|
td, th {
|
|
214
|
-
border: 1px solid u-border-color( 'background-dark', 20 );
|
|
214
|
+
border: 1px solid u-border-color( 'background-dark', 20% );
|
|
215
215
|
padding: 6px 12px;
|
|
216
216
|
}
|
|
217
217
|
|
|
@@ -28,8 +28,8 @@ p.tip {
|
|
|
28
28
|
width: $u-top-icon-width;
|
|
29
29
|
height: $u-top-icon-width;
|
|
30
30
|
position: absolute;
|
|
31
|
-
left: ($u-top-icon-width*2 - $u-top-icon-width
|
|
32
|
-
top: $u-top-icon-width
|
|
31
|
+
left: ( $u-top-icon-width * 2 - math.div( $u-top-icon-width, 2 ) ) * -1;
|
|
32
|
+
top: math.div( $u-top-icon-width, 2 );
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
@include u-responsive-narrow {
|
|
@@ -41,8 +41,8 @@ p.tip {
|
|
|
41
41
|
width: $u-top-icon-width;
|
|
42
42
|
height: $u-top-icon-width;
|
|
43
43
|
position: absolute;
|
|
44
|
-
left: $u-top-icon-width - $u-top-icon-width
|
|
45
|
-
top: $u-top-icon-width
|
|
44
|
+
left: $u-top-icon-width - math.div( $u-top-icon-width, 2 );
|
|
45
|
+
top: math.div( $u-top-icon-width, 2 );
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
48
|
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
|
|
24
24
|
&:hover {
|
|
25
25
|
&::before {
|
|
26
|
-
border-color: transparent transparent transparent u-color( 'toggler', -8 );
|
|
26
|
+
border-color: transparent transparent transparent u-color( 'toggler', -8% );
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
29
|
}
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
|
|
38
38
|
&:hover {
|
|
39
39
|
&::before {
|
|
40
|
-
border-color: u-color( 'toggler', -8 ) transparent transparent transparent;
|
|
40
|
+
border-color: u-color( 'toggler', -8% ) transparent transparent transparent;
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
43
|
}
|