-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
96 lines (82 loc) · 2.05 KB
/
index.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
85
86
87
88
89
90
91
92
93
94
95
96
const path = require('path')
const Color = require('color');
const blue = '#362BC7';
const lightBlue = Color(blue).lighten(0.5).toString();
const red = '#E7072C';
const lightRed = Color(red).lighten(0.5).toString();
const white = '#F2E4C9';
const yellow = '#E19B40';
const transparent = 'rgba(0,0,0,0)';
const colors = {
black: white,
red: red,
green: red,
yellow: yellow,
blue: blue,
magenta: yellow,
cyan: lightBlue,
white: white,
lightBlack: lightBlue,
lightRed: lightRed,
lightGreen: lightRed,
lightYellow: yellow,
lightBlue: lightBlue,
lightMagenta: yellow,
lightCyan: lightBlue,
lightWhite: white
}
const getImagePath = () => {
const imagePath = path.join(__dirname, 'assets/backgrounds/falco.png');
// Replace backslashes with forward slashes when on a Windows machine.
// CSS background image URLs expect forward slashes.
if (process.platform === 'win32') {
return imagePath.replace(/\\/g, '/');
}
return imagePath
}
exports.decorateConfig = config => Object.assign({}, config, {
colors,
backgroundColor: transparent,
borderColor: red,
cursorColor: yellow,
foregroundColor: yellow,
selectionColor: Color(red).alpha(0.3).toString(),
css: `
${config.css || ''}
* {
color: ${white};
}
.terms_terms {
background: url("file://${getImagePath()}") center;
background-size: cover;
}
.header_header * {
background-color: black;
}
.tabs_nav .tabs_list .tab_tab {
border: 0;
}
.tab_icon {
width: 15px;
height: 15px;
}
.tab_icon:hover {
background-color: ${red};
}
.tab_tab::before {
content: '';
position: absolute;
bottom: 0;
left: 0;
right: 0;
height: 4px;
background-color: ${red};
transform: scaleX(0);
transition: none;
}
.tab_tab.tab_active::before {
transform: scaleX(1);
transition: all 400ms cubic-bezier(0.0, 0.0, 0.2, 1)
}
`
})