Skip to content

Commit 0e51d98

Browse files
committed
Melhorias na parte visual e correção nos diretórios
1 parent c5ca02d commit 0e51d98

File tree

2 files changed

+74
-12
lines changed

2 files changed

+74
-12
lines changed

src/Notify.php

+17-9
Original file line numberDiff line numberDiff line change
@@ -108,24 +108,32 @@ public function render() {
108108
*/
109109
public function scripts() {
110110

111-
$scripts = '<link href="vendor/Notify/themify-icons.css" rel="stylesheet" type="text/css">
112-
113-
<script type="text/javascript" src="vendor/Notify/jquery/jquery-3.2.1.min.js"></script>';
111+
$scripts = '<link href="'. asset('vendor/Notify/themify-icons.css') .'" rel="stylesheet" type="text/css">';
112+
113+
if ($this->options['include:Jquery']):
114+
$scripts .= '<script type="text/javascript" src="'. asset('vendor/Notify/jquery/jquery-3.2.1.min.js') .'"></script>;';
115+
endif;
114116

115117
if ($this->options['lib'] === 'toastr'):
116-
$scripts .= '<link href="vendor/Notify/toastr/toastr.min.css" rel="stylesheet" type="text/css">
117-
<script type="text/javascript" src="vendor/Notify/toastr/toastr.min.js"></script>';
118+
$scripts .= '<link href="'. asset('vendor/Notify/toastr/toastr.min.css') .'" rel="stylesheet" type="text/css">
119+
<script type="text/javascript" src="'. asset('vendor/Notify/toastr/toastr.min.js') .'"></script>';
120+
118121
elseif ($this->options['lib'] === 'pnotify'):
119-
$scripts .= '<link href="vendor/Notify/animate.css" rel="stylesheet" type="text/css">
120-
<link href="vendor/Notify/pnotify/pnotify.custom.min.css" rel="stylesheet" type="text/css">
121-
<script type="text/javascript" src="vendor/Notify/pnotify/pnotify.custom.min.js"></script>';
122+
123+
if ($this->options['include:Animate']):
124+
$scripts .= '<link href="'. asset('vendor/Notify/animate.css') .'" rel="stylesheet" type="text/css">';
125+
endif;
126+
127+
$scripts .= '<link href="'. asset('vendor/Notify/pnotify/pnotify.custom.min.css') .'" rel="stylesheet" type="text/css">
128+
<script type="text/javascript" src="'. asset('vendor/Notify/pnotify/pnotify.custom.min.js') .'"></script>';
122129
if ($this->config['desktop']['desktop'] === true):
123130
$scripts .= 'PNotify.desktop.permission();';
124131
endif;
132+
125133
endif;
126134

127135
if ($this->options['style'] === 'custom'):
128-
$scripts .= '<link href="vendor/Notify/style.css" rel="stylesheet" type="text/css">';
136+
$scripts .= '<link href="'. asset('vendor/Notify/style.css') .'" rel="stylesheet" type="text/css">';
129137
endif;
130138

131139
return $scripts;

src/assets/style.css

+57-3
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
background-color: #FFF;
3737
padding: 15px 15px 15px 65px;
3838
width: 300px;
39-
min-height: 74px
39+
/* min-height: 74px*/
4040
}
4141
#toast-container>.toast {
4242
background-image: none!important
@@ -124,6 +124,13 @@
124124
background-color: #fff;
125125
color: #737373;
126126
}
127+
.ui-pnotify-icon{
128+
position: absolute;
129+
height: 100%;
130+
width: 38px;
131+
top: 0;
132+
bottom: 0;
133+
}
127134
.ui-pnotify-title {
128135
font-weight: 600
129136
}
@@ -140,28 +147,75 @@
140147
.ui-pnotify-icon span:after{
141148
font-family: themify;
142149
font-size: 38px;
143-
left: 6px;
144-
top: 12px;
145150
text-align: center;
146151
font-weight: 100;
147152
}
148153
.ui-pnotify-icon span{
149154
background-color: #fff;
150155
border: 0;
151156
}
157+
.brighttheme-icon-success{
158+
position: relative;
159+
top: 50%;
160+
transform: translateY(-50%);
161+
margin-top: 0;
162+
}
152163
.brighttheme-icon-success:after{
153164
content: "\e64d";
154165
color: #149278;
155166
}
167+
.brighttheme-icon-info{
168+
position: relative;
169+
top: 50%;
170+
transform: translateY(-50%);
171+
margin-top: 0;
172+
}
156173
.brighttheme-icon-info:after{
157174
content: "\e717";
158175
color: #00a7f5;
159176
}
177+
.brighttheme-icon-notice{
178+
position: relative;
179+
top: 50%;
180+
transform: translateY(-50%);
181+
margin-top: 0;
182+
}
160183
.brighttheme-icon-notice:after{
161184
content: "\e6c5";
162185
color: #ffae04;
163186
}
187+
.brighttheme-icon-error{
188+
position: relative;
189+
top: 50%;
190+
transform: translateY(-50%);
191+
margin-top: 0;
192+
}
164193
.brighttheme-icon-error:after{
165194
content: "\e6c5";
166195
color: #e21d27;
167196
}
197+
198+
.toast{
199+
height: 100%;
200+
min-height: unset !important;
201+
}
202+
.toast-success:before{
203+
top: 0;
204+
bottom: 0;
205+
margin: auto;
206+
}
207+
.toast-info:before{
208+
top: 0;
209+
bottom: 0;
210+
margin: auto;
211+
}
212+
.toast-warning:before{
213+
top: 0;
214+
bottom: 0;
215+
margin: auto;
216+
}
217+
.toast-error:before{
218+
top: 0;
219+
bottom: 0;
220+
margin: auto;
221+
}

0 commit comments

Comments
 (0)