From f8d3affa19f7a334f1136fbd0663a2516bc93e9b Mon Sep 17 00:00:00 2001 From: topuser <1549469775@qq.com> Date: Tue, 17 Dec 2019 21:51:26 +0800 Subject: [PATCH] add --- assets/style/_global.scss | 53 -------------- assets/style/border_1px/border_1px.scss | 35 +++++++++ assets/style/border_1px/index.scss | 35 +++++++++ assets/style/common/index.scss | 3 + assets/style/global.scss | 55 ++++++++++++++ layouts/default copy.vue | 124 ++++++++++++++++++++++++++++++++ layouts/default.vue | 22 +++--- nuxt.config.js | 35 +++++---- package-lock.json | 95 ++++++++++++++++++++++-- package.json | 1 + 10 files changed, 372 insertions(+), 86 deletions(-) delete mode 100644 assets/style/_global.scss create mode 100644 assets/style/border_1px/border_1px.scss create mode 100644 assets/style/border_1px/index.scss create mode 100644 assets/style/common/index.scss create mode 100644 assets/style/global.scss create mode 100644 layouts/default copy.vue diff --git a/assets/style/_global.scss b/assets/style/_global.scss deleted file mode 100644 index 8ff6729..0000000 --- a/assets/style/_global.scss +++ /dev/null @@ -1,53 +0,0 @@ - - -@import "./var.scss"; -@import "./common.scss"; - -html{ - min-width: 100vw; - min-height: 100vh; -} - -img { - max-width: 100%; - height: auto; -} - -*{ - margin: 0; - padding: 0; -} - -// 不支持IE -// https://www.caniuse.com/#feat=css-variables -// https://www.cnblogs.com/WQLong/p/7792174.html -// 白天主题 -.light{ - background-color: $light-sidenav-bg; - color: $light-sidenav-color; - transition: background-color .3s linear; - // @at-root :root{ - // --navbar-bg:#f4f6fb; - // } - - --navbar-color:#000000; - --navbar-hover:#00000021; - --navbar-background:#f4f6fb; - --test-image:url(/static/image/icon0.png); -} - -// 黑夜主题 -.dark{ - - background-color: $dark-sidenav-bg; - color: $dark-sidenav-color; - transition: background-color .3s linear; - // @at-root :root{ - // --navbar-bg:#000; - // } - --aaa:asdsa; - --navbar-color:#ffffff; - --navbar-hover:rgba(255, 255, 255, 0.13); - --navbar-background:#000000; -} - diff --git a/assets/style/border_1px/border_1px.scss b/assets/style/border_1px/border_1px.scss new file mode 100644 index 0000000..05c6219 --- /dev/null +++ b/assets/style/border_1px/border_1px.scss @@ -0,0 +1,35 @@ +//1px边框的解决方案 +@mixin borderCreator($name, $direction, $type, $color) { + .border-#{$name} { + @if $direction!= "" { + border-#{$direction}: 1px $type $color; + } @else { + border: 1px $type $color; + } + } + + @media screen and (-webkit-min-device-pixel-ratio: 2) { + .border-#{$name} { + @if $direction!= "" { + border-#{$direction}: 0.5px $type $color; + } @else { + border: 0.5px $type $color; + } + } + } + @media screen and (-webkit-min-device-pixel-ratio: 3) { + .border-#{$name} { + @if $direction!= "" { + border-#{$direction}: 0.333333px $type $color; + } @else { + border: 0.333333px $type $color; + } + } + } +} + +@include borderCreator("box", "", solid, #0000002f); +@include borderCreator("right", "right", solid, #0000002f); +@include borderCreator("top", "top", solid, #0000002f); +@include borderCreator("bottom", "bottom", solid, #0000002f); +@include borderCreator("left", "left", solid, #0000002f); diff --git a/assets/style/border_1px/index.scss b/assets/style/border_1px/index.scss new file mode 100644 index 0000000..05c6219 --- /dev/null +++ b/assets/style/border_1px/index.scss @@ -0,0 +1,35 @@ +//1px边框的解决方案 +@mixin borderCreator($name, $direction, $type, $color) { + .border-#{$name} { + @if $direction!= "" { + border-#{$direction}: 1px $type $color; + } @else { + border: 1px $type $color; + } + } + + @media screen and (-webkit-min-device-pixel-ratio: 2) { + .border-#{$name} { + @if $direction!= "" { + border-#{$direction}: 0.5px $type $color; + } @else { + border: 0.5px $type $color; + } + } + } + @media screen and (-webkit-min-device-pixel-ratio: 3) { + .border-#{$name} { + @if $direction!= "" { + border-#{$direction}: 0.333333px $type $color; + } @else { + border: 0.333333px $type $color; + } + } + } +} + +@include borderCreator("box", "", solid, #0000002f); +@include borderCreator("right", "right", solid, #0000002f); +@include borderCreator("top", "top", solid, #0000002f); +@include borderCreator("bottom", "bottom", solid, #0000002f); +@include borderCreator("left", "left", solid, #0000002f); diff --git a/assets/style/common/index.scss b/assets/style/common/index.scss new file mode 100644 index 0000000..c583b03 --- /dev/null +++ b/assets/style/common/index.scss @@ -0,0 +1,3 @@ +.h-100{ + height: 100vh; +} \ No newline at end of file diff --git a/assets/style/global.scss b/assets/style/global.scss new file mode 100644 index 0000000..56f8e67 --- /dev/null +++ b/assets/style/global.scss @@ -0,0 +1,55 @@ + + +@import "./var.scss"; +@import "./common.scss"; +@import "./common/index.scss"; +@import "./border_1px/index.scss"; + +html{ + min-width: 100vw; + min-height: 100vh; +} + +img { + max-width: 100%; + height: auto; +} + +*{ + margin: 0; + padding: 0; +} + +// 不支持IE +// https://www.caniuse.com/#feat=css-variables +// https://www.cnblogs.com/WQLong/p/7792174.html +// 白天主题 +.light{ + background-color: $light-sidenav-bg; + color: $light-sidenav-color; + transition: background-color .3s linear; + // @at-root :root{ + // --navbar-bg:#f4f6fb; + // } + + --navbar-color:#000000; + --navbar-hover:#00000021; + --navbar-background:#f4f6fb; + --test-image:url(/static/image/icon0.png); +} + +// 黑夜主题 +.dark{ + + background-color: $dark-sidenav-bg; + color: $dark-sidenav-color; + transition: background-color .3s linear; + // @at-root :root{ + // --navbar-bg:#000; + // } + --aaa:asdsa; + --navbar-color:#ffffff; + --navbar-hover:rgba(255, 255, 255, 0.13); + --navbar-background:#000000; +} + diff --git a/layouts/default copy.vue b/layouts/default copy.vue new file mode 100644 index 0000000..33d25be --- /dev/null +++ b/layouts/default copy.vue @@ -0,0 +1,124 @@ + + + + + + + + + + + + + + + + + + 导航首页 + + + + + + 前端技术 + + + + + + 导航首页 + + + + + + dsa + + + + + + + + + + diff --git a/layouts/default.vue b/layouts/default.vue index ec90867..291af1b 100644 --- a/layouts/default.vue +++ b/layouts/default.vue @@ -1,8 +1,8 @@ - - + + + + dsa + @@ -63,21 +66,15 @@ export default { };