Skip to content

Commit fc15018

Browse files
authored
Merge pull request #342 from 1chooo/feature/#327
Feature/#327
2 parents 4cfb775 + f6eb5e1 commit fc15018

File tree

6 files changed

+46
-9
lines changed

6 files changed

+46
-9
lines changed

β€Žapps/web/src/app/page.tsx

+9-3
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,27 @@ import AboutText from '@/components/about/about-text';
55
import GitHubStats from '@/components/about/github-stats';
66
import TechStack from '@/components/about/tech-stack';
77
import LifeStyles from '@/components/about/life-styles';
8-
import config from '@/config';
98
import PageContent from '@/components/page-content';
109
import H4 from '@/components/markdown/h4';
10+
import config from '@/config';
1111

1212
const { about } = config;
1313
const { subHeader, pronouns } = about;
14-
const { header } = about;
14+
const { firstName, lastName } = about;
15+
const { preferredName } = about;
16+
17+
const title =
18+
preferredName === ''
19+
? `About ${firstName} ${lastName} πŸ‘¨πŸ»β€πŸ’»`
20+
: `About ${preferredName} πŸ‘¨πŸ»β€πŸ’»`;
1521

1622
const About = () => {
1723
const pathname = usePathname();
1824

1925
return (
2026
<PageContent
2127
documentTitle=''
22-
title={header}
28+
title={title}
2329
page="about"
2430
pathName={pathname}
2531
>

β€Žapps/web/src/components/side-bar/avatar-box.tsx

+10-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,15 @@ import { breakpoints } from '@/lib/constants';
55

66
import "@/styles/side-bar/avatar-box.css";
77

8+
import config from '@/config';
9+
10+
const { about } = config;
11+
const {
12+
firstName,
13+
lastName,
14+
middleName,
15+
} = about;
16+
817
type AvatarBoxProps = {
918
avatar: string;
1019
};
@@ -17,7 +26,7 @@ const AvatarBox: React.FC<AvatarBoxProps> = ({ avatar }) => {
1726
<Image
1827
id="profile-img"
1928
src={avatar}
20-
alt="Hugo ChunHo Lin"
29+
alt={`${firstName} (${middleName}) ${lastName}`}
2130
width={imageSize.width}
2231
height={imageSize.height}
2332
loading="lazy"

β€Žapps/web/src/components/side-bar/info-content.tsx

+15-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,23 @@
11
import React from 'react';
2+
import config from '@/config';
3+
4+
const { status } = config;
5+
const { about } = config;
6+
const {
7+
firstName,
8+
lastName,
9+
middleName,
10+
} = about;
211

312
const InfoContent: React.FC = () => (
413
<div className="info-content">
5-
<h1 className="name" title="Hugo ChunHo Lin">Hugo ChunHo Lin</h1>
14+
<h1
15+
className="name"
16+
title={`${firstName} (${middleName}) ${lastName}`}
17+
>{firstName} ({middleName}) {lastName}
18+
</h1>
619
<p className="title">
7-
<strong>Day ONE ⚑️</strong>
20+
<strong>{status}</strong>
821
</p>
922
</div>
1023
);

β€Žapps/web/src/config/index.ts

+7-2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import { PiBooks } from "react-icons/pi";
88

99
const config: Config = {
1010
avatar: '/images/profile.jpg',
11+
status: "Day ONE ⚑️",
1112
navItems: [
1213
{ path: '/', label: 'About' },
1314
{ path: '/resume', label: 'Resume' },
@@ -22,10 +23,14 @@ const config: Config = {
2223
"linkedinUsername": "1chooo"
2324
},
2425
about: {
25-
"header": "About Hugo πŸ‘¨πŸ»β€πŸ’»",
2626
"subHeader": "$ ls -al Hugo πŸ‘¨πŸ»β€πŸ’»",
27-
"pronouns": "He/Him",
27+
"firstName": 'Chun-Ho',
28+
"lastName": 'Lin',
29+
"middleName": 'Hugo' || '',
30+
"preferredName": 'Hugo' || '',
31+
"pronouns": 'He/Him',
2832
"introductions": [
33+
// "#### $ ls -al Hugo πŸ‘¨πŸ»β€πŸ’» (He/Him)",
2934
"I obtained my Bachelor's degree from [National Central University 🐿️](https://www.ncu.edu.tw/), driven by a *sincere passion* for **Software Engineering πŸ’».**",
3035
`My current research interests include ***Programming Language Theory, Operating Systems, and Compilers.*** To gain practical experience, I developed my own ***<a href="https://en.wikipedia.org/wiki/Lisp_(programming_language)">Lisp</a>*** interpreter using **<a href="https://en.wikipedia.org/wiki/C_(programming_language)">C</a>** <sup>[[Code](https://github.com/1chooo/compiler-101)]</sup> and implemented [***Monkey Programming***](https://monkeylang.org/) Compiler with [**GO**](https://go.dev/) <sup>[[Code](https://github.com/1chooo/monkey-prog-lang)]</sup>.`,
3136
"In my spare time, I do workouts πŸ’ͺ🏻, street photography πŸ“Έ, and tech content writing ✍🏻.",

β€Žapps/web/src/types/about.d.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,11 @@ export type TechStack = {
2121
* React element.
2222
*/
2323
export type About = {
24-
header: string;
2524
subHeader: string;
25+
firstName: string;
26+
lastName: string;
27+
middleName: string;
28+
preferredName: string;
2629
pronouns: string;
2730
introductions: string[];
2831
lifestyles: LifeStyle[];

β€Žapps/web/src/types/config.d.ts

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import type { NavItem } from "@/types/nav-bar";
1313

1414
export type Config = {
1515
avatar: string;
16+
status: string;
1617
navItems: NavItem[];
1718
socialMedia: SocialMedia;
1819
about: About;

0 commit comments

Comments
Β (0)