-
Notifications
You must be signed in to change notification settings - Fork 2
/
fractal.js
84 lines (69 loc) · 2.26 KB
/
fractal.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
'use strict'
const path = require('path')
const mandelbrot = require('@frctl/mandelbrot')
const fractal = (module.exports = require('@frctl/fractal').create())
fractal.set('project.title', 'Prismic Slice-Machine')
fractal.components.set('path', path.join(__dirname, '/src/components'))
fractal.docs.set('path', path.join(__dirname, '/src/docs'))
fractal.web.set('static.path', path.join(__dirname, 'public'))
/****************************************************************************
* Fractal Status badges customizations
* Source: https://fractal.build/guide/core-concepts/statuses.html
****************************************************************************/
fractal.components.set('default.status', 'null');
fractal.components.set('statuses', {
prototype: {
label: "Prototype",
description: "Do not implement.",
color: "#FF3333"
},
wip: {
label: "WIP",
description: "Work in progress. Implement with caution.",
color: "#FF9233"
},
ready: {
label: "Ready",
description: "Ready to implement.",
color: "#29CC29"
},
doing: {
label: "Doing",
description: "I'm doing it.",
color: '#F00'
},
done: {
label: "Done",
description: "I'm done with this.",
color: "green"
}
});
fractal.docs.set('statuses', {
draft: {
label: 'WIP Draft',
description: 'Work in progress.',
color: '#FF3333'
},
ready: {
label: 'Ready',
description: 'Ready for referencing.',
color: '#29CC29'
}
});
// fractal.components.set('statuses.prototype.color', 'pink');
// fractal.docs.set('statuses.ready.label', 'Good to go!');
/* =========================================
Theming
=========================================== */
const jTheme = mandelbrot({
favicon: '/assets/favicon.ico',
skin: 'white',
nav: ['docs', 'components'],
panels: ['notes', 'html', 'resources', 'info'],
styles: ['default', '/theme/css/theme.css']
})
fractal.web.theme(jTheme)
jTheme.addLoadPath(path.join(__dirname, '/theme'))
jTheme.addLoadPath(path.join(__dirname, '/theme/views'))
jTheme.addStatic(path.join(__dirname, 'theme'), '/theme')
fractal.web.set('builder.dest', path.join(__dirname, 'dist'))