From f5def6df6751808485adb93fac45ef94c87da37f Mon Sep 17 00:00:00 2001 From: Wenjie Zhang Date: Sat, 14 Sep 2024 02:46:21 +0800 Subject: [PATCH] add tool view --- web/src/layouts/AppLayout.vue | 61 ++++++++++++++++---- web/src/views/ToolsView.vue | 103 ++++++++++++++++++++++++++++++++++ 2 files changed, 153 insertions(+), 11 deletions(-) create mode 100644 web/src/views/ToolsView.vue diff --git a/web/src/layouts/AppLayout.vue b/web/src/layouts/AppLayout.vue index cf6e895c..a1581300 100644 --- a/web/src/layouts/AppLayout.vue +++ b/web/src/layouts/AppLayout.vue @@ -14,6 +14,10 @@ import { GoldOutlined, GoldFilled, BugOutlined, + ProjectFilled, + ProjectOutlined, + StarFilled, + StarOutlined, } from '@ant-design/icons-vue' import { themeConfig } from '@/assets/theme' import { useConfigStore } from '@/stores/config' @@ -73,12 +77,19 @@ console.log(route)
@@ -97,10 +108,11 @@ console.log(route) 设置 - - + + + @@ -139,6 +151,7 @@ console.log(route) div.header, #app-router-view { height: 100%; max-width: 100%; + user-select: none; } #app-router-view { @@ -152,15 +165,15 @@ div.header, #app-router-view { flex: 0 0 70px; justify-content: flex-start; align-items: center; - background-color: var(--main-light-3); + background-color: var(--main-light-4); height: 100%; - width: 70px; + width: 74px; border-right: 1px solid var(--main-light-3); .logo { width: 40px; height: 40px; - margin: 18px 0 35px 0; + margin: 18px 0 18px 0; img { width: 100%; @@ -177,24 +190,50 @@ div.header, #app-router-view { } .nav-item { - padding: 8px 16px; - border: none; + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + width: 56px; + padding: 4px; + padding-top: 10px; + border: 1px solid transparent; border-radius: 8px; background-color: transparent; color: #222; font-size: 20px; transition: background-color 0.2s ease-in-out; margin: 0 10px; + text-decoration: none; + cursor: pointer; + + &.github { + padding: 10px 12px; + } + + &.setting { + padding: 16px 12px; + width: 56px; + } &.active { font-weight: bold; color: var(--main-600); - background-color: rgba( 0, 93, 125, 0.1); + background-color: rgba(255, 255, 255, 0.8); + backdrop-filter: blur(10px); + box-shadow: 0 0 10px 1px rgba(0, 0, 0, 0.05); + border: 1px solid white; } &:hover { - background-color: rgba( 0, 93, 125, 0.1); - cursor: pointer; + background-color: rgba(255, 255, 255, 0.8); + backdrop-filter: blur(10px); + } + + .text { + font-size: 12px; + margin-top: 4px; + text-align: center; } } diff --git a/web/src/views/ToolsView.vue b/web/src/views/ToolsView.vue new file mode 100644 index 00000000..207f3caa --- /dev/null +++ b/web/src/views/ToolsView.vue @@ -0,0 +1,103 @@ + + + + +