-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathcleverpush-amp-styles.php
86 lines (74 loc) · 2.03 KB
/
cleverpush-amp-styles.php
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
<?php
function cleverpush_amp_styles()
{
$button_background = 'green';
$button_color = '#fff';
$channel = get_option('cleverpush_channel_config');
if (!empty($channel)) {
if (!empty($channel->confirmAlertAllowButtonStyle) && !empty($channel->confirmAlertAllowButtonStyle->backgroundColor)) {
$button_background = $channel->confirmAlertAllowButtonStyle->backgroundColor;
if (!empty($channel->confirmAlertAllowButtonStyle->color)) {
$button_color = $channel->confirmAlertAllowButtonStyle->color;
}
} else if (!empty($channel->notificationBellColor)) {
$button_background = $channel->notificationBellColor;
}
}
$position = get_option('cleverpush_amp_widget_position');
if (empty($position)) {
$position = 'bottom';
}
$border_position = $position == 'top' ? 'bottom' : 'top';
?>
.cleverpush-confirm {
left: 10px;
right: 10px;
padding: 15px;
<?php echo esc_attr($position); ?>: 0;
position: fixed;
z-index: 999;
background-color: #fff;
border-<?php echo esc_attr($border_position); ?>-left-radius: 15px;
border-<?php echo esc_attr($border_position); ?>-right-radius: 15px;
box-shadow: 0 0 12px rgba(0, 0, 0, 0.1);
}
.cleverpush-confirm-title {
font-size: 17px;
font-weight: bold;
margin-bottom: 5px;
}
.cleverpush-confirm-text {
font-size: 14px;
margin-bottom: 10px;
color: #555;
line-height: 1.65;
}
.cleverpush-confirm-buttons {
display: flex;
align-items: center;
margin-top: 15px;
}
.cleverpush-confirm-button {
color: #555;
background-color: transparent;
padding: 10px;
width: 50%;
margin-right: 5px;
text-align: center;
border: none;
font-size: 16px;
font-weight: bold;
cursor: pointer;
border-radius: 5px;
}
.cleverpush-confirm-button:hover {
opacity: 0.9;
}
.cleverpush-confirm-button-allow {
background-color: <?php echo esc_attr($button_background); ?>;
color: <?php echo esc_attr($button_color); ?>;
margin-left: 5px;
margin-right: 0;
}
<?php
}