diff --git a/.env b/.env index a1241ca152..ca09b466ed 100644 --- a/.env +++ b/.env @@ -16,15 +16,15 @@ VITE_DESC_HELLO_OTHER = "Oops !" VITE_DESC_TEXT_OTHER = "哎呀,这都被你发现了( 再点击一次可关闭 )" # 社交链接 -## 请在 public 目录下的 socialLinks.json 文件中配置 +## 请在 src/assets/socialLinks.json 文件中配置 # 网站链接 -## 请在 src/components/Links/index.vue 文件中配置 +## 请在 src/assets/siteLinks.json 文件中配置 # 天气 Key -## 请前往高德开放平台注册 Web服务 Key(免费的) +## 请前往高德开放平台注册 **Web服务** Key(免费的) ## 请各位大佬行行好,别再让我超量了 -VITE_WEATHER_KEY = "57eaea5833ff1616cfd1ff2c4cf9b58a" +VITE_WEATHER_KEY = "6c13af6fc30868bee488faf2cc652ab4" # 建站日期 ## 请按照 YYYY-MM-DD 格式填写 diff --git a/README.md b/README.md index 264ccd3ae9..04e2f0cfb2 100644 --- a/README.md +++ b/README.md @@ -27,8 +27,6 @@ - [x] 音乐播放器 - [x] 移动端适配 -* [ ] 播放器取消使用 Aplayer - ### 部署 * **安装** [node.js](https://nodejs.org/zh-cn/) **环境** diff --git a/package.json b/package.json index c81c416998..9d543087a8 100644 --- a/package.json +++ b/package.json @@ -19,6 +19,7 @@ "fetch-jsonp": "^1.2.3", "pinia": "^2.0.23", "pinia-plugin-persistedstate": "^3.0.0", + "swiper": "^9.3.2", "terser": "^5.16.1", "vue": "^3.2.37", "vue3-aplayer": "^1.7.3" diff --git a/src/App.vue b/src/App.vue index 329d99ba9b..e614aa0e89 100644 --- a/src/App.vue +++ b/src/App.vue @@ -55,18 +55,18 @@ const getWidth = () => { onMounted(() => { // 自定义鼠标 cursorInit(); - // 欢迎提示 - helloInit(); - // 默哀模式 - checkDays(); // 加载完成事件 window.addEventListener("load", () => { console.log("加载完成"); // 去除加载标记 document.getElementsByTagName("body")[0].className = ""; // 给加载动画添加结束标记 - let loadingBox = document.getElementById("loading-box"); + const loadingBox = document.getElementById("loading-box"); loadingBox.classList.add("loaded"); + // 欢迎提示 + helloInit(); + // 默哀模式 + checkDays(); }); // 屏蔽右键 @@ -207,4 +207,4 @@ main { filter: blur(10px); } } - \ No newline at end of file + diff --git a/src/api/index.js b/src/api/index.js index fa9adc0691..6aeb9be89f 100644 --- a/src/api/index.js +++ b/src/api/index.js @@ -67,13 +67,3 @@ export const getWeather = async (key, city) => { ); return await res.json(); }; - -/** - * 获取配置 - */ - -// 获取社交链接 -export const getSocialLinks = async () => { - const res = await fetch("/socialLinks.json"); - return await res.json(); -}; diff --git a/src/assets/siteLinks.json b/src/assets/siteLinks.json new file mode 100644 index 0000000000..048680bec1 --- /dev/null +++ b/src/assets/siteLinks.json @@ -0,0 +1,41 @@ +[ + [ + { + "icon": "Blog", + "name": "博客", + "link": "https://blog.imsyy.top/" + }, + { + "icon": "Cloud", + "name": "网盘", + "link": "https://pan.imsyy.top/" + }, + { + "icon": "CompactDisc", + "name": "音乐", + "link": "https://music.imsyy.top/" + }, + { + "icon": "Compass", + "name": "起始页", + "link": "https://nav.imsyy.top/" + }, + { + "icon": "Book", + "name": "网址集", + "link": "https://web.imsyy.top/" + }, + { + "icon": "Fire", + "name": "今日热榜", + "link": "https://hot.imsyy.top/" + } + ], + [ + { + "icon": "LaptopCode", + "name": "站点监测", + "link": "https://status.imsyy.top/" + } + ] +] diff --git a/public/socialLinks.json b/src/assets/socialLinks.json similarity index 100% rename from public/socialLinks.json rename to src/assets/socialLinks.json diff --git a/src/assets/vue.svg b/src/assets/vue.svg deleted file mode 100644 index 770e9d333e..0000000000 --- a/src/assets/vue.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/components/Background/index.vue b/src/components/Background/index.vue index cd31874d54..6bd044a4ad 100644 --- a/src/components/Background/index.vue +++ b/src/components/Background/index.vue @@ -20,7 +20,7 @@ import { SuccessPicture } from "@icon-park/vue-next"; import { mainStore } from "@/store"; const store = mainStore(); -let bgUrl = ref(null); // 壁纸链接 +const bgUrl = ref(null); // 壁纸链接 const changeBg = (type) => { if (type == 0) { diff --git a/src/components/Footer/index.vue b/src/components/Footer/index.vue index d594d25184..c3b10bced0 100644 --- a/src/components/Footer/index.vue +++ b/src/components/Footer/index.vue @@ -35,7 +35,7 @@ import { mainStore } from "@/store"; import config from "@/../package.json"; const store = mainStore(); -let fullYear = new Date().getFullYear(); +const fullYear = new Date().getFullYear(); \ No newline at end of file + diff --git a/src/components/Message/index.vue b/src/components/Message/index.vue index ee2f847c2c..8f1f9a1d29 100644 --- a/src/components/Message/index.vue +++ b/src/components/Message/index.vue @@ -36,12 +36,12 @@ import { mainStore } from "@/store"; const store = mainStore(); // 主页站点logo -let siteLogo = import.meta.env.VITE_SITE_LOGO; +const siteLogo = import.meta.env.VITE_SITE_LOGO; // 站点链接 -let siteUrl = import.meta.env.VITE_SITE_URL.split("."); +const siteUrl = import.meta.env.VITE_SITE_URL.split("."); // 简介区域文字 -let descriptionText = reactive({ +const descriptionText = reactive({ hello: import.meta.env.VITE_DESC_HELLO, text: import.meta.env.VITE_DESC_TEXT, }); diff --git a/src/components/Music/index.vue b/src/components/Music/index.vue index 9c1b18556c..1debdd4e2b 100644 --- a/src/components/Music/index.vue +++ b/src/components/Music/index.vue @@ -7,7 +7,7 @@ v-show="store.musicOpenState" >
- 音乐列表 + 音乐列表 回到一言
@@ -103,7 +103,7 @@ \ No newline at end of file + diff --git a/src/components/TimeCapsule/index.vue b/src/components/TimeCapsule/index.vue index 850cf5bd6a..318bc261cb 100644 --- a/src/components/TimeCapsule/index.vue +++ b/src/components/TimeCapsule/index.vue @@ -61,13 +61,13 @@ import { mainStore } from "@/store"; const store = mainStore(); // 进度条数据 -let timeData = ref(getTimeCapsule()); -let startDate = ref(import.meta.env.VITE_SITE_START); -let startDateText = ref(null); -let timeInterval = null; +const timeData = ref(getTimeCapsule()); +const startDate = ref(import.meta.env.VITE_SITE_START); +const startDateText = ref(null); +const timeInterval = ref(null); onMounted(() => { - timeInterval = setInterval(() => { + timeInterval.value = setInterval(() => { timeData.value = getTimeCapsule(); if (startDate.value) startDateText.value = siteDateStatistics(new Date(startDate.value)); @@ -75,7 +75,7 @@ onMounted(() => { }); onBeforeUnmount(() => { - clearInterval(timeInterval); + clearInterval(timeInterval.value); }); diff --git a/src/components/Weather/index.vue b/src/components/Weather/index.vue index 9e1e244d00..c895c76706 100644 --- a/src/components/Weather/index.vue +++ b/src/components/Weather/index.vue @@ -20,10 +20,10 @@ import { getAdcode, getWeather } from "@/api"; import { Error } from "@icon-park/vue-next"; // 高德开发者 Key -let mainKey = import.meta.env.VITE_WEATHER_KEY; +const mainKey = import.meta.env.VITE_WEATHER_KEY; // 天气数据 -let weatherData = reactive({ +const weatherData = reactive({ adCode: { city: null, // 城市 adcode: null, // 城市编码 diff --git a/src/store/index.js b/src/store/index.js index 2ea7a8a92f..52dae51d52 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -1,75 +1,73 @@ -import { - defineStore -} from "pinia"; +import { defineStore } from "pinia"; export const mainStore = defineStore("main", { - state: () => { - return { - innerWidth: null, // 当前窗口宽度 - coverType: "0", // 壁纸种类 - siteStartShow: true, // 建站日期显示 - musicIsOk: false, // 音乐是否加载完成 - musicVolume: 0, // 音乐音量; - musicOpenState: false, // 音乐面板开启状态 - backgroundShow: false, // 壁纸展示状态 - boxOpenState: false, // 盒子开启状态 - mobileOpenState: false, // 移动端开启状态 - mobileFuncState: false, // 移动端功能区开启状态 - setOpenState: false, // 设置页面开启状态 - playerState: false, // 当前播放状态 - playerTitle: null, // 当前播放歌曲名 - playerArtist: null, // 当前播放歌手名 - playerLrc: "歌词加载中", // 当前播放歌词 - } + state: () => { + return { + innerWidth: null, // 当前窗口宽度 + coverType: "0", // 壁纸种类 + siteStartShow: true, // 建站日期显示 + musicIsOk: false, // 音乐是否加载完成 + musicVolume: 0, // 音乐音量; + musicOpenState: false, // 音乐面板开启状态 + backgroundShow: false, // 壁纸展示状态 + boxOpenState: false, // 盒子开启状态 + mobileOpenState: false, // 移动端开启状态 + mobileFuncState: false, // 移动端功能区开启状态 + setOpenState: false, // 设置页面开启状态 + playerState: false, // 当前播放状态 + playerTitle: null, // 当前播放歌曲名 + playerArtist: null, // 当前播放歌手名 + playerLrc: "歌词加载中", // 当前播放歌词 + musicClick: false, // 音乐链接是否跳转 + }; + }, + getters: { + // 获取歌词 + getPlayerLrc(state) { + return state.playerLrc; }, - getters: { - // 获取歌词 - getPlayerLrc(state) { - return state.playerLrc; - }, - // 获取歌曲信息 - getPlayerData(state) { - return { - name: state.playerTitle, - artist: state.playerArtist, - } - }, - // 获取页面宽度 - getInnerWidth(state) { - return state.innerWidth; - } + // 获取歌曲信息 + getPlayerData(state) { + return { + name: state.playerTitle, + artist: state.playerArtist, + }; }, - actions: { - // 更改当前页面宽度 - setInnerWidth(value) { - this.innerWidth = value; - if (value >= 720) { - this.mobileOpenState = false; - this.mobileFuncState = false; - } - }, - // 更改播放状态 - setPlayerState(value) { - if (value) { - this.playerState = false; - } else { - this.playerState = true; - } - - }, - // 更改歌词 - setPlayerLrc(value) { - this.playerLrc = value; - }, - // 更改歌曲数据 - setPlayerData(title, artist) { - this.playerTitle = title; - this.playerArtist = artist; - } + // 获取页面宽度 + getInnerWidth(state) { + return state.innerWidth; + }, + }, + actions: { + // 更改当前页面宽度 + setInnerWidth(value) { + this.innerWidth = value; + if (value >= 720) { + this.mobileOpenState = false; + this.mobileFuncState = false; + } + }, + // 更改播放状态 + setPlayerState(value) { + if (value) { + this.playerState = false; + } else { + this.playerState = true; + } + }, + // 更改歌词 + setPlayerLrc(value) { + this.playerLrc = value; }, - persist: { - key: 'data', - storage: window.localStorage, - paths: ['coverType', 'musicVolume', 'siteStartShow'], + // 更改歌曲数据 + setPlayerData(title, artist) { + this.playerTitle = title; + this.playerArtist = artist; }, -}) \ No newline at end of file + }, + persist: { + key: "data", + storage: window.localStorage, + paths: ["coverType", "musicVolume", "siteStartShow", "musicClick"], + }, +}); diff --git a/src/style/global.css b/src/style/global.css deleted file mode 100644 index 0d7a3d5d96..0000000000 --- a/src/style/global.css +++ /dev/null @@ -1,32 +0,0 @@ -@charset "UTF-8"; -.container { - max-width: 1200px; -} - -/* 小于1200px时 */ -@media (max-width: 1380px) { - .el-radio-group { - justify-content: center !important; - } -} -/* 小于1200px时 */ -@media (max-width: 1200px) { - .container { - max-width: 1000px; - } - .sm-hidden { - display: none; - } -} -/* 小于992px时 */ -@media (max-width: 992px) { - .container { - max-width: 900px; - } -} -/* 小于720px时 */ -@media (max-width: 720px) { - .xs-hidden { - display: none; - } -}/*# sourceMappingURL=global.css.map */ \ No newline at end of file diff --git a/src/style/global.css.map b/src/style/global.css.map deleted file mode 100644 index de0f57aae8..0000000000 --- a/src/style/global.css.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["global.css","global.scss"],"names":[],"mappings":"AAAA,gBAAgB;ACIZ;EACI,iBAFqB;ADA7B;;ACSA,cAAA;AACA;EACI;IACI,kCAAA;EDNN;AACF;ACSA,cAAA;AACA;EAhBI;IACI,iBAgB2B;EDNjC;ECSE;IACI,aAAA;EDPN;AACF;ACUA,aAAA;AACA;EA1BI;IACI,gBA0B2B;EDPjC;AACF;ACSA,aAAA;AACA;EAGI;IACI,aAAA;EDTN;AACF","file":"global.css"} \ No newline at end of file diff --git a/src/style/style.css b/src/style/style.css deleted file mode 100644 index 3c7aee2c3e..0000000000 --- a/src/style/style.css +++ /dev/null @@ -1,179 +0,0 @@ -@charset "UTF-8"; -/* -作者: imsyy -主页:https://www.imsyy.top/ -GitHub:https://github.com/imsyy/home -版权所有,请勿删除 -*/ -/*全局样式*/ -html, -body { - width: 100%; - height: 100%; - background-color: #333; - overflow: hidden; -} - -*, -a, -p { - margin: 0; - padding: 0; - -webkit-user-select: none; - -webkit-user-drag: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; - text-decoration: none; - transition: 0.3s; - color: #fff; - box-sizing: border-box; -} -*:hover, -a:hover, -p:hover { - transition: 0.3s; -} - -@font-face { - font-family: "Pacifico-Regular"; - src: url("/font/Pacifico-Regular.ttf") format("truetype"); -} -@font-face { - font-family: "UnidreamLED"; - src: url("/font/UnidreamLED.ttf") format("truetype"); -} -#app { - position: absolute; - top: 0; - left: 0; - width: 100vw; - height: 100vh; - z-index: 0; -} - -.cards { - border-radius: 6px; - background: rgba(0, 0, 0, 0.2509803922); - -webkit-backdrop-filter: blur(10px); - backdrop-filter: blur(10px); - transform: scale(1); - transition: 0.5s; - animation: fade; - -webkit-animation: fade 0.5s; -} - -.cards:hover { - transform: scale(1.01); - transition: 0.5s; -} - -.cards:active { - transform: scale(0.98); - transition: 0.5s; -} - -.el-message { - --el-message-bg-color: #00000040 !important; - --el-message-text-color: #efefef !important; - -webkit-backdrop-filter: blur(10px); - backdrop-filter: blur(10px); - border-radius: 25px !important; - border-color: transparent !important; -} -.el-message .el-message__badge { - display: none; -} - -.el-progress-bar .el-progress-bar__outer { - border-radius: 6px; - background-color: rgba(0, 0, 0, 0.1254901961); -} -.el-progress-bar .el-progress-bar__outer .el-progress-bar__inner { - background-color: #efefef; - border-radius: 6px; - text-align: center; - font-family: "UnidreamLED"; -} -.el-progress-bar .el-progress-bar__outer .el-progress-bar__inner span { - color: #564d59; - font-size: 0.9rem; -} - -.el-popper.is-dark { - background: rgba(255, 255, 255, 0.3764705882) !important; - border: 1px solid transparent !important; -} - -.el-card { - border-radius: 8px !important; - border: 1px solid transparent !important; - background-color: transparent !important; -} -.el-card .el-card__header { - font-weight: bold; - padding: 16px 20px !important; - background-color: rgba(255, 255, 255, 0.1882352941) !important; - border-bottom: 1px solid transparent !important; -} -.el-card .el-card__body { - padding: 0 !important; - background-color: rgba(255, 255, 255, 0.062745098) !important; -} - -.fade-enter-active { - -webkit-animation: fade 0.3s ease-in-out; - animation: fade 0.3s ease-in-out; -} - -.fade-leave-active { - animation: fade 0.3s ease-in-out reverse; -} - -@-webkit-keyframes fade { - 0% { - opacity: 0; - } - 100% { - opacity: 1; - } -} - -@keyframes fade { - 0% { - opacity: 0; - } - 100% { - opacity: 1; - } -} -#cursor { - position: fixed; - width: 18px; - height: 18px; - background: #fff; - border-radius: 25px; - opacity: 0.25; - z-index: 10086; - pointer-events: none; - transition: 0.2s ease-in-out; - transition-property: background, opacity, transform; -} -#cursor.hidden { - opacity: 0; -} -#cursor.active { - opacity: 0.5; - transform: scale(0.5); -} - -::-webkit-scrollbar { - width: 6px; - height: 6px; - background-color: transparent; -} - -::-webkit-scrollbar-thumb { - border-radius: 10px; - background-color: #eeeeee; -}/*# sourceMappingURL=style.css.map */ \ No newline at end of file diff --git a/src/style/style.css.map b/src/style/style.css.map deleted file mode 100644 index f354fb707d..0000000000 --- a/src/style/style.css.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["style.css","style.scss"],"names":[],"mappings":"AAAA,gBAAgB;ACAhB;;;;;CAAA;AASA,OAAA;AAEA;;EAEI,WAAA;EACA,YAAA;EACA,sBAAA;EACA,gBAAA;ADFJ;;ACKA;;;EAGI,SAAA;EACA,UAAA;EACA,yBAAA;EACA,uBAAA;EACA,sBAAA;GAAA,qBAAA;OAAA,iBAAA;EACA,qBAAA;EACA,gBAAA;EACA,WAAA;EACA,sBAAA;ADFJ;ACII;;;EACI,gBAAA;ADAR;;ACOA;EACI,+BAAA;EACA,yDAAA;ADJJ;ACOA;EACI,0BAAA;EACA,oDAAA;ADLJ;ACUA;EACI,kBAAA;EACA,MAAA;EACA,OAAA;EACA,YAAA;EACA,aAAA;EACA,UAAA;ADRJ;;ACYA;EACI,kBAAA;EACA,uCAAA;EACA,mCAAA;EACA,2BAAA;EACA,mBAAA;EACA,gBAAA;EACA,eAAA;EACA,4BAAA;ADTJ;;ACYA;EACI,sBAAA;EACA,gBAAA;ADTJ;;ACYA;EACI,sBAAA;EACA,gBAAA;ADTJ;;ACaA;EACI,2CAAA;EACA,2CAAA;EACA,mCAAA;EACA,2BAAA;EACA,8BAAA;EACA,oCAAA;ADVJ;ACYI;EACI,aAAA;ADVR;;ACgBI;EACI,kBAAA;EACA,6CAAA;ADbR;ACeQ;EACI,yBAAA;EACA,kBAAA;EACA,kBAAA;EACA,0BAAA;ADbZ;ACeY;EACI,cAAA;EACA,iBAAA;ADbhB;;ACsBA;EACI,wDAAA;EACA,wCAAA;ADnBJ;;ACuBA;EACI,6BAAA;EACA,wCAAA;EACA,wCAAA;ADpBJ;ACsBI;EACI,iBAAA;EACA,6BAAA;EACA,8DAAA;EACA,+CAAA;ADpBR;ACuBI;EACI,qBAAA;EACA,6DAAA;ADrBR;;AC0BA;EACI,wCAAA;UAAA,gCAAA;ADvBJ;;AC0BA;EACI,wCAAA;ADvBJ;;AC0BA;EACI;IACI,UAAA;EDvBN;EC0BE;IACI,UAAA;EDxBN;AACF;;ACiBA;EACI;IACI,UAAA;EDvBN;EC0BE;IACI,UAAA;EDxBN;AACF;AC4BA;EACI,eAAA;EACA,WAAA;EACA,YAAA;EACA,gBAAA;EACA,mBAAA;EACA,aAAA;EACA,cAAA;EACA,oBAAA;EACA,4BAAA;EACA,mDAAA;AD1BJ;AC4BI;EACI,UAAA;AD1BR;AC6BI;EACI,YAAA;EACA,qBAAA;AD3BR;;ACiCA;EACI,UAAA;EACA,WAAA;EACA,6BAAA;AD9BJ;;ACiCA;EACI,mBAAA;EACA,yBAAA;AD9BJ","file":"style.css"} \ No newline at end of file diff --git a/src/style/style.scss b/src/style/style.scss index c6744a7770..646f232947 100644 --- a/src/style/style.scss +++ b/src/style/style.scss @@ -11,191 +11,189 @@ GitHub:https://github.com/imsyy/home html, body { - width: 100%; - height: 100%; - background-color: #333; - overflow: hidden; - font-family: 'HarmonyOS_Regular', sans-serif; + width: 100%; + height: 100%; + background-color: #333; + overflow: hidden; + font-family: "HarmonyOS_Regular", sans-serif; } *, a, p { - margin: 0; - padding: 0; - -webkit-user-select: none; - -webkit-user-drag: none; - user-select: none; - text-decoration: none; - color: #fff; - box-sizing: border-box; - - &:hover { - transition: .3s; - } -} + margin: 0; + padding: 0; + -webkit-user-select: none; + -webkit-user-drag: none; + user-select: none; + text-decoration: none; + color: #fff; + box-sizing: border-box; + &:hover { + transition: 0.3s; + } +} // 字体文件 @font-face { - font-family: "Pacifico-Regular"; - src: url('/font/Pacifico-Regular.ttf') format('truetype'); + font-family: "Pacifico-Regular"; + src: url("/font/Pacifico-Regular.ttf") format("truetype"); } @font-face { - font-family: "UnidreamLED"; - src: url('/font/UnidreamLED.ttf') format('truetype'); + font-family: "UnidreamLED"; + src: url("/font/UnidreamLED.ttf") format("truetype"); } - // 基础样式 #app { - position: fixed; - top: 0; - left: 0; - width: 100vw; - height: 100vh; - z-index: 0; + position: fixed; + top: 0; + left: 0; + width: 100vw; + height: 100vh; + z-index: 0; } // 卡片样式 .cards { - border-radius: 6px; - background: #00000040; - -webkit-backdrop-filter: blur(10px); - backdrop-filter: blur(10px); - transform: scale(1); - transition: all 0.3s; + border-radius: 6px; + background: #00000040; + -webkit-backdrop-filter: blur(10px); + backdrop-filter: blur(10px); + transform: scale(1); + transition: all 0.3s; } .cards:hover { - transform: scale(1.01); + transform: scale(1.01); } .cards:active { - transform: scale(0.98); + transform: scale(0.98); } // 文字超出 .text-hidden { - overflow: hidden; - white-space: nowrap; - text-overflow: ellipsis; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; } // 弹窗样式 .el-message { - --el-message-bg-color: #00000040 !important; - --el-message-text-color: #efefef !important; - -webkit-backdrop-filter: blur(10px); - backdrop-filter: blur(10px); - border-radius: 25px !important; - border-color: transparent !important; - - .el-message__badge { - display: none; - } + --el-message-bg-color: #00000040 !important; + --el-message-text-color: #efefef !important; + -webkit-backdrop-filter: blur(10px); + backdrop-filter: blur(10px); + border-radius: 25px !important; + border-color: transparent !important; + + .el-message__badge { + display: none; + } + .el-message__content { + white-space: nowrap; + } } // 进度条样式 .el-progress-bar { - .el-progress-bar__outer { - border-radius: 6px; - background-color: #00000020; - - .el-progress-bar__inner { - background-color: #efefef; - border-radius: 6px; - text-align: center; - font-family: 'UnidreamLED'; - - span { - color: #564d59; - font-size: .9rem; - } - - } + .el-progress-bar__outer { + border-radius: 6px; + background-color: #00000020; + + .el-progress-bar__inner { + background-color: #efefef; + border-radius: 6px; + text-align: center; + font-family: "UnidreamLED"; + + span { + color: #564d59; + font-size: 0.9rem; + } } - + } } // Tooltip 样式 .el-popper.is-dark { - background: #ffffff60 !important; - border: 1px solid transparent !important; + 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; - } + border-radius: 8px !important; + border: 1px solid transparent !important; + background-color: transparent !important; - .el-card__body { - padding: 0 !important; - background-color: #ffffff10 !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; + } } // 渐入动画 @keyframes fade { - 0% { - opacity: 0; - } + 0% { + opacity: 0; + } - 100% { - opacity: 1; - } + 100% { + opacity: 1; + } } // 隐藏元素 @media (min-width: 910px) and (max-width: 1200px) { - .sm-hidden { - display: none; - } + .sm-hidden { + display: none; + } } - // 自定义鼠标 #cursor { - position: fixed; - width: 18px; - height: 18px; - background: #fff; - border-radius: 25px; - opacity: 0.25; - z-index: 10086; - pointer-events: none; - transition: 0.2s ease-in-out; - transition-property: background, opacity, transform; - - &.hidden { - opacity: 0; - } - - &.active { - opacity: 0.5; - transform: scale(0.5); - } + position: fixed; + width: 18px; + height: 18px; + background: #fff; + border-radius: 25px; + opacity: 0.25; + z-index: 10086; + pointer-events: none; + transition: 0.2s ease-in-out; + transition-property: background, opacity, transform; + + &.hidden { + opacity: 0; + } + + &.active { + opacity: 0.5; + transform: scale(0.5); + } } // 滚动条样式 ::-webkit-scrollbar, scrollbar { - width: 6px; - height: 6px; - background-color: transparent; + width: 6px; + height: 6px; + background-color: transparent; } ::-webkit-scrollbar-thumb, scrollbar-thumb { - border-radius: 10px; - background-color: #eeeeee; -} \ No newline at end of file + border-radius: 10px; + background-color: #eeeeee; +} diff --git a/src/views/Box/index.vue b/src/views/Box/index.vue index 5f5f00af56..e789f9f0e7 100644 --- a/src/views/Box/index.vue +++ b/src/views/Box/index.vue @@ -33,11 +33,11 @@ \ No newline at end of file + diff --git a/src/views/Func/index.vue b/src/views/Func/index.vue index 6b98b5dc84..61da459237 100644 --- a/src/views/Func/index.vue +++ b/src/views/Func/index.vue @@ -43,17 +43,17 @@ import Weather from "@/components/Weather/index.vue"; const store = mainStore(); // 当前时间 -let currentTime = ref({}); -let timeInterval = null; +const currentTime = ref({}); +const timeInterval = ref(null); onMounted(() => { - timeInterval = setInterval(() => { + timeInterval.value = setInterval(() => { currentTime.value = getCurrentTime(); }, 1000); }); onBeforeUnmount(() => { - clearInterval(timeInterval); + clearInterval(timeInterval.value); }); @@ -137,4 +137,4 @@ onBeforeUnmount(() => { } } } - \ No newline at end of file + diff --git a/src/views/Main/Right.vue b/src/views/Main/Right.vue index da1162208a..d10857ef6c 100644 --- a/src/views/Main/Right.vue +++ b/src/views/Main/Right.vue @@ -13,14 +13,13 @@ @@ -30,13 +29,13 @@ let siteUrl = import.meta.env.VITE_SITE_URL.split("."); width: 50%; margin-left: 0.75rem; .logo { - width: 80%; + width: 100%; font-family: "Pacifico-Regular"; font-size: 1.75rem; position: fixed; top: 6%; - left: 50%; - transform: translateX(-50%); + left: 0; + text-align: center; transition: all 0.3s; animation: fade; -webkit-animation: fade 0.5s; diff --git a/src/views/MoreSet/index.vue b/src/views/MoreSet/index.vue index 0f14dcfee9..7f6043f1f4 100644 --- a/src/views/MoreSet/index.vue +++ b/src/views/MoreSet/index.vue @@ -79,13 +79,13 @@ import Set from "@/components/Set/index.vue"; import config from "@/../package.json"; const store = mainStore(); -let closeShow = ref(false); +const closeShow = ref(false); // 站点链接 -let siteUrl = import.meta.env.VITE_SITE_URL.split("."); +const siteUrl = import.meta.env.VITE_SITE_URL.split("."); // 更新日志 -let upData = reactive({ +const upData = reactive({ new: [ "采用 Vue 进行重构", "音乐歌单支持快速自定义", diff --git a/yarn.lock b/yarn.lock index e72b3828ac..635d82beb7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3040,6 +3040,11 @@ sourcemap-codec@^1.4.8: resolved "https://registry.npmmirror.com/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz" integrity sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA== +ssr-window@^4.0.2: + version "4.0.2" + resolved "https://registry.npmmirror.com/ssr-window/-/ssr-window-4.0.2.tgz#dc6b3ee37be86ac0e3ddc60030f7b3bc9b8553be" + integrity sha512-ISv/Ch+ig7SOtw7G2+qkwfVASzazUnvlDTwypdLoPoySv+6MqlOV10VwPSE6EWkGjhW50lUmghPmpYZXMu/+AQ== + string.prototype.matchall@^4.0.6: version "4.0.8" resolved "https://registry.npmmirror.com/string.prototype.matchall/-/string.prototype.matchall-4.0.8.tgz#3bf85722021816dcd1bf38bb714915887ca79fd3" @@ -3112,6 +3117,13 @@ supports-preserve-symlinks-flag@^1.0.0: resolved "https://registry.npmmirror.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz" integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w== +swiper@^9.3.2: + version "9.3.2" + resolved "https://registry.npmmirror.com/swiper/-/swiper-9.3.2.tgz#f29eddb17f231221c7727372637c44279174a4e1" + integrity sha512-Kj9Z4kXRmJR3YT/Wj+XLWj8P6IcRt+WG38uL8M3/Wny7+6sV0TlP9vnE1X+Co9c7VzNooojWGnFa+Wf/9+CUMA== + dependencies: + ssr-window "^4.0.2" + temp-dir@^2.0.0: version "2.0.0" resolved "https://registry.npmmirror.com/temp-dir/-/temp-dir-2.0.0.tgz#bde92b05bdfeb1516e804c9c00ad45177f31321e" @@ -3311,7 +3323,7 @@ uri-js@^4.2.2: vite-plugin-html@^3.2.0: version "3.2.0" - resolved "https://registry.npmmirror.com/vite-plugin-html/-/vite-plugin-html-3.2.0.tgz" + resolved "https://registry.npmmirror.com/vite-plugin-html/-/vite-plugin-html-3.2.0.tgz#0d4df9900642a321a139f1c25c05195ba9d0ec79" integrity sha512-2VLCeDiHmV/BqqNn5h2V+4280KRgQzCFN47cst3WiNK848klESPQnzuC3okH5XHtgwHH/6s1Ho/YV6yIO0pgoQ== dependencies: "@rollup/pluginutils" "^4.2.0"