summaryrefslogtreecommitdiff
path: root/assets/sass/layout/_main.scss
diff options
context:
space:
mode:
Diffstat (limited to 'assets/sass/layout/_main.scss')
-rw-r--r--assets/sass/layout/_main.scss174
1 files changed, 101 insertions, 73 deletions
diff --git a/assets/sass/layout/_main.scss b/assets/sass/layout/_main.scss
index e9f65bf..0588446 100644
--- a/assets/sass/layout/_main.scss
+++ b/assets/sass/layout/_main.scss
@@ -1,74 +1,102 @@
-@import '../libs/vars';
-@import '../libs/functions';
-@import '../libs/mixins';
-
-///
-/// Identity by HTML5 UP
-/// html5up.net | @ajlkn
-/// Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
-///
-
-/* Main */
-
- #main {
- position: relative;
- max-width: 100%;
- min-width: 27em;
- @include padding(4.5em, 3em);
-
- background: _palette(bg);
- border-radius: _size(border-radius);
- cursor: default;
- opacity: 0.95;
- text-align: center;
-
- @include vendor('transform-origin', '50% 50%');
- @include vendor('transform', 'rotateX(0deg)');
- @include vendor('transition', (
- 'opacity #{_duration(main)} ease',
- 'transform #{_duration(main)} ease'
- ));
-
- .avatar {
- position: relative;
- display: block;
- margin-bottom: _size(element-margin);
-
- img {
- display: block;
- margin: 0 auto;
- border-radius: 100%;
- box-shadow: 0 0 0 1.5em _palette(bg);
- }
-
- &:before {
- content: '';
- display: block;
- position: absolute;
- top: 50%;
- left: -3em;
- width: calc(100% + 6em);
- height: _size(border-width);
- z-index: -1;
- background: _palette(border);
- }
- }
-
- @include breakpoint(xsmall) {
- min-width: 0;
- width: 100%;
- @include padding(4em, 2em);
-
- .avatar {
- &:before {
- left: -2em;
- width: calc(100% + 4em);
- }
- }
- }
-
- body.is-loading & {
- opacity: 0;
- @include vendor('transform', 'rotateX(15deg)');
- }
+///
+/// Dimension by HTML5 UP
+/// html5up.net | @ajlkn
+/// Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
+///
+
+/* Main */
+
+ #main {
+ @include vendor('flex-grow', '1');
+ @include vendor('flex-shrink', '1');
+ @include vendor('display', 'flex');
+ @include vendor('align-items', 'center');
+ @include vendor('justify-content', 'center');
+ @include vendor('flex-direction', 'column');
+ position: relative;
+ max-width: 100%;
+ z-index: 3;
+
+ article {
+ @include vendor('transform', 'translateY(0.25rem)');
+ @include vendor('transition', (
+ 'opacity #{_duration(article)} ease-in-out',
+ 'transform #{_duration(article)} ease-in-out'
+ ));
+ @include padding(2.5rem, 2.5rem, (2rem, 0, 1rem, 0));
+ position: relative;
+ width: 40rem;
+ max-width: 100%;
+ background-color: transparentize(_palette(bg), 0.15);
+ border-radius: _size(border-radius);
+ opacity: 0;
+
+ &.active {
+ @include vendor('transform', 'translateY(0)');
+ opacity: 1;
+ }
+
+ .close {
+ display: block;
+ position: absolute;
+ top: 0;
+ right: 0;
+ width: 4rem;
+ height: 4rem;
+ cursor: pointer;
+ text-indent: 4rem;
+ overflow: hidden;
+ white-space: nowrap;
+
+ &:before {
+ @include vendor('transition', 'background-color #{_duration(transition)} ease-in-out');
+ content: '';
+ display: block;
+ position: absolute;
+ top: 0.75rem;
+ left: 0.75rem;
+ width: 2.5rem;
+ height: 2.5rem;
+ border-radius: 100%;
+ background-position: center;
+ background-image: svg-url('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="20px" height="20px" viewBox="0 0 20 20" zoomAndPan="disable"><style>line { stroke: #{_palette(border)}; stroke-width: 1; }</style><line x1="2" y1="2" x2="18" y2="18" /><line x1="18" y1="2" x2="2" y2="18" /></svg>');
+ background-size: 20px 20px;
+ background-repeat: no-repeat;
+ }
+
+ &:hover {
+ &:before {
+ background-color: _palette(border-bg);
+ }
+ }
+
+ &:active {
+ &:before {
+ background-color: _palette(border-bg-alt);
+ }
+ }
+ }
+ }
+
+ @include breakpoint('<=small') {
+ article {
+ @include padding(2rem, 2rem, (1.5rem, 0, 0.5rem, 0));
+
+ .close {
+ &:before {
+ top: 0.875rem;
+ left: 0.875rem;
+ width: 2.25rem;
+ height: 2.25rem;
+ background-size: 14px 14px;
+ }
+ }
+ }
+ }
+
+ @include breakpoint('<=xsmall') {
+ article {
+ @include padding(2rem, 1.5rem, (1rem, 0, 0.5rem, 0));
+ }
+ }
} \ No newline at end of file