diff --git a/scss/_media.scss b/scss/_media.scss new file mode 100644 index 0000000..b04d7a1 --- /dev/null +++ b/scss/_media.scss @@ -0,0 +1,34 @@ +@mixin media($min-max, $reverse: false) { + $type: max-width; + @if $reverse { + $type: min-width; + $min-max: $min-max + 1; + } + @media screen and ($type: $min-max) { + @content + } +} + +@mixin media-mobile($reverse: false) { + @include media(480px, $reverse) { + @content + } +} + +@mixin media-tablet($reverse: false) { + @include media(768px, $reverse) { + @content + } +} + +@mixin media-small($reverse: false) { + @include media(1024px, $reverse) { + @content + } +} + +@mixin media-large($reverse: false) { + @include media(1200px, $reverse) { + @content + } +} diff --git a/scss/default.scss b/scss/default.scss index e5560fd..70495f0 100644 --- a/scss/default.scss +++ b/scss/default.scss @@ -1,3 +1,4 @@ +@import "media"; @import "root"; @import "all"; @@ -25,9 +26,9 @@ p { } .loading { - height: 300px; + height: 200px; - .loading-animation { + .loading_animation { margin: 20px auto; width: 50px; height: 50px; @@ -38,7 +39,7 @@ p { } } -@media screen and (max-width: 1200px) { +@include media-small { .container { padding: 0 20px; } diff --git a/src/components/Footer.vue b/src/components/Footer.vue index 346121b..ec87130 100644 --- a/src/components/Footer.vue +++ b/src/components/Footer.vue @@ -60,7 +60,7 @@ margin-right: 5px; } - @media screen and (max-width: 790px) { + @include media-tablet { .title { display: none; } @@ -72,16 +72,16 @@ } } - @media screen and (max-width: 500px) { + @include media-mobile { padding-right: 15px; } } - @media screen and (max-width: 500px) { + @include media-mobile { padding: 0; } } - @media screen and (max-width: 500px) { + @include media-mobile { padding: 15px 0; } } diff --git a/src/components/Navigation.vue b/src/components/Navigation.vue index a5690b6..b09537a 100644 --- a/src/components/Navigation.vue +++ b/src/components/Navigation.vue @@ -18,6 +18,8 @@