2025-03-03 19:59:03 +08:00
|
|
|
|
<template>
|
|
|
|
|
<div class="home-container">
|
|
|
|
|
<el-main>
|
2025-03-05 10:12:08 +08:00
|
|
|
|
<el-row :gutter="20">
|
2025-03-29 22:35:19 +08:00
|
|
|
|
<el-col :xs="24" :sm="24" :md="8" :lg="8" :xl="8" class="right-column">
|
|
|
|
|
<div class="author-info">
|
|
|
|
|
<el-avatar :size="120" :src="avatarUrl" />
|
|
|
|
|
<h2>Hello</h2>
|
|
|
|
|
<i>"Non est ad astra mollis e trris via."</i>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="social-icons">
|
|
|
|
|
<a href="https://github.com/Kisechan" target="_self">
|
|
|
|
|
<i class="fab fa-github"></i>
|
|
|
|
|
</a>
|
2025-07-03 14:13:25 +08:00
|
|
|
|
<a href="https://www.zhihu.com/people/kisechan" target="_self">
|
2025-03-29 22:35:19 +08:00
|
|
|
|
<i class="fab fa-zhihu"></i>
|
|
|
|
|
</a>
|
|
|
|
|
<a href="https://space.bilibili.com/174541536" target="_self">
|
|
|
|
|
<i class="fab fa-bilibili"></i>
|
|
|
|
|
</a>
|
|
|
|
|
<a href="https://blog.kisechan.space" target="_self">
|
|
|
|
|
<i class="fa-solid fa-blog"></i>
|
|
|
|
|
</a>
|
|
|
|
|
<a href="mailto:admin@kisechan.space" target="_self">
|
|
|
|
|
<i class="fa-solid fa-envelope"></i>
|
|
|
|
|
</a>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="footer-content">
|
|
|
|
|
<p>
|
2025-06-07 16:20:09 +08:00
|
|
|
|
<a href="https://icp.gov.moe/?keyword=20251453" target="_self"
|
|
|
|
|
>萌ICP备20251453号</a
|
|
|
|
|
>
|
2025-03-29 22:35:19 +08:00
|
|
|
|
</p>
|
|
|
|
|
<p>
|
|
|
|
|
© 2025 By
|
2025-06-07 16:20:09 +08:00
|
|
|
|
<a
|
|
|
|
|
href="https://github.com/Kisechan"
|
|
|
|
|
target="_self"
|
|
|
|
|
rel="nofollow noopener"
|
|
|
|
|
><strong>Kisechan</strong></a
|
|
|
|
|
>
|
2025-03-29 22:35:19 +08:00
|
|
|
|
</p>
|
|
|
|
|
<p style="font-size: 0.75em">
|
2025-06-07 16:20:09 +08:00
|
|
|
|
Made With <a href="https://cn.vuejs.org/">Vue3</a> &
|
|
|
|
|
<a href="https://element-plus.org/zh-CN/">Element Plus</a>
|
2025-03-29 22:35:19 +08:00
|
|
|
|
</p>
|
|
|
|
|
</div>
|
|
|
|
|
</el-col>
|
2025-03-20 21:42:15 +08:00
|
|
|
|
<el-col :xs="24" :sm="24" :md="16" :lg="16" :xl="16">
|
2025-03-05 10:12:08 +08:00
|
|
|
|
<el-card>
|
2025-03-05 10:36:42 +08:00
|
|
|
|
<p>某校 SE 专业学生,前 CChOer 。</p>
|
|
|
|
|
<p>什么都会一点。</p>
|
|
|
|
|
<p>
|
2025-03-05 10:57:21 +08:00
|
|
|
|
可以通过这个邮箱联系我:
|
2025-03-05 10:36:42 +08:00
|
|
|
|
<a href="mailto:admin@kisechan.space">admin@kisechan.space</a>
|
|
|
|
|
</p>
|
2025-03-05 12:28:48 +08:00
|
|
|
|
<hr />
|
2025-03-05 10:12:08 +08:00
|
|
|
|
<div class="github-calendar-container">
|
2025-06-07 16:20:09 +08:00
|
|
|
|
<h3>
|
|
|
|
|
<i class="fa-solid fa-code-branch"></i>My Github Contributions
|
|
|
|
|
</h3>
|
2025-03-06 14:11:21 +08:00
|
|
|
|
<div id="github-graph"></div>
|
2025-03-05 10:12:08 +08:00
|
|
|
|
</div>
|
2025-03-06 08:26:05 +08:00
|
|
|
|
<hr />
|
|
|
|
|
<div class="rss-feed-container">
|
2025-03-06 19:02:28 +08:00
|
|
|
|
<h3><i class="fa-solid fa-box-archive"></i>Latest Blog Posts</h3>
|
2025-03-06 08:26:05 +08:00
|
|
|
|
<el-row :gutter="20">
|
2025-06-07 16:20:09 +08:00
|
|
|
|
<el-col
|
|
|
|
|
v-for="item in feedItems"
|
|
|
|
|
:key="item.link"
|
|
|
|
|
:xs="24"
|
|
|
|
|
:sm="12"
|
|
|
|
|
:md="12"
|
|
|
|
|
:lg="12"
|
|
|
|
|
:xl="12"
|
|
|
|
|
>
|
2025-03-06 08:26:05 +08:00
|
|
|
|
<el-card class="blog-card" shadow="hover">
|
|
|
|
|
<div class="blog-header">
|
2025-03-06 15:40:09 +08:00
|
|
|
|
<i class="fa-solid fa-newspaper"></i>
|
2025-06-07 16:20:09 +08:00
|
|
|
|
<a :href="item.link" target="_self" class="blog-title">{{
|
|
|
|
|
item.title
|
|
|
|
|
}}</a>
|
2025-03-06 08:26:05 +08:00
|
|
|
|
</div>
|
|
|
|
|
<div class="blog-meta">
|
2025-03-06 15:40:09 +08:00
|
|
|
|
<i class="fa-solid fa-clock-rotate-left"></i>
|
2025-03-06 08:26:05 +08:00
|
|
|
|
<span class="update-time">
|
|
|
|
|
{{ formatDate(item.pubDate) }}
|
|
|
|
|
</span>
|
|
|
|
|
<span class="tags">
|
2025-03-06 15:40:09 +08:00
|
|
|
|
<i class="fa-solid fa-tags"></i>
|
2025-03-06 08:26:05 +08:00
|
|
|
|
<el-tag
|
|
|
|
|
v-for="(tag, index) in item.tags"
|
|
|
|
|
:key="index"
|
|
|
|
|
size="small"
|
|
|
|
|
type="info"
|
|
|
|
|
class="tag"
|
|
|
|
|
>
|
|
|
|
|
{{ tag }}
|
|
|
|
|
</el-tag>
|
|
|
|
|
</span>
|
|
|
|
|
</div>
|
|
|
|
|
</el-card>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
</div>
|
2025-03-06 14:11:21 +08:00
|
|
|
|
<div class="read-more-container">
|
2025-06-07 16:20:09 +08:00
|
|
|
|
<el-tooltip
|
|
|
|
|
content="前往博客查看更多文章"
|
|
|
|
|
placement="top"
|
|
|
|
|
class="read-more-tooltip"
|
|
|
|
|
>
|
|
|
|
|
<el-card
|
|
|
|
|
class="read-more-card"
|
|
|
|
|
shadow="hover"
|
|
|
|
|
@click="goToBlog"
|
|
|
|
|
>
|
2025-03-06 15:40:09 +08:00
|
|
|
|
<div class="read-more-content">
|
|
|
|
|
<span>Read More</span>
|
|
|
|
|
<i class="fa-brands fa-readme"></i>
|
|
|
|
|
</div>
|
|
|
|
|
</el-card>
|
|
|
|
|
</el-tooltip>
|
2025-03-06 14:11:21 +08:00
|
|
|
|
</div>
|
2025-03-05 10:12:08 +08:00
|
|
|
|
</el-card>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
2025-03-03 19:59:03 +08:00
|
|
|
|
</el-main>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script setup>
|
2025-03-05 10:12:08 +08:00
|
|
|
|
import avatarUrl from "@/assets/avatar.png";
|
2025-06-07 16:20:09 +08:00
|
|
|
|
import { ref, onMounted } from "vue";
|
|
|
|
|
import GitHubCalendar from "github-calendar"; // 静态导入
|
2025-03-05 10:12:08 +08:00
|
|
|
|
|
2025-03-06 08:26:05 +08:00
|
|
|
|
const feedItems = ref([]);
|
2025-03-06 13:45:39 +08:00
|
|
|
|
|
2025-06-07 16:20:09 +08:00
|
|
|
|
const loadGitHubCalendar = () => {
|
|
|
|
|
const calendarContainerSelector = "#github-graph";
|
|
|
|
|
const calendarElement = document.querySelector(calendarContainerSelector);
|
|
|
|
|
|
2025-03-06 13:45:39 +08:00
|
|
|
|
if (!calendarElement) {
|
2025-06-07 16:20:09 +08:00
|
|
|
|
console.error(
|
|
|
|
|
`GitHub Calendar 目标元素未找到: ${calendarContainerSelector}`
|
|
|
|
|
);
|
2025-03-06 13:45:39 +08:00
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
2025-06-07 16:20:09 +08:00
|
|
|
|
GitHubCalendar(calendarContainerSelector, "Kisechan", {
|
2025-03-20 21:42:15 +08:00
|
|
|
|
responsive: true,
|
|
|
|
|
tooltips: true,
|
|
|
|
|
global_stats: false,
|
|
|
|
|
});
|
2025-03-06 13:45:39 +08:00
|
|
|
|
};
|
|
|
|
|
|
2025-03-06 08:26:05 +08:00
|
|
|
|
const fetchRSSFeed = async () => {
|
2025-03-12 12:03:00 +08:00
|
|
|
|
const rssUrl = import.meta.env.VITE_RSS_FEED_URL;
|
2025-03-06 08:26:05 +08:00
|
|
|
|
try {
|
|
|
|
|
const response = await fetch(rssUrl);
|
|
|
|
|
const str = await response.text();
|
|
|
|
|
const data = new window.DOMParser().parseFromString(str, "text/xml");
|
|
|
|
|
const items = data.querySelectorAll("entry");
|
|
|
|
|
|
2025-03-06 13:45:39 +08:00
|
|
|
|
feedItems.value = Array.from(items)
|
2025-03-06 14:11:21 +08:00
|
|
|
|
.map((item) => ({
|
2025-03-06 13:45:39 +08:00
|
|
|
|
title: item.querySelector("title").textContent,
|
|
|
|
|
link: item.querySelector("link").getAttribute("href"),
|
|
|
|
|
pubDate: item.querySelector("updated").textContent,
|
2025-03-06 14:11:21 +08:00
|
|
|
|
tags: Array.from(item.querySelectorAll("category")).map((category) =>
|
|
|
|
|
category.getAttribute("term")
|
2025-03-06 13:45:39 +08:00
|
|
|
|
),
|
|
|
|
|
}))
|
2025-03-20 21:42:15 +08:00
|
|
|
|
.slice(0, 6);
|
2025-03-06 08:26:05 +08:00
|
|
|
|
} catch (error) {
|
|
|
|
|
console.error("Error fetching RSS Feed:", error);
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const formatDate = (dateString) => {
|
|
|
|
|
const date = new Date(dateString);
|
|
|
|
|
return date.toLocaleDateString();
|
|
|
|
|
};
|
|
|
|
|
|
2025-03-06 14:11:21 +08:00
|
|
|
|
const goToBlog = () => {
|
2025-03-12 16:24:19 +08:00
|
|
|
|
window.open("https://blog.kisechan.space", "_self");
|
2025-03-06 14:11:21 +08:00
|
|
|
|
};
|
|
|
|
|
|
2025-03-05 18:37:37 +08:00
|
|
|
|
onMounted(() => {
|
|
|
|
|
loadGitHubCalendar();
|
2025-03-06 08:26:05 +08:00
|
|
|
|
fetchRSSFeed();
|
2025-03-05 10:12:08 +08:00
|
|
|
|
});
|
2025-03-06 13:45:39 +08:00
|
|
|
|
|
2025-03-03 19:59:03 +08:00
|
|
|
|
</script>
|
|
|
|
|
|
2025-03-05 10:12:08 +08:00
|
|
|
|
<style scoped>
|
|
|
|
|
.home-container {
|
|
|
|
|
padding: 20px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.author-info {
|
|
|
|
|
text-align: center;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.el-avatar {
|
|
|
|
|
margin-bottom: 10px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.github-calendar-container {
|
|
|
|
|
margin: 20px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#github-graph {
|
|
|
|
|
width: 100%;
|
|
|
|
|
max-width: 800px;
|
|
|
|
|
margin: 0 auto;
|
|
|
|
|
}
|
2025-03-05 12:28:48 +08:00
|
|
|
|
|
|
|
|
|
.social-icons a {
|
2025-03-06 22:33:49 +08:00
|
|
|
|
color: var(--text-color);
|
2025-03-05 12:28:48 +08:00
|
|
|
|
margin: 0 10px;
|
|
|
|
|
font-size: 24px;
|
2025-03-05 18:37:37 +08:00
|
|
|
|
transition: color 0.3s ease, transform 0.3s ease;
|
2025-03-05 12:28:48 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.social-icons a:hover {
|
|
|
|
|
color: rgb(159.5, 206.5, 255);
|
2025-03-05 18:37:37 +08:00
|
|
|
|
transform: scale(1.2);
|
2025-03-05 12:28:48 +08:00
|
|
|
|
}
|
|
|
|
|
|
2025-03-05 12:50:42 +08:00
|
|
|
|
.social-icons {
|
2025-03-05 12:28:48 +08:00
|
|
|
|
max-width: 1200px;
|
|
|
|
|
margin: 0 auto;
|
|
|
|
|
text-align: center;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.right-column {
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-direction: column;
|
2025-03-06 08:26:05 +08:00
|
|
|
|
gap: 24px;
|
2025-03-05 12:28:48 +08:00
|
|
|
|
}
|
2025-03-05 22:23:00 +08:00
|
|
|
|
|
|
|
|
|
.footer-content {
|
|
|
|
|
max-width: 1200px;
|
|
|
|
|
margin: 0 auto;
|
|
|
|
|
}
|
2025-03-06 08:26:05 +08:00
|
|
|
|
|
|
|
|
|
.rss-feed-container {
|
|
|
|
|
max-width: 800px;
|
|
|
|
|
margin: 0 auto;
|
|
|
|
|
padding: 20px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.blog-card {
|
|
|
|
|
margin-bottom: 20px;
|
|
|
|
|
transition: transform 0.3s ease, box-shadow 0.3s ease;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.blog-card:hover {
|
|
|
|
|
transform: translateY(-5px);
|
|
|
|
|
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.blog-header {
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
margin-bottom: 10px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.blog-title {
|
|
|
|
|
font-size: 1.2em;
|
|
|
|
|
font-weight: bold;
|
2025-03-06 22:33:49 +08:00
|
|
|
|
color: var(--text-color);
|
2025-03-06 08:26:05 +08:00
|
|
|
|
text-decoration: none;
|
|
|
|
|
margin-left: 10px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.blog-title:hover {
|
|
|
|
|
color: #409eff;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.blog-meta {
|
|
|
|
|
display: flex;
|
2025-03-07 19:20:12 +08:00
|
|
|
|
gap: 8px;
|
2025-03-06 08:26:05 +08:00
|
|
|
|
align-items: center;
|
|
|
|
|
font-size: 0.9em;
|
2025-03-06 22:33:49 +08:00
|
|
|
|
color: var(--text-color);
|
2025-03-06 08:26:05 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.update-time,
|
|
|
|
|
.tags {
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
margin-right: 20px;
|
2025-03-06 22:33:49 +08:00
|
|
|
|
color: var(--text-color);
|
2025-03-06 08:26:05 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.icon {
|
|
|
|
|
margin-right: 5px;
|
2025-03-06 22:33:49 +08:00
|
|
|
|
color: var(--text-color);
|
2025-03-06 08:26:05 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.tag {
|
|
|
|
|
margin-left: 5px;
|
2025-03-07 19:20:12 +08:00
|
|
|
|
color: var(--code-text-color);
|
2025-03-06 08:26:05 +08:00
|
|
|
|
}
|
2025-03-06 14:11:21 +08:00
|
|
|
|
|
|
|
|
|
.read-more-container {
|
|
|
|
|
display: flex;
|
2025-03-20 21:42:15 +08:00
|
|
|
|
justify-content: flex-end;
|
2025-03-06 14:11:21 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.read-more-card {
|
2025-03-20 21:42:15 +08:00
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
justify-content: center;
|
2025-03-06 14:11:21 +08:00
|
|
|
|
cursor: pointer;
|
2025-03-20 21:42:15 +08:00
|
|
|
|
width: 135px;
|
|
|
|
|
height: 35px;
|
|
|
|
|
padding: 6px;
|
2025-03-06 14:11:21 +08:00
|
|
|
|
text-align: center;
|
|
|
|
|
transition: transform 0.3s ease, box-shadow 0.3s ease;
|
|
|
|
|
}
|
|
|
|
|
|
2025-03-06 15:40:09 +08:00
|
|
|
|
.read-more-card:hover,
|
|
|
|
|
.read-more-tooltip {
|
2025-03-06 14:11:21 +08:00
|
|
|
|
transform: translateY(-5px);
|
|
|
|
|
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.read-more-content {
|
2025-03-20 21:42:15 +08:00
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
justify-content: center;
|
2025-03-06 15:40:09 +08:00
|
|
|
|
gap: 2px;
|
2025-03-20 21:42:15 +08:00
|
|
|
|
font-size: 0.85em;
|
2025-03-06 14:11:21 +08:00
|
|
|
|
color: #409eff;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.read-more-icon {
|
2025-03-06 22:33:49 +08:00
|
|
|
|
color: var(--text-color);
|
2025-03-06 14:11:21 +08:00
|
|
|
|
transition: transform 0.3s ease;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.read-more-card:hover .read-more-icon {
|
|
|
|
|
transform: translateX(5px);
|
|
|
|
|
}
|
2025-03-06 19:02:28 +08:00
|
|
|
|
|
|
|
|
|
h3 {
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
gap: 10px;
|
|
|
|
|
}
|
2025-03-20 21:42:15 +08:00
|
|
|
|
|
|
|
|
|
/* 手机端样式 */
|
|
|
|
|
@media (max-width: 768px) {
|
|
|
|
|
.home-container {
|
|
|
|
|
padding: 10px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.github-calendar-container,
|
|
|
|
|
.rss-feed-container {
|
|
|
|
|
margin: 10px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.blog-card {
|
|
|
|
|
margin-bottom: 10px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.read-more-container {
|
|
|
|
|
justify-content: center;
|
|
|
|
|
}
|
|
|
|
|
}
|
2025-06-07 16:20:09 +08:00
|
|
|
|
</style>
|