alerts and notifications refinements

This commit is contained in:
Felix Hamann 2018-09-16 21:21:05 +02:00
parent 8c2c1cb18f
commit 936bbc28ac
6 changed files with 9 additions and 41 deletions

View File

@ -1,7 +1,7 @@
:root { :root {
/* THEME INDEPENDENT COLORS */ /* THEME INDEPENDENT COLORS */
--color-error: #ff3860; --color-error: #8c0707;
--color-warning: #ffdd57; --color-warning: #fc9900;
--color-success: #23d160; --color-success: #23d160;
--color-info: #c4c4c4; --color-info: #c4c4c4;
--color-lightblack: #1A2A36; --color-lightblack: #1A2A36;

View File

@ -14,4 +14,3 @@
Bitte melden Sie etwaige Probleme an # Bitte melden Sie etwaige Probleme an #
<a href="mailto:jost@tcs.ifi.lmu.de"> <a href="mailto:jost@tcs.ifi.lmu.de">
jost@tcs.ifi.lmu.de jost@tcs.ifi.lmu.de

View File

@ -3,10 +3,9 @@
border-radius: 3px; border-radius: 3px;
padding: 10px 20px 20px; padding: 10px 20px 20px;
margin: 40px 0; margin: 40px 0;
color: var(--color-lighter); color: var(--color-dark);
box-shadow: 0 0 4px 2px inset currentColor; box-shadow: 0 0 4px 2px inset currentColor;
padding-left: 20%; padding-left: 20%;
color: #318dc5 ;
&::before { &::before {
content: 'i'; content: 'i';

View File

@ -6,7 +6,7 @@
window.utils.alert = function(alertEl) { window.utils.alert = function(alertEl) {
var closeEl = document.createElement('DIV'); var closeEl = document.createElement('DIV');
var dataDecay = alertEl.dataset.decay; var dataDecay = alertEl.dataset.decay;
var autoDecay = 3; var autoDecay = 30;
if (dataDecay) { if (dataDecay) {
autoDecay = parseInt(dataDecay, 10); autoDecay = parseInt(dataDecay, 10);
} }

View File

@ -2,13 +2,13 @@
/** /**
.alert .alert
Regular Info Alert Regular Info Alert
Disappears automatically after 3 seconds Disappears automatically after 30 seconds
Disappears after x seconds if sepcified via data-decay='x' Disappears after x seconds if explicitly specified via data-decay='x' on html element
Can be told not to disappear with data-decay='0' Can be told not to disappear with data-decay='0'
.alert-warning, .alert-error .alert-warning, .alert-error
Warning or Error alert Warning or Error alert
Don't disappear, only difference is color These don't disappear, only difference is color
.alert-warning is orange regardless of user's selected theme .alert-warning is orange regardless of user's selected theme
.alert-error is red regardless of user's selected theme .alert-error is red regardless of user's selected theme
@ -23,20 +23,12 @@
flex-direction: column; flex-direction: column;
} }
@media (min-width: 768px) {
.alerts {
top: 150px;
bottom: auto;
}
}
.alert { .alert {
position: relative; position: relative;
display: inline-block; display: inline-block;
background-color: var(--color-dark); background-color: var(--color-dark);
font-size: 1rem; font-size: 1rem;
color: #f3f3f3; color: var(--color-lightwhite);
z-index: 0; z-index: 0;
max-height: 200px; max-height: 200px;
transition: all .3s ease-in-out; transition: all .3s ease-in-out;
@ -116,8 +108,6 @@
top: 0; top: 0;
width: 60px; width: 60px;
height: 100%; height: 100%;
/* TODO: remove next line as soon as messagerenderer-error in julius gets resolved */
color: var(--color-dark);
transition: all .3s ease; transition: all .3s ease;
z-index: 40; z-index: 40;
@ -138,7 +128,6 @@
top: 50%; top: 50%;
left: 50%; left: 50%;
display: flex; display: flex;
color: rgba(255, 255, 255, 0.5);
align-items: center; align-items: center;
justify-content: center; justify-content: center;
transform: translate(-50%, -50%); transform: translate(-50%, -50%);
@ -158,31 +147,11 @@
.alert-warning { .alert-warning {
background-color: var(--color-warning); background-color: var(--color-warning);
color: var(--color-dark);
.alert__close {
color: var(--color-warning);
/* TODO: remove me as soon as messagerenderer-error in julius gets resolved */
&::before {
color: var(--color-dark);
}
}
} }
.alert-danger, .alert-danger,
.alert-error { .alert-error {
background-color: var(--color-error); background-color: var(--color-error);
color: var(--color-lightwhite);
.alert__close {
color: var(--color-error);
/* TODO: remove me as soon as messagerenderer-error in julius gets resolved */
&::before {
color: var(--color-lightwhite);
}
}
} }
.alert--invisible { .alert--invisible {

View File

@ -181,6 +181,7 @@
width: 0; width: 0;
overflow: hidden; overflow: hidden;
z-index: -1; z-index: -1;
box-shadow: 0 0 13px rgba(0, 0, 0, 0.4);
} }
@media (max-width: 425px) { @media (max-width: 425px) {