优化首页样式
This commit is contained in:
parent
5da6e26a30
commit
cac9d80e2b
@ -1,29 +1,58 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="welcome">
|
<div class="home-container">
|
||||||
<header class="glass-header">江南语析</header>
|
<div class="hero-section">
|
||||||
<h1>{{ title }}</h1>
|
<div class="glass-header">
|
||||||
<p>大模型驱动的知识库管理工具</p>
|
<div class="logo">
|
||||||
<button class="home-btn" @click="goToChat">开始对话</button>
|
<img src="/favicon.svg" alt="江南语析" class="logo-img" />
|
||||||
<img src="/home.png" alt="Placeholder Image" />
|
<span style="font-size: 1.3rem; font-weight: bold;">江南语析</span>
|
||||||
|
</div>
|
||||||
|
<div class="github-link">
|
||||||
|
<a href="https://github.com/xerrors/Yuxi-Know" target="_blank">
|
||||||
|
<svg height="24" width="24" viewBox="0 0 16 16" version="1.1">
|
||||||
|
<path fill-rule="evenodd" d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z"></path>
|
||||||
|
</svg>
|
||||||
|
<span class="stars-count">{{ isLoadingStars ? '加载中...' : githubStars }} ⭐</span>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="github-info">
|
<div class="hero-content">
|
||||||
<a href="https://github.com/xerrors/Yuxi-Know" target="_blank">
|
<h1 class="title">{{ title }}</h1>
|
||||||
<svg height="24" width="24" viewBox="0 0 16 16" version="1.1">
|
<div class="description">
|
||||||
<path fill-rule="evenodd" d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z"></path>
|
<p class="subtitle">大模型驱动的知识库管理工具</p>
|
||||||
</svg>
|
<p class="features">
|
||||||
<span class="stars-count">{{ isLoadingStars ? '加载中...' : githubStars }} ⭐</span>
|
<span>📚 灵活知识库</span>
|
||||||
</a>
|
<span>🕸️ 知识图谱集成</span>
|
||||||
|
<span>🤖 多模型支持</span>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<button class="start-button" @click="goToChat">开始对话</button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<footer>© 江南语析 2025 [WIP] v0.12.138</footer>
|
<div class="preview-section">
|
||||||
|
<div class="preview-container">
|
||||||
|
<img src="/home.png" alt="系统预览" />
|
||||||
|
<div class="preview-overlay">
|
||||||
|
<div class="overlay-content">
|
||||||
|
<h3>强大的问答能力</h3>
|
||||||
|
<p>结合知识库与知识图谱,提供更准确、更全面的回答</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<footer>
|
||||||
|
<p>© 江南语析 2025 [WIP] v0.12.138</p>
|
||||||
|
</footer>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { reactive, ref, onMounted } from 'vue'
|
import { ref, onMounted } from 'vue'
|
||||||
import { useRouter } from 'vue-router'
|
import { useRouter } from 'vue-router'
|
||||||
|
|
||||||
const title = ref('📢 Yuxi-Know ✨')
|
const title = ref('Yuxi-Know')
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
const githubStars = ref(0)
|
const githubStars = ref(0)
|
||||||
const isLoadingStars = ref(false)
|
const isLoadingStars = ref(false)
|
||||||
@ -49,117 +78,20 @@ const fetchGithubStars = async () => {
|
|||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
fetchGithubStars()
|
fetchGithubStars()
|
||||||
})
|
})
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
<style lang="less" scoped>
|
<style lang="less" scoped>
|
||||||
.welcome {
|
.home-container {
|
||||||
|
min-height: 100vh;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: center;
|
|
||||||
min-height: 100vh;
|
|
||||||
color: #333;
|
color: #333;
|
||||||
text-align: center;
|
background: linear-gradient(135deg, #f5f7fa, #e2e8f0, #f0f4f8, #eef2f7);
|
||||||
background: linear-gradient(168deg, #ffd6eb, #ffe7ca, #d3fffb, #dbebff, #ffd8ff);
|
background-size: 400% 400%;
|
||||||
background-size: 1000% 1000%;
|
animation: gradientBackground 15s ease infinite;
|
||||||
animation: animateBackground 20s ease infinite;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@keyframes gradientBackground {
|
||||||
|
|
||||||
header {
|
|
||||||
font-size: 1.2rem;
|
|
||||||
font-weight: bold;
|
|
||||||
color: var(--main-color);
|
|
||||||
width: 100%;
|
|
||||||
padding: 1rem 0;
|
|
||||||
backdrop-filter: blur(10px);
|
|
||||||
width: 100%;
|
|
||||||
background-color: rgba(255, 255, 255, 0.25);
|
|
||||||
border-bottom: 2px solid var(--main-color);
|
|
||||||
}
|
|
||||||
|
|
||||||
h1 {
|
|
||||||
font-size: 48px;
|
|
||||||
font-weight: 600;
|
|
||||||
margin-top: calc(20vh - 80px);
|
|
||||||
margin-bottom: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
p {
|
|
||||||
font-size: 18px;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
button.home-btn {
|
|
||||||
padding: 0.5rem 2rem;
|
|
||||||
font-size: 24px;
|
|
||||||
font-weight: bold;
|
|
||||||
color: white;
|
|
||||||
background-color: #333;
|
|
||||||
border: none;
|
|
||||||
border-radius: 3rem;
|
|
||||||
cursor: pointer;
|
|
||||||
transition: all 0.3s;
|
|
||||||
margin-top: 20px;
|
|
||||||
margin-bottom: calc(15vh - 80px);
|
|
||||||
transition: all 0.3s;
|
|
||||||
|
|
||||||
&:hover {
|
|
||||||
background-color: #555;
|
|
||||||
transform: translateY(-2px);
|
|
||||||
box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
img {
|
|
||||||
width: 700px;
|
|
||||||
height: auto;
|
|
||||||
object-fit: cover;
|
|
||||||
box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.05);
|
|
||||||
border-radius: 1rem;
|
|
||||||
max-width: 90%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.github-info {
|
|
||||||
margin-top: 20px;
|
|
||||||
|
|
||||||
a {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
text-decoration: none;
|
|
||||||
color: #333;
|
|
||||||
padding: 8px 16px;
|
|
||||||
border-radius: 20px;
|
|
||||||
background-color: rgba(255, 255, 255, 0.5);
|
|
||||||
transition: all 0.3s;
|
|
||||||
|
|
||||||
&:hover {
|
|
||||||
background-color: rgba(255, 255, 255, 0.8);
|
|
||||||
transform: translateY(-2px);
|
|
||||||
box-shadow: 0px 3px 8px rgba(0, 0, 0, 0.1);
|
|
||||||
}
|
|
||||||
|
|
||||||
svg {
|
|
||||||
margin-right: 8px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.stars-count {
|
|
||||||
font-weight: 600;
|
|
||||||
font-size: 16px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
footer {
|
|
||||||
font-size: 1rem;
|
|
||||||
color: #666;
|
|
||||||
margin-top: auto;
|
|
||||||
padding: 1rem 0;
|
|
||||||
}
|
|
||||||
/* 动态背景动画 */
|
|
||||||
@keyframes animateBackground {
|
|
||||||
0% {
|
0% {
|
||||||
background-position: 0% 50%;
|
background-position: 0% 50%;
|
||||||
}
|
}
|
||||||
@ -170,4 +102,227 @@ footer {
|
|||||||
background-position: 0% 50%;
|
background-position: 0% 50%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.glass-header {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
width: 100%;
|
||||||
|
padding: 1.2rem 2rem;
|
||||||
|
background-color: rgba(255, 255, 255, 0.1);
|
||||||
|
backdrop-filter: blur(10px);
|
||||||
|
border-bottom: 1px solid rgba(255, 255, 255, 0.2);
|
||||||
|
position: fixed;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
z-index: 100;
|
||||||
|
}
|
||||||
|
|
||||||
|
.logo {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
font-size: 1.4rem;
|
||||||
|
font-weight: bold;
|
||||||
|
color: var(--main-color, #333);
|
||||||
|
|
||||||
|
.logo-img {
|
||||||
|
height: 2rem;
|
||||||
|
margin-right: 0.6rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.github-link a {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
text-decoration: none;
|
||||||
|
color: #333;
|
||||||
|
padding: 0.6rem 1.2rem;
|
||||||
|
border-radius: 2rem;
|
||||||
|
background-color: rgba(255, 255, 255, 0.4);
|
||||||
|
transition: all 0.3s ease;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
background-color: rgba(255, 255, 255, 0.6);
|
||||||
|
transform: translateY(-2px);
|
||||||
|
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
|
||||||
|
}
|
||||||
|
|
||||||
|
svg {
|
||||||
|
margin-right: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.stars-count {
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.hero-section {
|
||||||
|
height: 100vh;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
text-align: center;
|
||||||
|
padding: 0 2rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hero-content {
|
||||||
|
max-width: 800px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.title {
|
||||||
|
font-size: 4rem;
|
||||||
|
font-weight: 700;
|
||||||
|
margin-bottom: 1.5rem;
|
||||||
|
background: linear-gradient(45deg, #333, #666);
|
||||||
|
-webkit-background-clip: text;
|
||||||
|
background-clip: text;
|
||||||
|
color: transparent;
|
||||||
|
text-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
|
||||||
|
}
|
||||||
|
|
||||||
|
.description {
|
||||||
|
margin-bottom: 2.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.subtitle {
|
||||||
|
font-size: 1.5rem;
|
||||||
|
font-weight: 500;
|
||||||
|
margin-bottom: 1.5rem;
|
||||||
|
color: #555;
|
||||||
|
}
|
||||||
|
|
||||||
|
.features {
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
gap: 1.5rem;
|
||||||
|
font-size: 1.1rem;
|
||||||
|
|
||||||
|
span {
|
||||||
|
padding: 0.5rem 1rem;
|
||||||
|
background-color: rgba(255, 255, 255, 0.6);
|
||||||
|
border-radius: 2rem;
|
||||||
|
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.start-button {
|
||||||
|
padding: 1rem 3rem;
|
||||||
|
font-size: 1.2rem;
|
||||||
|
font-weight: 600;
|
||||||
|
color: white;
|
||||||
|
background: linear-gradient(135deg, var(--main-color), var(--main-color-dark));
|
||||||
|
border: none;
|
||||||
|
border-radius: 3rem;
|
||||||
|
cursor: pointer;
|
||||||
|
transition: all 0.3s ease;
|
||||||
|
box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
transform: translateY(-3px);
|
||||||
|
box-shadow: 0 7px 20px rgba(0, 0, 0, 0.15);
|
||||||
|
background: linear-gradient(135deg, #5a7dc5, #203156);
|
||||||
|
}
|
||||||
|
|
||||||
|
&:active {
|
||||||
|
transform: translateY(-1px);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.preview-section {
|
||||||
|
padding: 5rem 2rem;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.preview-container {
|
||||||
|
position: relative;
|
||||||
|
max-width: 1000px;
|
||||||
|
overflow: hidden;
|
||||||
|
border-radius: 1rem;
|
||||||
|
box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
|
||||||
|
transition: all 0.3s ease;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
transform: translateY(-5px);
|
||||||
|
box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
|
||||||
|
|
||||||
|
.preview-overlay {
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
img {
|
||||||
|
width: 100%;
|
||||||
|
height: auto;
|
||||||
|
display: block;
|
||||||
|
transition: transform 0.5s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.preview-overlay {
|
||||||
|
position: absolute;
|
||||||
|
bottom: 0;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
|
||||||
|
padding: 2rem;
|
||||||
|
opacity: 0.8;
|
||||||
|
transition: opacity 0.3s ease;
|
||||||
|
|
||||||
|
.overlay-content {
|
||||||
|
color: white;
|
||||||
|
|
||||||
|
h3 {
|
||||||
|
font-size: 1.5rem;
|
||||||
|
margin-bottom: 0.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
p {
|
||||||
|
font-size: 1rem;
|
||||||
|
opacity: 0.9;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
footer {
|
||||||
|
margin-top: auto;
|
||||||
|
text-align: center;
|
||||||
|
padding: 2rem;
|
||||||
|
color: #666;
|
||||||
|
font-size: 0.9rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 768px) {
|
||||||
|
.glass-header {
|
||||||
|
padding: 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.logo {
|
||||||
|
font-size: 1.2rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.title {
|
||||||
|
font-size: 2.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.subtitle {
|
||||||
|
font-size: 1.2rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.features {
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 0.8rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.start-button {
|
||||||
|
padding: 0.8rem 2rem;
|
||||||
|
font-size: 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.preview-section {
|
||||||
|
padding: 3rem 1rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user