feat: 添加RemixIcon字体和MiSans字体支持
- 添加RemixIcon字体库并引入其CSS文件 - 添加MiSans字体文件并在style.css中定义字体样式 - 更新Sidebar组件,增加导航链接和样式 - 调整App.vue中的布局结构
This commit is contained in:
parent
fff7ceeb2e
commit
51185b6ff0
7
package-lock.json
generated
7
package-lock.json
generated
|
@ -10,6 +10,7 @@
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@tailwindcss/vite": "^4.1.7",
|
"@tailwindcss/vite": "^4.1.7",
|
||||||
"axios": "^1.9.0",
|
"axios": "^1.9.0",
|
||||||
|
"remixicon": "^4.6.0",
|
||||||
"tailwindcss": "^4.1.7",
|
"tailwindcss": "^4.1.7",
|
||||||
"vue": "^3.5.13",
|
"vue": "^3.5.13",
|
||||||
"vue-router": "^4.5.1"
|
"vue-router": "^4.5.1"
|
||||||
|
@ -2242,6 +2243,12 @@
|
||||||
"integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==",
|
"integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==",
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
|
"node_modules/remixicon": {
|
||||||
|
"version": "4.6.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/remixicon/-/remixicon-4.6.0.tgz",
|
||||||
|
"integrity": "sha512-bKM5odjqE1yzVxEZGJE7F79WHhNrJFIKHXR+GG+P1IWXn8AnJZhl8SbIRDJsNAvIqx4VPkNwjuHfc42tutMDpQ==",
|
||||||
|
"license": "Apache-2.0"
|
||||||
|
},
|
||||||
"node_modules/rollup": {
|
"node_modules/rollup": {
|
||||||
"version": "4.41.0",
|
"version": "4.41.0",
|
||||||
"resolved": "https://registry.npmjs.org/rollup/-/rollup-4.41.0.tgz",
|
"resolved": "https://registry.npmjs.org/rollup/-/rollup-4.41.0.tgz",
|
||||||
|
|
|
@ -15,6 +15,7 @@
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@tailwindcss/vite": "^4.1.7",
|
"@tailwindcss/vite": "^4.1.7",
|
||||||
"axios": "^1.9.0",
|
"axios": "^1.9.0",
|
||||||
|
"remixicon": "^4.6.0",
|
||||||
"tailwindcss": "^4.1.7",
|
"tailwindcss": "^4.1.7",
|
||||||
"vue": "^3.5.13",
|
"vue": "^3.5.13",
|
||||||
"vue-router": "^4.5.1"
|
"vue-router": "^4.5.1"
|
||||||
|
|
BIN
public/assets/MiSans_VF.ttf
Normal file
BIN
public/assets/MiSans_VF.ttf
Normal file
Binary file not shown.
|
@ -4,11 +4,11 @@ import Playing from './components/Playing.vue'
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="flex overflow-hidden flex-1 w-screen h-screen">
|
<div class="flex overflow-hidden flex-1 w-screen h-screen">
|
||||||
<Sidebar />
|
<Sidebar />
|
||||||
<div class="flex-1 bg-[#070909]">
|
<div class="flex-1 bg-[#070909]">
|
||||||
<Playing />
|
<Playing />
|
||||||
<RouterView />
|
<RouterView />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
|
@ -1,3 +1,19 @@
|
||||||
|
<script lang="ts" setup>
|
||||||
|
import { RouterLink } from 'vue-router'
|
||||||
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="bg-[#0c1112] w-56 text-white">aaa</div>
|
<div class="bg-[#0c1112] w-56 text-white p-4">
|
||||||
|
<div>
|
||||||
|
<div class="font-semibold text-white/50 text-xs mb-2">音乐库</div>
|
||||||
|
<ul class="flex flex-col gap-1">
|
||||||
|
<li>
|
||||||
|
<RouterLink to="/"><div class="text-sm px-2 py-1 hover:bg-white/5 w-full text-left rounded-md">最新音乐</div></RouterLink>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<RouterLink to="/feelinglucky"><div class="text-sm px-2 py-1 hover:bg-white/5 w-full text-left rounded-md">手气不错</div></RouterLink>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
|
@ -3,6 +3,7 @@ import { createWebHashHistory, createRouter } from 'vue-router'
|
||||||
import './style.css'
|
import './style.css'
|
||||||
import App from './App.vue'
|
import App from './App.vue'
|
||||||
import HomePage from './pages/Home.vue'
|
import HomePage from './pages/Home.vue'
|
||||||
|
import 'remixicon/fonts/remixicon.css'
|
||||||
|
|
||||||
const routes = [
|
const routes = [
|
||||||
{ path: '/', component: HomePage }
|
{ path: '/', component: HomePage }
|
||||||
|
|
|
@ -1,5 +1,16 @@
|
||||||
@import "tailwindcss";
|
@import "tailwindcss";
|
||||||
|
/* 导入来自 /assets/MiSans_VF.ttf 的字体 */
|
||||||
|
@font-face {
|
||||||
|
font-family: 'MiSans';
|
||||||
|
src: url('/assets/MiSans_VF.ttf') format('truetype-variations');
|
||||||
|
font-weight: 1 999;
|
||||||
|
font-display: swap;
|
||||||
|
}
|
||||||
|
|
||||||
* {
|
* {
|
||||||
@apply text-white;
|
@apply font-[MiSans];
|
||||||
|
}
|
||||||
|
|
||||||
|
button {
|
||||||
|
@apply cursor-pointer;
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user