diff --git a/.env b/.env index 116f2ee..edbb31f 100644 --- a/.env +++ b/.env @@ -1,5 +1,6 @@ # 站点名称 VITE_SITE_NAME = "無名の主页" +VITE_SITE_URL = "imsyy.top" # 简介文本 VITE_DESC_HELLO = "Hello World !" diff --git a/src/App.vue b/src/App.vue index fa9dbdc..6d584cb 100644 --- a/src/App.vue +++ b/src/App.vue @@ -3,9 +3,18 @@ - - - + + + + + + + + + + + + @@ -19,7 +28,9 @@ import MainRight from "@/views/Main/Right.vue"; import Background from "@/components/Background/index.vue"; import Footer from "@/components/Footer/index.vue"; import Box from "@/views/Box/index.vue"; +import MoreSet from "@/views/MoreSet/index.vue"; import cursorInit from "@/utils/cursor.js"; +import { helloInit, checkDays } from "@/utils/getTime.js"; import { mainStore } from "@/store"; const store = mainStore(); @@ -31,6 +42,10 @@ const getWidth = () => { onMounted(() => { // 自定义鼠标 cursorInit(); + // 欢迎提示 + helloInit(); + // 默哀模式 + checkDays(); // 加载完成事件 window.addEventListener("load", () => { console.log("加载完成"); @@ -55,14 +70,30 @@ onBeforeUnmount(() => { \ No newline at end of file diff --git a/src/components/TimeCapsule/index.vue b/src/components/TimeCapsule/index.vue index 9367573..4e16b62 100644 --- a/src/components/TimeCapsule/index.vue +++ b/src/components/TimeCapsule/index.vue @@ -70,7 +70,7 @@ onBeforeUnmount(() => { display: flex; flex-direction: row; align-items: center; - margin: 0.5rem 0 1.5rem; + margin: 0.2rem 0 1.5rem; font-size: 1.1rem; .i-icon { display: flex; diff --git a/src/store/index.js b/src/store/index.js index 1bda991..793b5e3 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -6,10 +6,11 @@ export const mainStore = defineStore("main", { state: () => { return { innerWidth: null, // 当前窗口宽度 - coverType: 0, // 壁纸种类 + coverType: "0", // 壁纸种类 musicIsOk: false, // 音乐是否加载完成 musicOpenState: false, // 音乐面板开启状态 boxOpenState: false, // 盒子开启状态 + setOpenState: false, // 设置页面开启状态 playerState: false, // 当前播放状态 playerTitle: null, // 当前播放歌曲名 playerArtist: null, // 当前播放歌手名 diff --git a/src/style/style.scss b/src/style/style.scss index e934b10..0194125 100644 --- a/src/style/style.scss +++ b/src/style/style.scss @@ -23,6 +23,7 @@ p { margin: 0; padding: 0; -webkit-user-select: none; + -webkit-user-drag: none; user-select: none; text-decoration: none; transition: .3s; @@ -116,6 +117,31 @@ p { } +// Tooltip 样式 +.el-popper.is-dark { + background: #ffffff60 !important; + border: 1px solid transparent !important; +} + +// 卡片样式 +.el-card { + border-radius: 8px !important; + border: 1px solid transparent !important; + background-color: transparent !important; + + .el-card__header { + font-weight: bold; + padding: 16px 20px !important; + background-color: #ffffff30 !important; + border-bottom: 1px solid transparent !important; + } + + .el-card__body { + padding: 0 !important; + background-color: #ffffff10 !important; + } +} + // 渐入动画 .fade-enter-active { animation: fade 0.3s ease-in-out; @@ -157,4 +183,16 @@ p { transform: scale(0.5); } +} + +// 滚动条样式 +::-webkit-scrollbar { + width: 6px; + height: 6px; + background-color: transparent; +} + +::-webkit-scrollbar-thumb { + border-radius: 10px; + background-color: #eeeeee; } \ No newline at end of file diff --git a/src/utils/getTime.js b/src/utils/getTime.js index 264d24d..bf3dff5 100644 --- a/src/utils/getTime.js +++ b/src/utils/getTime.js @@ -1,3 +1,10 @@ +import { + h +} from "vue"; +import { + SpaCandle +} from "@icon-park/vue-next"; + // 时钟 export const getCurrentTime = () => { let time = new Date(); @@ -56,4 +63,56 @@ export const getTimeCapsule = () => { pass: parseInt(yearPass), } } +} + +// 欢迎提示 +export const helloInit = () => { + let hour = new Date().getHours(); + let hello = null; + if (hour < 6) { + hello = "凌晨好"; + } else if (hour < 9) { + hello = "早上好"; + } else if (hour < 12) { + hello = "上午好"; + } else if (hour < 14) { + hello = "中午好"; + } else if (hour < 17) { + hello = "下午好"; + } else if (hour < 19) { + hello = "傍晚好"; + } else if (hour < 22) { + hello = "晚上好"; + } else { + hello = "夜深了"; + } + ElMessage({ + dangerouslyUseHTMLString: true, + message: `${hello} 欢迎来到我的主页`, + }); +} + +// 默哀模式 +export const checkDays = () => { + let myDate = new Date; + let mon = myDate.getMonth() + 1; + let date = myDate.getDate(); + let days = ['4.4', '5.12', '7.7', '9.9', '9.18', '12.13']; + for (let day of days) { + let d = day.split('.'); + if (mon == d[0] && date == d[1]) { + console.log("今天是纪念日"); + let gray = document.createElement("style"); + document.body.appendChild(gray); + gray.innerHTML = "html{-webkit-filter:grayscale(100%);-moz-filter:grayscale(100%);-ms-filter:grayscale(100%);-o-filter:grayscale(100%);filter:progid:DXImageTransform.Microsoft.BasicImage(grayscale=1);_filter:none}"; + ElMessage({ + message: "今天是中国国家纪念日", + duration: 14000, + icon: h(SpaCandle, { + theme: "filled", + fill: "#efefef", + }), + }); + } + } } \ No newline at end of file diff --git a/src/views/Box/index.vue b/src/views/Box/index.vue index fc5c31f..5dfa940 100644 --- a/src/views/Box/index.vue +++ b/src/views/Box/index.vue @@ -1,18 +1,12 @@ - + - + + + + @@ -22,7 +16,7 @@ + + \ No newline at end of file