Bladeren bron

fortawesome

taiji_caozhaorui 2 weken geleden
bovenliggende
commit
bcb2771966
4 gewijzigde bestanden met toevoegingen van 91 en 6 verwijderingen
  1. 1 6
      index.html
  2. 1 0
      package.json
  3. 1 0
      src/main.ts
  4. 88 0
      src/views/study/home/components/stuly-layout.vue

+ 1 - 6
index.html

@@ -3,12 +3,7 @@
   <head>
     <meta charset="UTF-8" />
     <title><{VITE_TITLE}></title>
-    <link
-      rel="icon"
-      type="image/png"
-      id="logo"
-      href="/src/assets/images/global/logo.png"
-    />
+
     <script src="/config.js"></script>
   </head>
   <body>

+ 1 - 0
package.json

@@ -13,6 +13,7 @@
     "upgrade": "yarn upgrade --latest"
   },
   "dependencies": {
+    "@fortawesome/fontawesome-free": "^6.7.2",
     "@tailwindcss/vite": "^4.1.10",
     "@types/node": "^24.0.0",
     "axios": "^1.9.0",

+ 1 - 0
src/main.ts

@@ -12,6 +12,7 @@ import { createPinia } from 'pinia'
 import ElementPlus from 'element-plus'
 import 'element-plus/dist/index.css'
 import './style/tailwind.css'
+import '@fortawesome/fontawesome-free/css/all.css'
 
 const app = createApp(App)
 app.use(initDirectives)

+ 88 - 0
src/views/study/home/components/stuly-layout.vue

@@ -0,0 +1,88 @@
+<template>
+  <div class="h-[100px] w-full">
+    <div class="flex h-16 items-center justify-between">
+      <!-- 系统名称 -->
+      <div class="flex items-center">
+        <h1 class="text-xl font-bold">学习系统</h1>
+      </div>
+
+      <!-- 移动端菜单按钮 -->
+      <button class="md:hidden" id="mobileMenuButton">
+        <i class="fas fa-bars text-xl"></i>
+      </button>
+
+      <!-- 主导航菜单 - 中等屏幕以上显示 -->
+      <nav class="hidden space-x-6 md:flex">
+        <a href="#" class="nav-link active flex items-center py-2">
+          <i class="fas fa-home mr-1"></i>
+          <span>首页</span>
+        </a>
+        <a href="#" class="nav-link flex items-center py-2">
+          <i class="fas fa-book mr-1"></i>
+          <span>语文</span>
+        </a>
+        <a href="#" class="nav-link flex items-center py-2">
+          <i class="fas fa-calculator mr-1"></i>
+          <span>数学</span>
+        </a>
+        <a href="#" class="nav-link flex items-center py-2">
+          <i class="fas fa-language mr-1"></i>
+          <span>英语</span>
+        </a>
+        <a href="#" class="nav-link flex items-center py-2">
+          <i class="fas fa-user mr-1"></i>
+          <span>个人中心</span>
+        </a>
+      </nav>
+    </div>
+
+    <!-- 移动端导航菜单 -->
+    <div class="mobile-menu md:hidden" id="mobileMenu">
+      <div class="space-y-2 py-2">
+        <a
+          href="#"
+          class="hover:bg-hermes-dark block flex items-center rounded px-4 py-2"
+        >
+          <i class="fas fa-home mr-2"></i>
+          <span>首页</span>
+        </a>
+        <a
+          href="#"
+          class="hover:bg-hermes-dark block flex items-center rounded px-4 py-2"
+        >
+          <i class="fas fa-book mr-2"></i>
+          <span>语文</span>
+        </a>
+        <a
+          href="#"
+          class="hover:bg-hermes-dark block flex items-center rounded px-4 py-2"
+        >
+          <i class="fas fa-calculator mr-2"></i>
+          <span>数学</span>
+        </a>
+        <a
+          href="#"
+          class="hover:bg-hermes-dark block flex items-center rounded px-4 py-2"
+        >
+          <i class="fas fa-language mr-2"></i>
+          <span>英语</span>
+        </a>
+        <a
+          href="#"
+          class="hover:bg-hermes-dark block flex items-center rounded px-4 py-2"
+        >
+          <i class="fas fa-user mr-2"></i>
+          <span>个人中心</span>
+        </a>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script setup lang="ts">
+import { reactive } from 'vue'
+
+const state: any = reactive({})
+</script>
+
+<style lang="scss" scoped></style>