-
Notifications
You must be signed in to change notification settings - Fork 1
/
paper_dbx_brand_theme.js
46 lines (40 loc) · 1.47 KB
/
paper_dbx_brand_theme.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
function(){
var bg_fg = [
["#0d2481", "#ffafa2"], /* Pink on Blue */
["#ffafa2", "#0d2481"], /* Blue on Pink */
["#610a2d", "#ffffff"], /* White on Dark Purple */
["#cab7fe", "#ffffff"], /* White on Light Purple */
["#b40018", "#ffffff"], /* White on Red */
["#fa5624", "#ffffff"], /* White on Orange */
["#af761f", "#cab7fe"], /* Tan on Light Purple */
["#cab7fe", "#fa5624"], /* Orange on Light Purple */
];
if (window.paper_color_idx === undefined || window.paper_color_idx >= bg_fg.length - 1) {
window.paper_color_idx = 0;
} else {
window.paper_color_idx++;
}
var bg = bg_fg[window.paper_color_idx][0];
var fg = bg_fg[window.paper_color_idx][1];
/* Buttons */
$(".svg-icon").css("fill", bg);
$(".dmc-button").css("color", bg);
$(".dmc-button-primary").css({
"background-color": bg,
"color": fg,
});
/* edit mode */
$(".main-header-divider").css("border-right-color", bg);
$("#main-header, .main-header-right, .hp-header-title, .hp-header-privacy-avatar-doc-type").css({
"color": bg,
"background-color": fg,
});
$(".hp-header-subtitle-dot-separator").css("background-color", bg);
/* presentation mode */
$(".hp-p8n-controls").css("background-color", fg);
$(".ace-editor, body").css({
"color": fg,
"background-color": bg,
});
$('table').css('background-color', bg);
}