Skip to content

Commit 053dc6f

Browse files
authored
Merge pull request #526 from 1chooo/dev
chore: integrate Tailwind CSS
2 parents 38a9858 + eb85226 commit 053dc6f

28 files changed

+100
-301
lines changed

apps/web/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "1chooo-com",
3-
"version": "0.3.5",
3+
"version": "0.4.0",
44
"private": true,
55
"license": "CC-BY-4.0",
66
"author": {

apps/web/src/app/blog/[slug]/page.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ export default async function Blog({ params }: {
117117
<article>
118118
<section className="blog-text">
119119
<PageHeader header="Hugo's Blog" />
120-
<h1 className="title font-medium text-2xl tracking-tighter max-w-[650px]">
120+
<h1 className="title font-semibold text-2xl tracking-tighter max-w-[650px]">
121121
<MarkdownRenderer content={post.metadata.title} />
122122
</h1>
123123
<div className="flex justify-between items-center mt-2 mb-8 text-sm max-w-[650px]">

apps/web/src/app/blog/page.tsx

+4-4
Original file line numberDiff line numberDiff line change
@@ -93,13 +93,13 @@ export default async function BlogPage({ searchParams }: {
9393
)}
9494
</time>
9595
</div>
96-
<h3 className="h3 blog-item-title">
96+
<h3 className="text-2xl text-white-2 font-semibold leading-[1.3] transition-all hover:text-orange-yellow-crayola">
9797
<Balancer><MarkdownRenderer content={post.metadata.title} /></Balancer>
9898
</h3>
99-
<MarkdownRenderer
100-
className="blog-summary"
99+
<Balancer><MarkdownRenderer
100+
className="text-light-gray text-s font-light leading-6 overflow-hidden line-clamp-2"
101101
content={post.metadata.summary}
102-
/>
102+
/></Balancer>
103103
</div>
104104
</Link>
105105
</li>

apps/web/src/app/contact/page.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ const Contact = () => {
2323
return (
2424
<article data-page=''>
2525
<PageHeader header="Hugo's Contact" />
26-
<section className="contact-form">
26+
<section className="mb-[10px]">
2727
<MapBox />
28-
<h3 className="h3 form-title">Contact Form</h3>
28+
<h3 className="text-white-2 text-2xl font-bold mb-[20px]">Contact Form</h3>
2929
<form action="#" className="form" data-form>
3030
<div className="input-wrapper">
3131
<input

apps/web/src/app/globals.css

+4-164
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
#copyright 2024 @1chooo
33
\*-----------------------------------*/
44

5+
@tailwind base;
6+
@tailwind components;
7+
@tailwind utilities;
8+
59
:root {
610
/**
711
* colors
@@ -262,23 +266,6 @@ article {
262266
font-weight: var(--fw-500);
263267
}
264268

265-
.article-title {
266-
position: relative;
267-
padding-bottom: 7px;
268-
margin-bottom: 30px;
269-
}
270-
271-
.article-title::after {
272-
content: "";
273-
position: absolute;
274-
bottom: 0;
275-
left: 0;
276-
width: 30px;
277-
height: 3px;
278-
background: var(--text-gradient-yellow);
279-
border-radius: 3px;
280-
}
281-
282269
.has-scrollbar::-webkit-scrollbar {
283270
/* for vertical scrollbar */
284271
width: 5px;
@@ -374,33 +361,6 @@ main {
374361
color: var(--light-gray);
375362
}
376363

377-
/*-----------------------------------*\
378-
#DOCS
379-
\*-----------------------------------*/
380-
381-
.docs .article-title {
382-
margin-bottom: 15px;
383-
}
384-
385-
.docs-text {
386-
color: var(--light-gray);
387-
font-size: var(--fs-6);
388-
font-weight: var(--fw-300);
389-
line-height: 1.6;
390-
}
391-
392-
.docs-text p {
393-
margin-bottom: 15px;
394-
}
395-
396-
/*-----------------------------------*\
397-
#ABOUT
398-
\*-----------------------------------*/
399-
400-
.about .article-title {
401-
margin-bottom: 15px;
402-
}
403-
404364
/**
405365
* #service
406366
*/
@@ -430,10 +390,6 @@ main {
430390
gap: 20px;
431391
}
432392

433-
.service-content-box {
434-
text-align: center;
435-
}
436-
437393
/**
438394
* #testimonials
439395
*/
@@ -737,11 +693,6 @@ main {
737693
margin-bottom: 20px;
738694
}
739695

740-
.timeline-item-title {
741-
font-size: var(--fs-6);
742-
line-height: 1.3;
743-
margin-bottom: 7px;
744-
}
745696

746697
.relevant-courses-list span {
747698
color: var(--vegas-gold);
@@ -867,17 +818,6 @@ main {
867818
display: inline;
868819
}
869820

870-
.profession-experience-title {
871-
color: var(--orange-yellow-crayola);
872-
display: inline;
873-
}
874-
875-
.profession-experience-duration {
876-
float: right;
877-
color: var(--white-1);
878-
/* 添加你想要的样式 */
879-
}
880-
881821
.timeline-list p span {
882822
float: right;
883823
color: var(--white-1);
@@ -1166,32 +1106,6 @@ main {
11661106
border-radius: 4px;
11671107
}
11681108

1169-
.blog-item-title {
1170-
margin-bottom: 10px;
1171-
line-height: 1.3;
1172-
transition: var(--transition-1);
1173-
}
1174-
1175-
.blog-post-item.active>a:hover .blog-item-title {
1176-
color: var(--orange-yellow-crayola);
1177-
}
1178-
1179-
.blog-summary {
1180-
color: var(--light-gray);
1181-
font-size: var(--fs-6);
1182-
font-weight: var(--fw-300);
1183-
line-height: 1.6;
1184-
display: -webkit-box;
1185-
display: box;
1186-
-webkit-line-clamp: 2;
1187-
-moz-line-clamp: 2;
1188-
line-clamp: 2;
1189-
-webkit-box-orient: vertical;
1190-
overflow: hidden;
1191-
text-overflow: ellipsis;
1192-
max-height: 3.2em;
1193-
}
1194-
11951109
.blog-post-item.skeleton {
11961110
display: flex;
11971111
flex-direction: column;
@@ -1227,14 +1141,6 @@ main {
12271141
#CONTACT
12281142
\*-----------------------------------*/
12291143

1230-
.contact-form {
1231-
margin-bottom: 10px;
1232-
}
1233-
1234-
.form-title {
1235-
margin-bottom: 20px;
1236-
}
1237-
12381144
.input-wrapper {
12391145
display: grid;
12401146
grid-template-columns: 1fr;
@@ -1441,16 +1347,6 @@ textarea.form-input::-webkit-resizer {
14411347
padding: 30px;
14421348
}
14431349

1444-
.article-title {
1445-
font-weight: var(--fw-600);
1446-
padding-bottom: 15px;
1447-
}
1448-
1449-
.article-title::after {
1450-
width: 40px;
1451-
height: 5px;
1452-
}
1453-
14541350
/**
14551351
* #MAIN
14561352
*/
@@ -1477,26 +1373,6 @@ textarea.form-input::-webkit-resizer {
14771373
margin: 32px 0;
14781374
}
14791375

1480-
/**
1481-
* # DOCS
1482-
*/
1483-
1484-
.docs .article-title {
1485-
margin-bottom: 20px;
1486-
}
1487-
1488-
.docs-text {
1489-
margin-bottom: 40px;
1490-
}
1491-
1492-
/**
1493-
* #ABOUT
1494-
*/
1495-
1496-
.about .article-title {
1497-
margin-bottom: 20px;
1498-
}
1499-
15001376
/* testimonials */
15011377

15021378
.testimonials-title {
@@ -1706,10 +1582,6 @@ textarea.form-input::-webkit-resizer {
17061582
* PORTFOLIO
17071583
*/
17081584

1709-
.article-title {
1710-
padding-bottom: 20px;
1711-
}
1712-
17131585
.filter-select-box {
17141586
display: none;
17151587
}
@@ -1801,8 +1673,6 @@ textarea.form-input::-webkit-resizer {
18011673
box-shadow: var(--shadow-5);
18021674
}
18031675

1804-
1805-
18061676
/**
18071677
* MAIN
18081678
*/
@@ -2026,34 +1896,4 @@ textarea.form-input::-webkit-resizer {
20261896

20271897
.markdown-alert-caution .markdown-alert-title {
20281898
color: var(--github-alert-caution-color);
2029-
}
2030-
2031-
.anchor-header {
2032-
position: relative;
2033-
margin: 0;
2034-
cursor: pointer;
2035-
color: hsl(0, 0%, 84%);
2036-
}
2037-
2038-
.anchor-header a {
2039-
text-decoration: none;
2040-
color: hsl(0, 0%, 84%);
2041-
}
2042-
2043-
.anchor-header a:hover {
2044-
text-decoration: underline;
2045-
}
2046-
2047-
.anchor-header .hash {
2048-
position: absolute;
2049-
left: -1.5rem;
2050-
opacity: 0;
2051-
color: hsl(0, 0%, 84%);
2052-
transition: opacity 0.2s ease-in-out;
2053-
transform: scale(0.8);
2054-
top: 0.2rem;
2055-
}
2056-
2057-
.anchor-header:hover .hash {
2058-
opacity: 1;
20591899
}

apps/web/src/app/not-found.tsx

+1-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import PageContent from '@/components/page-content';
66
import MarkdownRenderer from '@/components/markdown/markdown-renderer';
77
import config from '@/config';
88

9-
import '@/styles/about/about-text.css';
109

1110
const { title } = config;
1211

@@ -31,7 +30,7 @@ const NotFound: React.FC = () => {
3130
page="404"
3231
pathName={pathname}
3332
>
34-
<section className="about-text">
33+
<section className="text-light-gray leading-relaxed">
3534
{renderErrorMessage()}
3635
</section>
3736
</PageContent>

apps/web/src/app/page.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import GitHubStats from '@/components/about/github-stats';
77
import TechStack from '@/components/about/tech-stack';
88
import LifeStyles from '@/components/about/life-styles';
99
import PageHeader from '@/components/page-header';
10-
import H4 from '@/components/markdown/h4';
10+
import AboutHeader from '@/components/about/about-header';
1111
import MarkdownRenderer from "@/components/markdown/markdown-renderer";
1212
import { FaRegPenToSquare } from "react-icons/fa6";
1313
import SeeMoreButton from "@/components/about/see-more-btn";
@@ -57,9 +57,9 @@ const About = async () => {
5757
return (
5858
<article data-page=''>
5959
<PageHeader header={header} />
60-
<H4 text={`${subHeader} (${pronouns})`} />
60+
<AboutHeader text={`${subHeader} (${pronouns})`} />
6161
<AboutText introduction={introduction} />
62-
<H4 text="$ ls -al Latest Articles" />
62+
<AboutHeader text="$ ls -al Latest Articles" />
6363
<section>
6464
<ul className="latest-post-list has-scrollbar">
6565
{selectedPosts.map((post, index) => (

apps/web/src/app/portfolio/[slug]/page.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ export default async function Portfolio({ params }: {
113113
<article>
114114
<section className="blog-text">
115115
<PageHeader header="Hugo's Portfolio" />
116-
<h1 className="title font-medium text-2xl tracking-tighter max-w-[650px]">
116+
<h1 className="title font-semibold text-2xl font-text-2xl tracking-tighter max-w-[650px]">
117117
<MarkdownRenderer content={post.metadata.title} />
118118
</h1>
119119
<div className="flex justify-between items-center mt-2 mb-8 text-sm max-w-[650px]">
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import React from 'react';
2+
3+
interface H4Props {
4+
text: string;
5+
}
6+
7+
const AboutHeader: React.FC<H4Props> = ({ text }) => {
8+
return (
9+
<h2 className="text-light-gray text-lg font-bold mt-[30px] mb-[30px]">
10+
<code>{text}</code>
11+
</h2>
12+
);
13+
};
14+
15+
export default AboutHeader;

apps/web/src/components/about/about-text.tsx

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
11
import React from 'react';
22
import MarkdownRenderer from '@/components/markdown/markdown-renderer';
33

4-
import "@/styles/about/about-text.css"
5-
64
interface AboutTextProps {
75
introduction: string;
86
}
97

108
const AboutText: React.FC<AboutTextProps> = ({ introduction }) => {
119
return (
12-
<section className="about-text">
10+
<section className="text-light-gray leading-relaxed">
1311
<MarkdownRenderer content={introduction} />
1412
</section>
1513
);

0 commit comments

Comments
 (0)