From a1a20e51d6c9efea406cf18facf707ea50e3d18c Mon Sep 17 00:00:00 2001
From: Ntkskwk <natsukawa247@outlook.com>
Date: Tue, 3 Sep 2024 07:41:34 +0800
Subject: refactor: Optimize the structure of the code

---
 site/src/views/index/Right.vue | 160 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 160 insertions(+)
 create mode 100644 site/src/views/index/Right.vue

(limited to 'site/src/views/index/Right.vue')

diff --git a/site/src/views/index/Right.vue b/site/src/views/index/Right.vue
new file mode 100644
index 0000000..e0a70e1
--- /dev/null
+++ b/site/src/views/index/Right.vue
@@ -0,0 +1,160 @@
+<script lang="ts">
+import Notepad from './Notepad/index.vue'
+import DocumentationIcon from '@/components/icons/IconDocumentation.vue'
+import { getChangeLog } from './Notepad/changelog'
+
+
+export default {
+  data() {
+    return {
+      mainPage: 0,
+      tooltip: [
+        "ChangeLog",
+        "What's new?",
+        "敬请期待",
+        "敬请期待",
+      ],
+      title: "",
+      message:"",
+      changeLogMessage:"",
+    }
+  },
+  components: {
+    Notepad,
+    DocumentationIcon
+  },
+  methods: {
+    change_page(n: number) {
+      this.mainPage = n;
+      this.title = this.tooltip[n];
+      switch (n) {
+        case 0:
+          this.message = this.changeLogMessage;
+          break;
+        default:
+          this.message = "敬请期待";
+          break;
+      }
+    },
+    getBgColor(index: number) {
+      if (index < this.mainPage) {
+        return "var(--color-border)"
+      } else if (index == this.mainPage) {
+        return "var(--icon-highlight)"
+      } else {
+        return "var(--color-border-hover)"
+      }
+    }
+  },
+  beforeCreate() {
+    getChangeLog().then(res => {
+      this.changeLogMessage = res;
+      this.change_page(this.mainPage);
+    })
+  },
+}
+
+</script>
+
+<template>
+  <div class="messageBar">
+    <div class="options">
+      <li v-for="(item, index) in tooltip" :key="index" class="item">
+        <el-tooltip :content="item" placement="left" >
+          <i :style="{background:getBgColor(index)}" @mouseover="change_page(index)">
+            <DocumentationIcon/>
+          </i>
+        </el-tooltip>
+      </li>
+    </div>
+    <div class="messageBox">
+      <Notepad :title="title" :message="message"/>
+    </div>
+  </div>
+</template>
+
+<style lang="scss">
+
+.messageBar {
+  display: flex;
+  height: 600px;
+  margin-top: 2rem;
+  position: relative;
+  flex-direction: row;
+}
+
+.messageBar .options{
+  display: flex;
+  flex-direction: column;
+  flex-grow: 1;
+  width: 32px;
+  color: var(--color-text);
+}
+
+.messageBar .options .item{
+  display: flex;
+  margin: auto;
+}
+
+.messageBar .messageBox {
+  height: 100%;
+  width: 100%;
+  overflow-y: auto;
+  overflow-x: hidden;
+}
+
+i {
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  font-size: 1.2rem;
+  color: var(--color-text);
+  width: 32px;
+  height: 32px;
+  border-radius: 8px;
+}
+
+@media screen and (orientation:landscape) {
+  .messageBar {
+    margin-top: 0;
+    padding: 5rem 0 5rem calc(var(--section-gap) / 2);
+  }
+
+  i {
+    left: -26px;
+    position: absolute;
+    border-radius: 8px;
+    width: 50px;
+    height: 50px;
+  }
+
+  // 黑线
+  .messageBar:before {
+    content: ' ';
+    border-left: 1px solid var(--color-border);
+    position: absolute;
+    left: 0;
+    bottom: calc(50% + 25px);
+    height: calc(50% - 25px);
+  }
+
+  // 画白线
+  .messageBar:after {
+    content: ' ';
+    border-left: 1px solid var(--vt-c-divider-light-2);
+    position: absolute;
+    left: 0;
+    top: calc(15%);
+    height: calc(75%);
+    z-index: -10;
+  }
+
+  .messageBar:first-of-type:before {
+    display: none;
+  }
+
+  .item:last-of-type:after {
+    display: none;
+  }
+}
+</style>
-- 
cgit v1.2.3-70-g09d2


From 7b6a0d472c88f55e6f31aa633099f96cd28be8b5 Mon Sep 17 00:00:00 2001
From: Ntkskwk <natsukawa247@outlook.com>
Date: Tue, 3 Sep 2024 07:43:36 +0800
Subject: chore: solve the anomalies of  appearance

---
 site/src/assets/base.css       | 4 ++--
 site/src/assets/main.css       | 4 ++--
 site/src/views/index/Right.vue | 2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)

(limited to 'site/src/views/index/Right.vue')

diff --git a/site/src/assets/base.css b/site/src/assets/base.css
index fe48a2f..9c513a5 100644
--- a/site/src/assets/base.css
+++ b/site/src/assets/base.css
@@ -14,10 +14,10 @@
   /*--vt-c-indigo: #2c3e50;*/
   --vt-c-indigo: rgba(255,255,255,0.5);
 
-  --vt-c-divider-light-1: rgba(60, 60, 60, 0.29);
+  --vt-c-divider-light-1: rgba(60, 60, 60);
   /*边框色*/
   /*--vt-c-divider-light-2: rgba(60, 60, 60, 0.12);*/
-  --vt-c-divider-light-2: rgba(255, 255, 255, 0.12);
+  --vt-c-divider-light-2: rgba(150, 150, 150);
   --vt-c-divider-dark-1: rgba(84, 84, 84, 0.65);
   --vt-c-divider-dark-2: rgba(84, 84, 84, 0.48);
 
diff --git a/site/src/assets/main.css b/site/src/assets/main.css
index 996e651..890703f 100644
--- a/site/src/assets/main.css
+++ b/site/src/assets/main.css
@@ -1,7 +1,7 @@
 @import './base.css';
 
 #app {
-  max-width: 1280px;
+  max-width: 90dvi;
   margin: 0 auto;
   padding: 2rem;
 
@@ -25,7 +25,7 @@ a,
   }
 }
 
-@media (min-width: 1024px) {
+@media screen and (orientation:landscape) {
   body {
     display: flex;
     place-items: center;
diff --git a/site/src/views/index/Right.vue b/site/src/views/index/Right.vue
index e0a70e1..ba8f294 100644
--- a/site/src/views/index/Right.vue
+++ b/site/src/views/index/Right.vue
@@ -141,7 +141,7 @@ i {
   // 画白线
   .messageBar:after {
     content: ' ';
-    border-left: 1px solid var(--vt-c-divider-light-2);
+    border-left: 1px solid var(--vt-c-divider-dark-2);
     position: absolute;
     left: 0;
     top: calc(15%);
-- 
cgit v1.2.3-70-g09d2

