diff --git a/src/styles/variables.scss b/src/styles/variables.scss
new file mode 100644
index 00000000..d11bc6cb
--- /dev/null
+++ b/src/styles/variables.scss
@@ -0,0 +1,20 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+$font-color: #3d444f;
+$active-color: #409eff;
+$theme-background: #fff;
diff --git a/src/views/dashboard/List.vue b/src/views/dashboard/List.vue
index d81fe692..85f6abfe 100644
--- a/src/views/dashboard/List.vue
+++ b/src/views/dashboard/List.vue
@@ -55,7 +55,7 @@ limitations under the License. -->
-
+
@@ -481,7 +481,7 @@ limitations under the License. -->
.table {
padding: 20px 10px;
background-color: #fff;
- box-shadow: 0px 1px 4px 0px #00000029;
+ box-shadow: 0 1px 4px 0 #00000029;
border-radius: 5px;
width: 100%;
height: 100%;
diff --git a/src/views/dashboard/controls/Widget.vue b/src/views/dashboard/controls/Widget.vue
index c13f90fa..3a4dfb77 100644
--- a/src/views/dashboard/controls/Widget.vue
+++ b/src/views/dashboard/controls/Widget.vue
@@ -293,7 +293,7 @@ limitations under the License. -->
text-align: center;
&:hover {
- color: #409eff;
+ color: $active-color;
background-color: #eee;
}
}
diff --git a/vite.config.ts b/vite.config.ts
index 249c133e..1249a573 100644
--- a/vite.config.ts
+++ b/vite.config.ts
@@ -27,6 +27,7 @@ import path from "path";
import { createSvgIconsPlugin } from "vite-plugin-svg-icons";
const OUTPUT_DIR = "dist";
+const pathSrc = path.resolve(__dirname, "./src");
// https://vitejs.dev/config/
export default ({ mode }: ConfigEnv): UserConfig => {
const { VITE_SW_PROXY_TARGET } = loadEnv(mode, process.cwd());
@@ -54,11 +55,19 @@ export default ({ mode }: ConfigEnv): UserConfig => {
resolve: {
extensions: [".mjs", ".js", ".ts", ".jsx", ".tsx", ".json", ".vue"],
alias: {
- "@": path.resolve(__dirname, "./src"),
+ "@": pathSrc,
"vue-i18n": "vue-i18n/dist/vue-i18n.cjs.js",
},
preserveSymlinks: true,
},
+ css: {
+ preprocessorOptions: {
+ //define global scss variable
+ scss: {
+ additionalData: `@import "@/styles/variables.scss";`,
+ },
+ },
+ },
server: {
host: true,
port: 3000,