Merge pull request #149 from imsyy/dev

fix: 修复部分参数配置无效 #148
This commit is contained in:
底层用户 2023-06-15 10:06:46 +08:00 committed by GitHub
commit a812b15e2a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 44 additions and 57 deletions

15
.env
View File

@ -4,7 +4,8 @@ VITE_SITE_ANTHOR = "無名"
VITE_SITE_KEYWORDS = "無名,个人主页"
VITE_SITE_DES = "一个默默无闻的主页"
VITE_SITE_URL = "imsyy.top"
VITE_SITE_LOGO = "/images/icon/logo.png"
VITE_SITE_LOGO = "/images/icon/favicon.ico"
VITE_SITE_APPLE_LOGO = "/images/logo/apple-touch-icon.png"
# 百度统计(若不需要可不填)
VITE_SITE_BAIDUTONGJI = "14e9f35ff8bc67fd4bcb5f07a6e6655a"
@ -20,16 +21,22 @@ VITE_DESC_TEXT_OTHER = "哎呀,这都被你发现了( 再点击一次可关
# 网站链接
## 请在 src/assets/siteLinks.json 文件中配置
## 网站链接的图标名称可前往 https://www.xicons.org 自行挑选并在 src/components/Links/index.vue 中引入
# 天气 Key
## 请前往高德开放平台注册 **Web服务** Key免费的
## 请各位大佬行行好,别再让我超量了
## 请前往 高德开放平台注册 Web服务 Key
## 请注意不是 Web端 (JS API),免费申请,每日上限 5000 次
## 此处提供的服务可能会超量从而无法访问,请自行申请!请自行申请!请自行申请!
VITE_WEATHER_KEY = "6c13af6fc30868bee488faf2cc652ab4"
# 建站日期
## 请按照 YYYY-MM-DD 格式填写
## 请按照 YYYY-MM-DD 格式填写或者仅填写年份 YYYY
VITE_SITE_START = "2020-10-24"
# ICP 备案号
## 若不需要,请设为空即可
VITE_SITE_ICP = "豫ICP备2022018134号-1"
# 歌曲 API 地址
## 请参照 https://github.com/xizeyoupan/Meting-API#deno-deploy 进行 API 服务部署
## 此处提供的服务可能会超量从而无法访问,请自行部署

View File

@ -6,6 +6,10 @@
<meta http-equiv="Access-Control-Allow-Origin" content="*">
<!-- <meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests"> -->
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="icon" href="<%- logo %>">
<link rel="apple-touch-icon" href="<%- appleLogo %>" />
<link rel="bookmark" href="<%- appleLogo %>" />
<link rel="apple-touch-icon-precomposed" sizes="200x200" href="<%- appleLogo %>" />
<meta name="description" content="<%- description %>" />
<meta name="keywords" content="<%- keywords %>" />
<meta name="author" content="<%- author %>" />
@ -15,8 +19,6 @@
<!-- 本站 CDN 已开启防盗链,非本站域名不可访问,请更改链接为下方内容,否则自定义字体将失效 -->
<!-- https://s1.hdslb.com/bfs/static/jinkela/long/font/regular.css -->
<link rel="stylesheet" href="https://cdn.imsyy.top/gh/imsyy/file/font/HarmonyOS_Sans/regular.min.css" />
<link rel="icon" href="/images/icon/favicon.ico">
<link rel="apple-touch-icon" href="/images/icon/apple-touch-icon.png">
<link rel="stylesheet" href="/loading/loading.min.css">
<!-- IE Out -->
<script>

View File

@ -1,23 +1,27 @@
<template>
<footer>
<div class="power" v-show="!store.playerState">
<span
>Copyright&nbsp;&copy;&nbsp;{{ fullYear }}
<span>
Copyright&nbsp;&copy;
<span v-if="siteStartDate?.length >= 4" class="site-start">
{{ siteStartDate.substring(0, 4) }}
-
</span>
{{ fullYear }}
<a href="https://imsyy.top">無名</a>
</span>
<!-- 以下信息请不要修改哦 -->
<span class="hidden"
>&nbsp;&amp;&nbsp;Made&nbsp;by&nbsp;<a
:href="config.github"
target="_blank"
>
<span class="hidden">
&amp;&nbsp;Made&nbsp;by
<a :href="config.github" target="_blank">
{{ config.author }}
</a></span
>&nbsp;&amp;
</a>
</span>
<!-- 站点备案 -->
<a href="https://beian.miit.gov.cn" target="_blank"
>豫ICP备2022018134号-1</a
>
<a v-if="siteIcp" href="https://beian.miit.gov.cn" target="_blank">
&amp;
{{ siteIcp }}
</a>
</div>
<div class="lrc" v-show="store.playerState">
<music-one theme="filled" size="18" fill="#efefef" />
@ -30,12 +34,17 @@
</template>
<script setup>
import { ref } from "vue";
import { MusicOne } from "@icon-park/vue-next";
import { mainStore } from "@/store";
import config from "@/../package.json";
const store = mainStore();
const store = mainStore();
const fullYear = new Date().getFullYear();
//
const siteStartDate = ref(import.meta.env.VITE_SITE_START);
const siteIcp = ref(import.meta.env.VITE_SITE_ICP);
</script>
<style lang="scss" scoped>

View File

@ -47,6 +47,7 @@
<script setup>
import { onMounted } from "vue";
import { Icon } from "@vicons/utils";
// https://www.xicons.org
import {
Link,
Blog,
@ -77,40 +78,6 @@ const siteIcon = {
LaptopCode,
};
//
const linksData = [
{
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/",
},
];
//
const jumpLink = (data) => {
if (data.name === "音乐" && store.musicClick) {

View File

@ -40,7 +40,7 @@
:stroke-width="20"
:percentage="timeData.year.pass"
/>
<div v-if="startDateText && store.siteStartShow">
<div v-if="startDate?.length >= 4 && store.siteStartShow">
<span class="text" v-html="startDateText" />
<!-- <el-progress
:show-text="false"

View File

@ -35,6 +35,8 @@ export default ({
template: 'index.html',
inject: {
data: {
logo: loadEnv(mode, process.cwd()).VITE_SITE_LOGO,
appleLogo: loadEnv(mode, process.cwd()).VITE_SITE_APPLE_LOGO,
title: loadEnv(mode, process.cwd()).VITE_SITE_NAME,
author: loadEnv(mode, process.cwd()).VITE_SITE_ANTHOR,
keywords: loadEnv(mode, process.cwd()).VITE_SITE_KEYWORDS,