

















Firefly 主题移植了一个专业的时间线(Timeline)页面,用于按时间顺序展示您的人生重要事件、工作经历、教育背景和项目成就等。这个页面可以帮助访客了解您的成长历程和专业发展。
ts
import type { TimelineItem } from "../components/features/timeline/types";
export const timelineData: TimelineItem[] = [
{
id: "current-study",
title: "Studying Computer Science and Technology",
description:
"Currently studying Computer Science and Technology, focusing on web development and software engineering.",
type: "education",
startDate: "2022-09-01",
location: "Beijing",
organization: "Beijing Institute of Technology",
skills: ["Java", "Python", "JavaScript", "HTML/CSS", "MySQL"],
achievements: [
"Current GPA: 3.6/4.0",
"Completed data structures and algorithms course project",
"Participated in multiple course project developments",
],
icon: "material-symbols:school",
color: "#059669",
featured: true,
},
{
id: "mizuki-blog-project",
title: "Mizuki Personal Blog Project",
description:
"A personal blog website developed using the Astro framework as a practical project for learning frontend technologies.",
type: "project",
startDate: "2024-06-01",
endDate: "2024-08-01",
skills: ["Astro", "TypeScript", "Tailwind CSS", "Git"],
achievements: [
"Mastered modern frontend development tech stack",
"Learned responsive design and user experience optimization",
"Completed the full process from design to deployment",
],
links: [
{
name: "GitHub Repository",
url: "https://github.com/example/mizuki-blog",
type: "project",
},
{
name: "Live Demo",
url: "https://mizuki-demo.example.com",
type: "website",
},
],
icon: "material-symbols:code",
color: "#7C3AED",
featured: true,
},
{
id: "summer-internship-2024",
title: "Frontend Development Intern",
description:
"Summer internship at an internet company, participating in frontend development of web applications.",
type: "work",
startDate: "2024-07-01",
endDate: "2024-08-31",
location: "Beijing",
organization: "TechStart Internet Company",
position: "Frontend Development Intern",
skills: ["React", "JavaScript", "CSS3", "Git", "Figma"],
achievements: [
"Completed user interface component development",
"Learned team collaboration and code standards",
"Received outstanding internship performance certificate",
],
icon: "material-symbols:work",
color: "#DC2626",
featured: true,
},
{
id: "web-development-course",
title: "Completed Web Development Online Course",
description:
"Completed a full-stack web development online course, systematically learning frontend and backend development technologies.",
type: "achievement",
startDate: "2024-01-15",
endDate: "2024-05-30",
organization: "Mooc Website",
skills: ["HTML", "CSS", "JavaScript", "Node.js", "Express"],
achievements: [
"Received course completion certificate",
"Completed 5 practical projects",
"Mastered full-stack development fundamentals",
],
links: [
{
name: "Course Certificate",
url: "https://certificates.example.com/web-dev",
type: "certificate",
},
],
icon: "material-symbols:verified",
color: "#059669",
},
{
id: "student-management-system",
title: "Student Management System Course Project",
description:
"Final project for the database course, developed a complete student information management system.",
type: "project",
startDate: "2023-11-01",
endDate: "2023-12-15",
skills: ["Java", "MySQL", "Swing", "JDBC"],
achievements: [
"Received excellent course project grade",
"Implemented complete CRUD functionality",
"Learned database design and optimization",
],
icon: "material-symbols:database",
color: "#EA580C",
},
{
id: "programming-contest",
title: "University Programming Contest",
description:
"Participated in a programming contest held by the university, improving algorithm and programming skills.",
type: "achievement",
startDate: "2023-10-20",
location: "Beijing Institute of Technology",
organization: "School of Computer Science",
skills: ["C++", "Algorithms", "Data Structures"],
achievements: [
"Won third prize in university contest",
"Improved algorithmic thinking ability",
"Strengthened programming fundamentals",
],
icon: "material-symbols:emoji-events",
color: "#7C3AED",
},
{
id: "part-time-tutor",
title: "Part-time Programming Tutor",
description:
"Provided programming tutoring for high school students, helping them learn Python basics.",
type: "work",
startDate: "2023-09-01",
endDate: "2024-01-31",
position: "Programming Tutor",
skills: ["Python", "Teaching", "Communication"],
achievements: [
"Helped 3 students master Python basics",
"Improved expression and communication skills",
"Gained teaching experience",
],
icon: "material-symbols:school",
color: "#059669",
},
{
id: "high-school-graduation",
title: "High School Graduation",
description:
"Graduated from high school with excellent grades and was admitted to the Computer Science and Technology program at Beijing Institute of Technology.",
type: "education",
startDate: "2019-09-01",
endDate: "2022-06-30",
location: "Jinan, Shandong",
organization: "No.1 High School of Jinan",
achievements: [
"College entrance exam score: 620",
"Received municipal model student award",
"Won provincial second prize in math competition",
],
icon: "material-symbols:school",
color: "#2563EB",
},
{
id: "first-programming-experience",
title: "First Programming Experience",
description:
"First encountered programming in high school IT class, started learning Python basic syntax.",
type: "education",
startDate: "2021-03-01",
skills: ["Python", "Basic Programming Concepts"],
achievements: [
'Completed first "Hello World" program',
"Learned basic loops and conditional statements",
"Developed interest in programming",
],
icon: "material-symbols:code",
color: "#7C3AED",
},
];ts
---
import { FilterTabs } from "@components/atoms/";
import { TimelineCard } from "@components/features/timeline";
import { PageHeader } from "@components/features/page-header";
import MainGridLayout from "@layouts/MainGridLayout.astro";
import { Icon } from "astro-icon/components";
import { siteConfig } from "../config";
import { timelineData } from "../data/timeline";
import I18nKey from "../i18n/i18nKey";
import { i18n } from "../i18n/translation";
if (!siteConfig.pages.timeline) {
return Astro.redirect("/404/");
}
const types = ["education", "work", "project", "achievement"] as const;
const getTypeIcon = (type: string) => {
switch (type) {
case "education":
return "material-symbols:school";
case "work":
return "material-symbols:work";
case "project":
return "material-symbols:code";
case "achievement":
return "material-symbols:emoji-events";
default:
return "material-symbols:apps";
}
};
const getTypeText = (type: string) => {
switch (type) {
case "education":
return i18n(I18nKey.timelineEducation);
case "work":
return i18n(I18nKey.timelineWork);
case "project":
return i18n(I18nKey.timelineProject);
case "achievement":
return i18n(I18nKey.timelineAchievement);
default:
return type;
}
};
const filterTabs = [
{
value: "all",
label: i18n(I18nKey.friendsFilterAll),
icon: "material-symbols:apps",
count: timelineData.length,
},
...types.map((type) => ({
value: type,
label: getTypeText(type),
icon: getTypeIcon(type),
count: timelineData.filter((item) => item.type === type).length,
})),
];
const title = i18n(I18nKey.timeline);
const subtitle = i18n(I18nKey.timelineSubtitle);
---
<MainGridLayout title={title} description={subtitle}>
<script>
// import("../scripts/right-sidebar-layout.js");
import { loadIconify } from "../utils/icon-loader";
loadIconify().catch((error) => {
console.error("Failed to load Iconify:", error);
});
</script>
<script is:inline src="/js/filter-tabs-handler.js"></script>
<div
class="flex w-full rounded-[var(--radius-large)] overflow-hidden relative min-h-32"
>
<div class="card-base z-10 px-6 sm:px-9 py-6 relative w-full">
<PageHeader title={title} subtitle={subtitle} />
<div class="mb-8">
<FilterTabs tabs={filterTabs} dataAttr="type" />
</div>
<div id="timeline-list" class="timeline-list">
{timelineData.map((item) => <TimelineCard item={item} />)}
</div>
<div id="no-results" class="hidden text-center py-16">
<Icon
name="material-symbols:search-off-rounded"
class="text-6xl text-black/15 dark:text-white/15 mb-4"
/>
<p class="text-black/40 dark:text-white/40 text-lg">
No matching items
</p>
</div>
</div>
</div>
</MainGridLayout>
<style>
.timeline-list {
position: relative;
}
.timeline-list::before {
content: "";
position: absolute;
left: 9px;
top: 0;
bottom: 0;
width: 2px;
background: var(--line-divider);
border-radius: 1px;
}
</style>此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。