1 Star 4 Fork 0

夏之一周/个人主页

Create your Gitee Account
Explore and code with more than 12 million developers,Free private repositories !:)
Sign up
Clone or Download
contribute
Sync branch
Cancel
Notice: Creating folder will generate an empty file .keep, because not support in Git
Loading...
README
MIT

原作者:imsyy (底层用户) (github.com)

無名の主页

主页的 Logo 字体已经过压缩,若用本站 Logo 以外的字母会变回默认字体,这里是 完整字体,若无法下载,可将字体目录下的 Pacifico-Regular-all.ttf 进行替换

功能

  • 载入动画
  • 站点简介
  • Hitokoto 一言
  • 日期及时间
  • 实时天气
  • 时光进度条
  • 音乐播放器
  • 移动端适配

自动部署

如果遇到构建环境或者打包过程出现错误,则可以采用 Github Actions 来进行自动构建

  • 在成功 fork 仓库后,前往 Actions 页面,若您是首次开启,则会出现下面的提示,点击开启

    步骤1

  • 然后在仓库中进行任意修改后均会触发工作流的运行,在工作流完成后,会在下方生成一个可供下载的压缩包,这就是构建出的静态文件,可自行上传至服务器

    步骤2

手动部署

  • 安装 node.js 环境

    node > 16.16.0
    npm > 8.15.0

  • 然后以 管理员权限 运行 cmd 终端,并 cd 到 项目根目录

  • 终端 中输入:

# 安装 pnpm
npm install -g pnpm

# 安装依赖
pnpm install

# 预览
pnpm dev

# 构建
pnpm build

构建完成后,静态资源会在 dist 目录 中生成,可将 dist 文件夹下的文件上传至服务器,也可使用 Vercel 等托管平台一键导入并自动部署

Docker 部署

安装及配置 Docker 将不在此处说明,请自行解决

# 构建
docker build -t home .
# 运行
docker run -p 12445:12445 -d home

网站链接

src/assets/siteLinks.json 中可以自定义网站链接(以指向自己的网站):

{
  "icon": "Blog",						
  "name": "博客",						
  "link": "https://blog.imsyy.top/"	
},

其中 icon 网站链接的图标可以在 src/components/Links/index.vue 中添加:

// 可前往 https://www.xicons.org 自行挑选并在此处引入
// 此处引入的是 fa 类型
import {
  Link,
  Blog,
  CompactDisc,
  Cloud,
  Compass,
  Book,
  Fire,
  LaptopCode,
} from "@vicons/fa";

...

// 网站链接图标
const siteIcon = {
  Blog,
  Cloud,
  CompactDisc,
  Compass,
  Book,
  Fire,
  LaptopCode,
};

社交链接

src/assets/socialLinks.json 中可以自定义社交链接。

天气

天气及地区获取需要 高德开放平台 相关 API

也可自行更换其他方式

音乐

本项目采用了基于 MetingJSAplayer 音乐播放器,可实现快速自定义歌单
*仅支持 中国大陆地区

请在 .env 文件中更改歌曲相关参数即可实现自定义歌单列表

# 歌曲 API 地址
VITE_SONG_API = "https://api-meting.imsyy.top"
# 歌曲服务器 ( netease-网易云, tencent-qq音乐 )
VITE_SONG_SERVER = "netease"
# 播放类型 ( song-歌曲, playlist-播放列表, album-专辑, search-搜索, artist-艺术家 )
VITE_SONG_TYPE = "playlist"
# 播放 ID
VITE_SONG_ID = "7452421335"

字体

现采用 HarmonyOS Sans 开源字体,采用字体拆分,提升加载速度

由于本站 CDN 已开启防盗链,非本站域名不可访问,请将字体引入链接更改为下方内容,否则 自定义字体将失效

https://s1.hdslb.com/bfs/static/jinkela/long/font/regular.css

旧版方式

由于本项目引入了中文字体,需要压缩中文字体以提高网页加载速度( 也可以取消使用中文字体 )

中文字体去除繁体

  • 安装 Python 3.7pip
  • 运行 pip install fonttools
  • 下载 sc_unicode.txt
  • 运行 pyftsubset 字体名称.ttf --unicodes-file=sc_unicode.txt

字体进一步压缩

  • 编译安装 Google woff2
sudo apt-get install -y git g++ make
git clone --recursive https://github.com/google/woff2.git
cd woff2
make clean all
  • 再压缩字体
./woff2_compress ./字体名称.ttf
  • 最终可对原字体进行缓加载,先行加载压缩后的字体

详细信息可前往 虹墨空间站 查看原文

网站图标及网站背景

网站背景

可以在 public/images 中修改网站背景

如果想要添加更多的本地图片作为网站背景,可以将图片重命名 background+数字 的形式,并在 src/components/Background/index.vue 中进行修改:


if (type == 0) {
  // 修改此处 Math.random() 后面的第一个数字为图片的数量
  bgUrl.value = `/images/background${Math.floor(
    Math.random() * 10 + 1
  )}.webp`;
}

网站图标

可以在 public/images/icon 中修改网站图标。

技术栈

API

  

MIT License Copyright (c) 2022 imsyy Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

About

个人主页,访问地址:https://wudetian.top expand collapse
Vue and 6 more languages
MIT
Cancel

Releases

No release

Contributors

All

Activities

Load More
can not load any more
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/wuZhongtian/page-home-personal-homepage.git
git@gitee.com:wuZhongtian/page-home-personal-homepage.git
wuZhongtian
page-home-personal-homepage
个人主页
master

Search

Cb406eda 1850385 E526c682 1850385