Skip to content

Commit

Permalink
Merge pull request #149 from imsyy/dev
Browse files Browse the repository at this point in the history
fix: 修复部分参数配置无效 #148
  • Loading branch information
imsyy authored Jun 15, 2023
2 parents 8bbf410 + ff83ffd commit a812b15
Show file tree
Hide file tree
Showing 6 changed files with 44 additions and 57 deletions.
17 changes: 12 additions & 5 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -20,20 +21,26 @@ 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 服务部署
## 此处提供的服务可能会超量从而无法访问,请自行部署
## 若使用QQ音乐歌单,歌曲数量最好不要超出50首
## 若使用 QQ 音乐歌单,歌曲数量最好不要超出 50 首
## 备用:https://api.wuenci.com/meting/api/
VITE_SONG_API = "https://api-meting.imsyy.top/api"
# 歌曲服务器 ( netease-网易云, tencent-qq音乐 )
Expand Down
8 changes: 5 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -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 %>" />
Expand All @@ -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>
Expand All @@ -28,7 +30,7 @@
<!-- 百度统计 -->
<script>
var _hmt = _hmt || [];
(function () {
(function() {
var hm = document.createElement("script");
hm.src = "https://hm.baidu.com/hm.js?<%- tongji %>";
var s = document.getElementsByTagName("script")[0];
Expand Down
37 changes: 23 additions & 14 deletions src/components/Footer/index.vue
Original file line number Diff line number Diff line change
@@ -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" />
Expand All @@ -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>
Expand Down Expand Up @@ -87,4 +96,4 @@ footer {
}
}
}
</style>
</style>
35 changes: 1 addition & 34 deletions src/components/Links/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
<script setup>
import { onMounted } from "vue";
import { Icon } from "@vicons/utils";
// 可前往 https://www.xicons.org 自行挑选并在此处引入
import {
Link,
Blog,
Expand Down Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion src/components/TimeCapsule/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 2 additions & 0 deletions vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

1 comment on commit a812b15

@vercel
Copy link

@vercel vercel bot commented on a812b15 Jun 15, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.