-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes #7
- Loading branch information
Showing
22 changed files
with
283 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,35 @@ | ||
import styles from '../styles/Layout.module.css' | ||
|
||
export default function Footer({}) { | ||
export default function Footer({ locale }) { | ||
return ( | ||
<footer className={styles.footer}> | ||
<span>Copyright © 2021 fHz</span> | ||
<div className={styles.tools}> | ||
<span>Designed in <a href="https://www.figma.com/" target="_blank">figma</a></span> | ||
<span>Built with <a href="https://nextjs.org/" target="_blank">Next.js</a></span> | ||
<span>Hosted on <a href="https://pages.cloudflare.com/" target="_blank">Cloudflare Pages</a></span> | ||
</div> | ||
<div className={styles.social}> | ||
<span>Follow me on <a href="https://github.com/flyhaozi" target="_blank">Github</a></span> | ||
</div> | ||
{ | ||
locale === 'en' && | ||
<> | ||
<div className={styles.tools}> | ||
<span>Designed in <a href="https://www.figma.com/" target="_blank">figma</a></span> | ||
<span>Built with <a href="https://nextjs.org/" target="_blank">Next.js</a></span> | ||
<span>Hosted on <a href="https://pages.cloudflare.com/" target="_blank">Cloudflare Pages</a></span> | ||
</div> | ||
<div className={styles.social}> | ||
<span>Follow me on <a href="https://github.com/flyhaozi" target="_blank">Github</a></span> | ||
</div> | ||
</> | ||
} | ||
{ | ||
locale === 'zh-CN' && | ||
<> | ||
<div className={styles.tools}> | ||
<span>在 <a href="https://www.figma.com/" target="_blank">figma</a> 中设计</span> | ||
<span>用 <a href="https://nextjs.org/" target="_blank">Next.js</a> 构建</span> | ||
<span>托管于 <a href="https://pages.cloudflare.com/" target="_blank">Cloudflare Pages</a></span> | ||
</div> | ||
<div className={styles.social}> | ||
<span>在 <a href="https://github.com/flyhaozi" target="_blank">Github</a> 上关注我</span> | ||
</div> | ||
</> | ||
} | ||
</footer> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
const locale = process.env.NEXT_LOCALE; | ||
|
||
module.exports = { | ||
basePath: (!locale || (locale === 'en')) ? '' : '/' + process.env.NEXT_LOCALE, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,44 @@ | ||
import Head from 'next/head' | ||
import cstyles from '../styles/Common.module.css' | ||
|
||
export default function About() { | ||
const meta = { | ||
en: { | ||
title: 'About - fHz' | ||
}, | ||
'zh-CN': { | ||
title: '关于 - fHz' | ||
} | ||
} | ||
|
||
export default function About({ locale }) { | ||
return ( | ||
<> | ||
<Head > | ||
<title>About | fHz</title> | ||
<meta property="og:title" content="About | fHz" key="title" /> | ||
<title>{meta[locale].title}</title> | ||
<meta property="og:title" content={meta[locale].title} key="title" /> | ||
<meta property="og:url" content="https://flyhaozi.com/about" key="url" /> | ||
</Head> | ||
<article className={cstyles.section}> | ||
<h2>About Me</h2> | ||
<p>Hi, I am <em>Yuhao Feng</em>. fHz is the name I use to publish my works.</p> | ||
<p>I like using browser extensions and userscripts to enhance my web browsing experience, so I start learning front-end techniques.</p> | ||
<p>I have published some small extensions and scripts. Hope they will make your browsing experience better.</p> | ||
</article> | ||
<article className={cstyles.section}> | ||
<h2>关于我</h2> | ||
<p>你好,我是<em>冯宇浩</em>。fHz 是我用来发布作品的名字。</p> | ||
<p>我喜欢使用浏览器扩展和用户脚本来增强自己的网页浏览体验,因此我开始了学习前端技术。</p> | ||
<p>我已经发布了几个小型的扩展和脚本,希望它们能够让你的浏览体验变得更好。</p> | ||
</article> | ||
{ | ||
locale === 'en' && | ||
<article className={cstyles.section}> | ||
<h2>About Me</h2> | ||
<p>Hi, I am <em>Yuhao Feng</em>. fHz is the name I use to publish my works.</p> | ||
<p>I like using browser extensions and userscripts to enhance my web browsing experience, so I start learning front-end techniques.</p> | ||
<p>I have published some small extensions and scripts. Hope they will make your browsing experience better.</p> | ||
</article> | ||
}{ | ||
locale === 'zh-CN' && | ||
<article className={cstyles.section}> | ||
<h2>关于我</h2> | ||
<p>你好,我是<em>冯宇浩</em>。fHz 是我用来发布作品的名字。</p> | ||
<p>我喜欢使用浏览器扩展和用户脚本来增强自己的网页浏览体验,因此我开始了学习前端技术。</p> | ||
<p>我已经发布了几个小型的扩展和脚本,希望它们能够让你的浏览体验变得更好。</p> | ||
</article> | ||
} | ||
</> | ||
) | ||
} | ||
|
||
export async function getStaticProps() { | ||
return { props: { locale: process.env.NEXT_LOCALE ?? 'en' } }; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.