diff --git a/core/client/assets/sass/modules/animations.scss b/core/client/assets/sass/modules/animations.scss index 948499c877..dd2b08518f 100644 --- a/core/client/assets/sass/modules/animations.scss +++ b/core/client/assets/sass/modules/animations.scss @@ -26,4 +26,14 @@ @keyframes off-canvas { 0% { opacity: 0; } 100% { opacity: 1; } -} \ No newline at end of file +} + +@include keyframes(fadeIn) { + from { + opacity: 0; + } + to { + opacity: 1; + } +} + diff --git a/core/client/assets/sass/modules/global.scss b/core/client/assets/sass/modules/global.scss index e1302e87be..6e18b5e10a 100644 --- a/core/client/assets/sass/modules/global.scss +++ b/core/client/assets/sass/modules/global.scss @@ -889,6 +889,83 @@ nav { background: $blue; } +/* ========================================================================== + Modals + ========================================================================== */ +#modal-container { + &.active { + position: absolute; + top: 0; + bottom: 0; + left: 0; + right: 0; + z-index: 1000; + + &.dark { + background: rgba(0,0,0,0.4); + } + } +} + +body.blur > *:not(#modal-container) { + -webkit-filter: blur(2px); + filter: blur(2px); // Not used yet +} + +%modal, .modal { + @include box-sizing(border-box); + position: fixed; + top: 10%; + left: 50%; + width: 450px; + padding: 0px; + margin-left: -225px; + background: #FFFFFF; + border: 6px solid rgba(0,0,0,0.5); + border-radius: $rounded; + + &.fadeIn { + @include animation(fadeIn 0.3s linear 1); + } +} + +.modal-header { + position: relative; + padding: 20px; + border-bottom: 1px solid $lightgrey; + + h1 { + display: inline-block; + margin: 0; + font-size: 1.5em; + font-weight: bold; + } + + .close { + @include box-sizing(border-box); + position: absolute; + top: 10px; + right: 20px; + width: 16px; + min-height: 16px; + padding: 0; + margin: 0; + border: none; + opacity: 0.4; + + @include icon($i-close, 1em, $midgrey); + @include transition(opacity 0.3s linear); + + &:hover{ + opacity: 1; + } + } +} + +.modal-content { + padding: 20px; +} + /* ========================================================================== Main Elements ========================================================================== */ diff --git a/core/client/tpl/modal.hbs b/core/client/tpl/modal.hbs new file mode 100644 index 0000000000..59c5afb14e --- /dev/null +++ b/core/client/tpl/modal.hbs @@ -0,0 +1,6 @@ +
+ + +
\ No newline at end of file diff --git a/core/server/views/default.hbs b/core/server/views/default.hbs index 92373d9ee6..c964f183e1 100644 --- a/core/server/views/default.hbs +++ b/core/server/views/default.hbs @@ -34,6 +34,8 @@ {{{body}}} +