0001-style-update-notification-look-and-feel-14613.patch
gadjo/static/css/gadjo.scss | ||
---|---|---|
186 | 186 |
/* notifications */ |
187 | 187 | |
188 | 188 |
ul.messages { |
189 |
position: fixed; |
|
190 |
width: 30em; |
|
191 |
top: 8px; |
|
192 |
right: 10px; |
|
193 | 189 |
padding: 0; |
194 |
z-index: 2000; |
|
195 |
margin-top: 1em; |
|
190 |
margin: 0; |
|
196 | 191 |
list-style-type: none; |
197 |
margin: auto; |
|
198 |
background: #646464; |
|
199 |
background: rgba(40, 40, 40, 0.95); |
|
200 |
color: white; |
|
201 |
text-shadow: 1px 1px 1px black; |
|
202 |
border-radius: 10px; |
|
203 |
box-shadow: 0 0 4px black; |
|
204 |
} |
|
192 |
max-width: 100ex; |
|
205 | 193 | |
206 |
ul.messages li { |
|
207 |
padding: 1ex; |
|
208 |
margin: 1ex; |
|
194 |
li { |
|
195 |
font-size: 110%; |
|
196 |
background: #fafafa; |
|
197 |
margin: 1ex 0; |
|
198 |
padding: 1ex; |
|
199 |
border: 1px solid transparent; |
|
200 |
border-left-width: 25px; |
|
201 |
&:before { |
|
202 |
position: absolute; |
|
203 |
left: 0; |
|
204 |
width: 25px; |
|
205 |
display: inline-block; |
|
206 |
text-align: center; |
|
207 |
font-family: FontAwesome; |
|
208 |
color: white; |
|
209 |
} |
|
210 |
&.info { |
|
211 |
&:before { content: "\f05a"; } /* info-circle */ |
|
212 |
border-color: #00b000; |
|
213 |
} |
|
214 |
&.warning { |
|
215 |
&:before { content: "\f06a"; } /* exclamation-circle */ |
|
216 |
border-color: #ffb000; |
|
217 |
} |
|
218 |
&.error { |
|
219 |
&:before { content: "\f071"; } /* exclamation-triangle */ |
|
220 |
border-color: #b00000; |
|
221 |
} |
|
222 |
.close { |
|
223 |
float: right; |
|
224 |
cursor: pointer; |
|
225 |
font-weight: bold; |
|
226 |
border: none; |
|
227 |
color: inherit; |
|
228 |
} |
|
229 |
} |
|
209 | 230 |
} |
210 | 231 | |
211 | 232 |
/* main content */ |
gadjo/static/js/gadjo.js | ||
---|---|---|
316 | 316 |
var timestamp = ((new Date().getTime() / 1000) % 86400 ) / (86400 / 440); |
317 | 317 |
$('div#header').css('background-position', '0 -' + timestamp + 'px'); |
318 | 318 |
} |
319 |
$('.messages > li').each(function(idx, elem) { |
|
320 |
var elem = $('<a aria-hidden="true" class="close">×</a>'); |
|
321 |
$(elem).on('click', function() { |
|
322 |
$(this).parent('li').fadeOut('slow'); |
|
323 |
}); |
|
324 |
$(this).prepend(elem); |
|
325 |
}); |
|
319 | 326 |
}); |
320 | 327 |
})(); |
gadjo/templates/gadjo/root.html | ||
---|---|---|
77 | 77 |
<li{% if message.tags %} class="{{ message.tags }}"{% endif %}>{{ message }}</li> |
78 | 78 |
{% endfor %} |
79 | 79 |
</ul> |
80 |
<script> |
|
81 |
(function () { |
|
82 |
var $ = jQuery; |
|
83 |
$(document).ready(function() { |
|
84 |
$('.messages').delay(5000).fadeOut('slow'); |
|
85 |
}); |
|
86 |
})(); |
|
87 |
</script> |
|
88 | 80 |
{% endif %} |
89 | 81 |
{% endblock %} |
90 | 82 | |
91 |
- |