mirror of
https://github.com/Kisechan/Mainpage.git
synced 2025-07-09 14:47:18 +00:00
about debug: 因为没有放avatar.jpg所以出了bug
This commit is contained in:
31
src/App.vue
31
src/App.vue
@ -2,20 +2,33 @@
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div>
|
||||
<!-- 全局导航栏 -->
|
||||
<nav>
|
||||
<router-link to="/">首页</router-link> |
|
||||
<router-link to="/about">关于</router-link>
|
||||
</nav>
|
||||
|
||||
<!-- 路由匹配的组件会渲染在这里 -->
|
||||
<router-view />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.logo {
|
||||
height: 6em;
|
||||
padding: 1.5em;
|
||||
will-change: filter;
|
||||
transition: filter 300ms;
|
||||
/* 全局样式 */
|
||||
nav {
|
||||
padding: 10px;
|
||||
background-color: #f0f0f0;
|
||||
}
|
||||
.logo:hover {
|
||||
filter: drop-shadow(0 0 2em #646cffaa);
|
||||
|
||||
nav a {
|
||||
margin-right: 10px;
|
||||
text-decoration: none;
|
||||
color: #333;
|
||||
}
|
||||
.logo.vue:hover {
|
||||
filter: drop-shadow(0 0 2em #42b883aa);
|
||||
|
||||
nav a.router-link-active {
|
||||
color: #42b983;
|
||||
font-weight: bold;
|
||||
}
|
||||
</style>
|
@ -1,10 +1,16 @@
|
||||
<template>
|
||||
<el-footer class="app-footer">
|
||||
<div class="social-links">
|
||||
<a v-for="item in socialLinks" :key="item.name" :href="item.url" target="_blank">
|
||||
<a
|
||||
v-for="item in socialLinks"
|
||||
:key="item.name"
|
||||
:href="item.url"
|
||||
target="_blank"
|
||||
>
|
||||
<el-icon :size="24">
|
||||
<component :is="item.icon" />
|
||||
</el-icon>
|
||||
<span class="link-name">{{ item.name }}</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
@ -16,36 +22,9 @@
|
||||
|
||||
<script setup>
|
||||
const socialLinks = [
|
||||
{ name: 'github', icon: 'Github', url: 'https://github.com' },
|
||||
{ name: 'email', icon: 'Message', url: 'mailto:your@email.com' }
|
||||
]
|
||||
{ name: "github", icon: "Github", url: "https://github.com" },
|
||||
{ name: "email", icon: "Message", url: "mailto:your@email.com" },
|
||||
];
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.app-footer {
|
||||
background: #f5f7fa;
|
||||
text-align: center;
|
||||
padding: 2rem;
|
||||
margin-top: auto;
|
||||
}
|
||||
|
||||
.social-links {
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
.social-links a {
|
||||
margin: 0 10px;
|
||||
color: #606266;
|
||||
transition: color 0.3s;
|
||||
}
|
||||
|
||||
.social-links a:hover {
|
||||
color: #409eff;
|
||||
}
|
||||
|
||||
.copyright p {
|
||||
margin: 5px 0;
|
||||
font-size: 0.9rem;
|
||||
color: #909399;
|
||||
}
|
||||
</style>
|
||||
<style scoped></style>
|
||||
|
@ -13,18 +13,4 @@
|
||||
</el-menu>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.nav-menu {
|
||||
border-bottom: none !important;
|
||||
height: 60px;
|
||||
}
|
||||
|
||||
.el-menu-item {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
a {
|
||||
text-decoration: none;
|
||||
color: inherit;
|
||||
}
|
||||
</style>
|
||||
<style scoped></style>
|
||||
|
@ -1,16 +1,15 @@
|
||||
import { createRouter, createWebHistory } from 'vue-router'
|
||||
import HomeView from '../views/HomeView.vue'
|
||||
|
||||
const routes = [
|
||||
{
|
||||
path: '/',
|
||||
name: 'home',
|
||||
component: HomeView
|
||||
component: () => import('@/views/HomeView.vue')
|
||||
},
|
||||
{
|
||||
path: '/about',
|
||||
name: 'about',
|
||||
component: () => import('../views/AboutView.vue')
|
||||
component: () => import('@/views/AboutView.vue')
|
||||
}
|
||||
]
|
||||
|
||||
|
@ -1,22 +1,22 @@
|
||||
<template>
|
||||
<div class="about-container">
|
||||
<NavBar />
|
||||
<!-- <NavBar /> -->
|
||||
<el-main>
|
||||
<el-row :gutter="20">
|
||||
<!-- 左侧正文 -->
|
||||
<el-col :span="16">
|
||||
<el-card>
|
||||
<h2>关于我</h2>
|
||||
<p>这里是正文内容...</p>
|
||||
<h2>ABOUT</h2>
|
||||
<p>passage...</p>
|
||||
</el-card>
|
||||
</el-col>
|
||||
|
||||
<!-- 右侧作者信息 -->
|
||||
<el-col :span="8">
|
||||
<div class="author-info">
|
||||
<el-avatar :size="150" :src="require('@/assets/avatar.jpg')" />
|
||||
<h3>作者姓名</h3>
|
||||
<p>这里是作者简介...</p>
|
||||
<!-- <el-avatar :size="150" :src="require('@/assets/avatar.jpg')" /> -->
|
||||
<h3>name</h3>
|
||||
<p>info...</p>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@ -26,20 +26,9 @@
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.about-container {
|
||||
min-height: 100vh;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.author-info {
|
||||
text-align: center;
|
||||
padding: 20px;
|
||||
background: #f5f7fa;
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
.el-card {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script setup>
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import AppFooter from '@/components/AppFooter.vue'
|
||||
</script>
|
@ -1,9 +1,10 @@
|
||||
<template>
|
||||
<div class="home-container">
|
||||
<NavBar />
|
||||
<!-- <NavBar /> -->
|
||||
<el-main>
|
||||
<div class="content">
|
||||
<h1>test</h1>
|
||||
<h3>Make By Vue + Vite + Element Plus</h3>
|
||||
<p>Building...</p>
|
||||
</div>
|
||||
</el-main>
|
||||
@ -12,21 +13,8 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import AppFooter from '@/components/AppFooter.vue'
|
||||
import NavBar from "@/components/NavBar.vue";
|
||||
import AppFooter from "@/components/AppFooter.vue";
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.home-container {
|
||||
min-height: 100vh;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.content {
|
||||
max-width: 800px;
|
||||
margin: 0 auto;
|
||||
padding: 2rem;
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
<style scoped></style>
|
||||
|
Reference in New Issue
Block a user