mirror of
https://github.com/woodchen-ink/clash-and-dashboard.git
synced 2025-07-18 14:01:56 +08:00
Improve: separate style file
This commit is contained in:
parent
7306ea3bcf
commit
546cd9d161
@ -6,7 +6,13 @@ const HtmlWebpackPlugin = require('html-webpack-plugin')
|
|||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
resolve: {
|
resolve: {
|
||||||
extensions: ['.ts', '.tsx', '.js', '.jsx'],
|
extensions: ['.ts', '.tsx', '.js', '.jsx', '.scss'],
|
||||||
|
plugins: [
|
||||||
|
new TsConfigPathsPlugin()
|
||||||
|
],
|
||||||
|
alias: {
|
||||||
|
'@styles': resolve(__dirname, 'src/styles/')
|
||||||
|
},
|
||||||
},
|
},
|
||||||
context: resolve(__dirname, '../../src'),
|
context: resolve(__dirname, '../../src'),
|
||||||
module: {
|
module: {
|
||||||
@ -53,10 +59,4 @@ module.exports = {
|
|||||||
performance: {
|
performance: {
|
||||||
hints: false,
|
hints: false,
|
||||||
},
|
},
|
||||||
resolve: {
|
|
||||||
extensions: ['.jsx', '.js', '.tsx', '.ts'],
|
|
||||||
plugins: [
|
|
||||||
new TsConfigPathsPlugin()
|
|
||||||
]
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
|
@ -1,12 +1,11 @@
|
|||||||
$color: #d8dee2;
|
@import '~@styles/variables';
|
||||||
$active-color: #57befc;
|
|
||||||
$active-color-right: #2c8af8;
|
|
||||||
|
|
||||||
.slidebar {
|
.slidebar {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
width: 120px;
|
width: 120px;
|
||||||
|
background: #fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
.slidebar-logo {
|
.slidebar-logo {
|
||||||
@ -37,13 +36,14 @@ $active-color-right: #2c8af8;
|
|||||||
> a,
|
> a,
|
||||||
a:active,
|
a:active,
|
||||||
a:visited {
|
a:visited {
|
||||||
color: $color;
|
color: $color-gray;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
> a.active {
|
> a.active {
|
||||||
background: linear-gradient(to right, $active-color, $active-color-right);
|
background: linear-gradient(to right, $color-primary, $color-primary-dark);
|
||||||
color: #fff;
|
color: #fff;
|
||||||
|
box-shadow: 0 2px 8px rgba($color: $color-primary-dark, $alpha: 0.5);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
25
src/styles/common.scss
Normal file
25
src/styles/common.scss
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
@import 'variables';
|
||||||
|
|
||||||
|
// styles initial
|
||||||
|
html {
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
*,
|
||||||
|
*::before,
|
||||||
|
*::after {
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
box-sizing: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
|
body {
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.app {
|
||||||
|
display: flex;
|
||||||
|
min-height: 100vh;
|
||||||
|
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
|
||||||
|
}
|
19
src/styles/variables.scss
Normal file
19
src/styles/variables.scss
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
/**
|
||||||
|
* Clash Dashboard
|
||||||
|
* Style Common Variables
|
||||||
|
*/
|
||||||
|
|
||||||
|
// primary colors
|
||||||
|
$color-primary: #57befc;
|
||||||
|
$color-primary-dark: #2c8af8;
|
||||||
|
$color-primary-darken: #54759a;
|
||||||
|
$color-primary-light: #7fcae4;
|
||||||
|
$color-primary-lightly: #b4ddf5;
|
||||||
|
|
||||||
|
// common colors
|
||||||
|
$color-gray: #d8dee2;
|
||||||
|
$color-gray-dark: #b7c5d6;
|
||||||
|
$color-gray-darken: #909399;
|
||||||
|
$color-green: #67c23a;
|
||||||
|
$color-orange: #e6a23c;
|
||||||
|
$color-red: #f56c6c;
|
@ -1,22 +1 @@
|
|||||||
html {
|
@import '~@styles/common';
|
||||||
box-sizing: border-box;
|
|
||||||
}
|
|
||||||
|
|
||||||
*,
|
|
||||||
*::before,
|
|
||||||
*::after {
|
|
||||||
margin: 0;
|
|
||||||
padding: 0;
|
|
||||||
box-sizing: inherit;
|
|
||||||
}
|
|
||||||
|
|
||||||
body {
|
|
||||||
margin: 0;
|
|
||||||
padding: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.app {
|
|
||||||
display: flex;
|
|
||||||
min-height: 100vh;
|
|
||||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
|
|
||||||
}
|
|
||||||
|
@ -24,7 +24,9 @@
|
|||||||
"@i18n": ["src/i18n"],
|
"@i18n": ["src/i18n"],
|
||||||
"@i18n/*": ["src/i18n/*"],
|
"@i18n/*": ["src/i18n/*"],
|
||||||
"@stores": ["src/stores"],
|
"@stores": ["src/stores"],
|
||||||
"@stores/*": ["src/stores/*"]
|
"@stores/*": ["src/stores/*"],
|
||||||
|
"@styles": ["src/styles"],
|
||||||
|
"@styles/*": ["src/styles/*"]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"include": [
|
"include": [
|
||||||
|
Loading…
x
Reference in New Issue
Block a user