typescript. Close #1. #2
@ -1,4 +1,11 @@
|
|||||||
const projectsData = [
|
interface ProjectData {
|
||||||
|
title?: string
|
||||||
|
description?: string
|
||||||
|
imgSrc?: string
|
||||||
|
href?: string
|
||||||
|
}
|
||||||
|
|
||||||
|
const projectsData: ProjectData[] = [
|
||||||
{
|
{
|
||||||
title: 'UPS',
|
title: 'UPS',
|
||||||
description: `一个不间断电源(UPS)的全栈项目。核心硬件使用乐鑫×安信可的 ESP32-C3-32S 模块作为主控,软件部分使用了 Rust + ESP-IDF 开发。`,
|
description: `一个不间断电源(UPS)的全栈项目。核心硬件使用乐鑫×安信可的 ESP32-C3-32S 模块作为主控,软件部分使用了 Rust + ESP-IDF 开发。`,
|
||||||
|
@ -15,14 +15,14 @@ export default function AuthorLayout({ children, frontMatter }: Props) {
|
|||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<PageSEO title={`About - ${name}`} description={`About me - ${name}`} />
|
<PageSEO title={`About - ${name}`} description={`About me - ${name}`} />
|
||||||
<div className="divide-y">
|
<div className="divide-y divide-gray-200 dark:divide-gray-700">
|
||||||
<div className="space-y-2 pt-6 pb-8 md:space-y-5">
|
<div className="space-y-2 pt-6 pb-8 md:space-y-5">
|
||||||
<h1 className="text-3xl font-extrabold leading-9 tracking-tight text-gray-900 dark:text-gray-100 sm:text-4xl sm:leading-10 md:text-6xl md:leading-14">
|
<h1 className="text-3xl font-extrabold leading-9 tracking-tight text-gray-900 dark:text-gray-100 sm:text-4xl sm:leading-10 md:text-6xl md:leading-14">
|
||||||
About
|
About
|
||||||
</h1>
|
</h1>
|
||||||
</div>
|
</div>
|
||||||
<div className="items-start space-y-2 xl:grid xl:grid-cols-3 xl:gap-x-8 xl:space-y-0">
|
<div className="items-start space-y-2 xl:grid xl:grid-cols-3 xl:gap-x-8 xl:space-y-0">
|
||||||
<div className="flex flex-col items-center space-x-2 pt-8">
|
<div className="flex flex-col items-center pt-8">
|
||||||
<Image
|
<Image
|
||||||
src={avatar}
|
src={avatar}
|
||||||
alt="avatar"
|
alt="avatar"
|
||||||
|
@ -24,7 +24,7 @@ export default function ListLayout({ posts, title, initialDisplayPosts = [], pag
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<div className="divide-y">
|
<div className="divide-y divide-gray-200 dark:divide-gray-700">
|
||||||
<div className="space-y-2 pt-6 pb-8 md:space-y-5">
|
<div className="space-y-2 pt-6 pb-8 md:space-y-5">
|
||||||
<h1 className="text-3xl font-extrabold leading-9 tracking-tight text-gray-900 dark:text-gray-100 sm:text-4xl sm:leading-10 md:text-6xl md:leading-14">
|
<h1 className="text-3xl font-extrabold leading-9 tracking-tight text-gray-900 dark:text-gray-100 sm:text-4xl sm:leading-10 md:text-6xl md:leading-14">
|
||||||
{title}
|
{title}
|
||||||
|
@ -21,7 +21,8 @@ class MyDocument extends Document {
|
|||||||
<link rel="manifest" href="/static/favicons/site.webmanifest" />
|
<link rel="manifest" href="/static/favicons/site.webmanifest" />
|
||||||
<link rel="mask-icon" href="/static/favicons/safari-pinned-tab.svg" color="#5bbad5" />
|
<link rel="mask-icon" href="/static/favicons/safari-pinned-tab.svg" color="#5bbad5" />
|
||||||
<meta name="msapplication-TileColor" content="#000000" />
|
<meta name="msapplication-TileColor" content="#000000" />
|
||||||
<meta name="theme-color" content="#000000" />
|
<meta name="theme-color" media="(prefers-color-scheme: light)" content="#fff" />
|
||||||
|
<meta name="theme-color" media="(prefers-color-scheme: dark)" content="#000" />
|
||||||
<link rel="alternate" type="application/rss+xml" href="/feed.xml" />
|
<link rel="alternate" type="application/rss+xml" href="/feed.xml" />
|
||||||
</Head>
|
</Head>
|
||||||
<body className="bg-white text-black antialiased dark:bg-gray-900 dark:text-white">
|
<body className="bg-white text-black antialiased dark:bg-gray-900 dark:text-white">
|
||||||
|
@ -23,14 +23,14 @@ export default function Home({ posts }: InferGetStaticPropsType<typeof getStatic
|
|||||||
<div className="divide-y divide-gray-200 dark:divide-gray-700">
|
<div className="divide-y divide-gray-200 dark:divide-gray-700">
|
||||||
<div className="space-y-2 pt-6 pb-8 md:space-y-5">
|
<div className="space-y-2 pt-6 pb-8 md:space-y-5">
|
||||||
<h1 className="text-3xl font-extrabold leading-9 tracking-tight text-gray-900 dark:text-gray-100 sm:text-4xl sm:leading-10 md:text-6xl md:leading-14">
|
<h1 className="text-3xl font-extrabold leading-9 tracking-tight text-gray-900 dark:text-gray-100 sm:text-4xl sm:leading-10 md:text-6xl md:leading-14">
|
||||||
Latest
|
最近发布的文章
|
||||||
</h1>
|
</h1>
|
||||||
<p className="text-lg leading-7 text-gray-500 dark:text-gray-400">
|
<p className="text-lg leading-7 text-gray-500 dark:text-gray-400">
|
||||||
{siteMetadata.description}
|
{siteMetadata.description}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<ul className="divide-y divide-gray-200 dark:divide-gray-700">
|
<ul className="divide-y divide-gray-200 dark:divide-gray-700">
|
||||||
{!posts.length && 'No posts found.'}
|
{!posts.length && '没有找到文章。 😭'}
|
||||||
{posts.slice(0, MAX_DISPLAY).map((frontMatter) => {
|
{posts.slice(0, MAX_DISPLAY).map((frontMatter) => {
|
||||||
const { slug, date, title, summary, tags } = frontMatter
|
const { slug, date, title, summary, tags } = frontMatter
|
||||||
return (
|
return (
|
||||||
|
@ -13,7 +13,7 @@ export default function Projects() {
|
|||||||
Projects
|
Projects
|
||||||
</h1>
|
</h1>
|
||||||
<p className="text-lg leading-7 text-gray-500 dark:text-gray-400">
|
<p className="text-lg leading-7 text-gray-500 dark:text-gray-400">
|
||||||
Showcase your projects with a hero image (16 x 9)
|
我的项目橱窗,欢迎交流。
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div className="container py-12">
|
<div className="container py-12">
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#!/usr/bin/env node
|
#!/usr/bin/env node
|
||||||
|
|
||||||
// Adapated from https://github.com/hashicorp/next-remote-watch
|
// Adapted from https://github.com/hashicorp/next-remote-watch
|
||||||
// A copy of next-remote-watch with an additional ws reload emitter.
|
// A copy of next-remote-watch with an additional ws reload emitter.
|
||||||
// The app listens to the event and triggers a client-side router refresh
|
// The app listens to the event and triggers a client-side router refresh
|
||||||
// see components/ClientReload.js
|
// see components/ClientReload.js
|
||||||
|
Loading…
Reference in New Issue
Block a user