-
-
Notifications
You must be signed in to change notification settings - Fork 44
/
Copy pathgenerate-styles.js
67 lines (60 loc) · 1.52 KB
/
generate-styles.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
const indent = require('../utils/indent');
module.exports = (options) => {
const { template, type } = options;
let styles = '';
if (type.indexOf('cordova') >= 0) {
styles += indent(
0,
`
/* iOS Cordova Tweak */
.device-cordova.device-ios {
height: 100vh;
}
`,
);
}
if (template === 'split-view') {
styles += indent(
0,
`
/* Left Panel right border when it is visible by breakpoint */
.panel-left.panel-in-breakpoint:before {
position: absolute;
right: 0;
top: 0;
height: 100%;
width: 1px;
background: rgba(0,0,0,0.1);
content: '';
z-index: 6000;
}
/* Hide navbar link which opens left panel when it is visible by breakpoint */
.panel-left.panel-in-breakpoint ~ .view .navbar .panel-open[data-panel="left"] {
display: none;
}
/*
Extra borders for main view and left panel for iOS theme when it behaves as panel (before breakpoint size)
*/
.ios .panel-left:not(.panel-in-breakpoint).panel-in ~ .view-main:before,
.ios .panel-left:not(.panel-in-breakpoint).panel-closing ~ .view-main:before {
position: absolute;
left: 0;
top: 0;
height: 100%;
width: 1px;
background: rgba(0,0,0,0.1);
content: '';
z-index: 6000;
}
`,
);
} else {
styles += indent(
0,
`
/* Your app custom styles here */
`,
);
}
return styles.trim();
};