frontend.css.php
4.4 KB
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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
<?php if( isset( $settings->number_spacing ) ) : ?>
.fl-node-<?php echo $id; ?> .fl-countdown .fl-countdown-number {
font-size: 1px;
margin-left: <?php echo $settings->number_spacing ?>px;
margin-right: <?php echo $settings->number_spacing ?>px;
}
<?php endif; ?>
.fl-node-<?php echo $id; ?> .fl-countdown .fl-countdown-unit-number {
<?php
if( !empty( $settings->number_size ) ) {
echo 'font-size: '. $settings->number_size .'px;';
}
if( !empty( $settings->number_color ) ) {
echo 'color: #'. $settings->number_color .';';
}
?>
}
.fl-node-<?php echo $id; ?> .fl-countdown .fl-countdown-unit-label {
<?php
if( !empty( $settings->label_size ) ) {
echo 'font-size: '. $settings->label_size .'px;';
}
if( !empty( $settings->label_color ) ) {
echo 'color: #'. $settings->label_color .';';
}
?>
}
<?php if( isset( $settings->layout ) && $settings->layout == 'default' ) : ?>
.fl-node-<?php echo $id; ?> .fl-countdown .fl-countdown-unit {
<?php
if( isset( $settings->vertical_padding ) ) {
echo 'padding-top: '. $settings->vertical_padding .'px;';
echo 'padding-bottom: '. $settings->vertical_padding .'px;';
}
if( isset( $settings->horizontal_padding ) ) {
echo 'padding-left: '. $settings->horizontal_padding .'px;';
echo 'padding-right: '. $settings->horizontal_padding .'px;';
}
if( !empty( $settings->number_bg_color ) ) {
$number_raw_color = !empty( $settings->number_bg_color ) ? $settings->number_bg_color : 'transparent';
$number_opacity = !empty( $settings->number_bg_opacity ) ? $settings->number_bg_opacity : '100';
$number_color = 'rgba('. implode( ',', FLBuilderColor::hex_to_rgb( $number_raw_color ) ) .','. ( $number_opacity/100 ) .')';
echo 'background-color: #'. $number_raw_color .';';
echo 'background-color: '. $number_color .';';
}
if( isset( $settings->border_radius ) ) {
echo 'border-radius: '. $settings->border_radius .'px;';
}
?>
}
<?php if( $settings->show_separator == 'yes' && $settings->separator_type == 'colon' ) : ?>
.fl-node-<?php echo $id; ?> .fl-countdown .fl-countdown-number:after {
<?php
if( isset( $settings->number_spacing ) ) {
echo 'width: '. ( $settings->number_spacing * 2 ) .'px;';
echo 'right: -'. ( $settings->number_spacing * 2 ) .'px;';
}
if( isset( $settings->separator_color ) ) {
echo 'color: #'. $settings->separator_color .';';
}
?>
}
<?php endif; ?>
<?php if( $settings->show_separator == 'yes' && $settings->separator_type == 'line' ) : ?>
.fl-node-<?php echo $id; ?> .fl-countdown .fl-countdown-number:after {
<?php
if( isset( $settings->number_spacing ) ) {
echo 'right: -'. $settings->number_spacing .'px;';
}
if( isset( $settings->separator_color ) ) {
echo 'border-color: #'. $settings->separator_color .';';
}
?>
}
<?php endif; ?>
<?php elseif( isset( $settings->layout ) && $settings->layout == 'circle' ) : ?>
.fl-node-<?php echo $id ?> .fl-countdown-unit{
position: absolute;
top: 50%;
left: 50%;
-webkit-transform: translate(-50%,-50%);
-moz-transform: translate(-50%,-50%);
-ms-transform: translate(-50%,-50%);
transform: translate(-50%,-50%);
}
.fl-node-<?php echo $id ?> .fl-countdown-number{
<?php
if( !empty( $settings->circle_width ) ) {
echo 'width: '. $settings->circle_width .'px;';
echo 'height: '. $settings->circle_width .'px;';
} else {
echo 'max-width: 100px;';
echo 'max-height: 100px;';
}
?>
}
.fl-node-<?php echo $id ?> .fl-countdown-circle-container{
<?php
if( !empty( $settings->circle_width ) ) {
echo 'max-width: '. $settings->circle_width .'px;';
echo 'max-height: '. $settings->circle_width .'px;';
} else {
echo 'max-width: 100px;';
echo 'max-height: 100px;';
}
?>
}
.fl-node-<?php echo $id ?> .fl-countdown .svg circle{
<?php
if( !empty( $settings->circle_dash_width ) ) {
echo 'stroke-width: '. $settings->circle_dash_width .'px;';
}
?>
}
.fl-node-<?php echo $id ?> .fl-countdown .svg .fl-number-bg{
<?php
if( !empty( $settings->circle_bg_color ) ) {
echo 'stroke: #'. $settings->circle_bg_color .';';
} else {
echo 'stroke: transparent;';
}
?>
}
.fl-node-<?php echo $id ?> .fl-countdown .svg .fl-number{
<?php
if( !empty( $settings->circle_color ) ) {
echo 'stroke: #'. $settings->circle_color .';';
} else {
echo 'stroke: transparent;';
}
?>
}
<?php endif; ?>