Skip to content

Commit c8253ec

Browse files
authored
fix: migrated Page component style from SCSS to Tailwind CSS (#8101)
1 parent 22d367a commit c8253ec

2 files changed

Lines changed: 26 additions & 107 deletions

File tree

src/components/Page/Page.jsx

Lines changed: 26 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ import { placeholderString } from "../Placeholder/Placeholder.jsx";
1212
import AdjacentPages from "./AdjacentPages.jsx";
1313

1414
// Load Styling
15-
import "./Page.scss";
1615

1716
export default function Page(props) {
1817
const {
@@ -117,7 +116,10 @@ export default function Page(props) {
117116
);
118117
}
119118
return (
120-
<main id="main-content" className="page">
119+
<main
120+
id="main-content"
121+
className="flex-auto relative overflow-x-hidden py-[1.5em] px-[1em] md:flex-[3] md:p-[1.5em]"
122+
>
121123
<Markdown>
122124
<h1>{title}</h1>
123125
{rest.date && pathname.startsWith("/blog/") && !isBlogIndex && (
@@ -136,19 +138,34 @@ export default function Page(props) {
136138
<div id="md-content">{contentRender}</div>
137139

138140
{rest.url === "/blog/" && (
139-
<div className="blog-list">
141+
<div className="mt-8">
140142
{(props.pages || [])
141143
.filter((post) => post.url !== "/blog/")
142144
.map((post) => (
143-
<div key={post.url} className="blog-post-item">
144-
<h2>
145-
<Link to={post.url}>{post.title}</Link>
145+
<div
146+
key={post.url}
147+
className="mb-[3rem] pb-[2rem] border-b border-gray-100 last:border-b-0 dark:border-gray-800"
148+
>
149+
<h2 className="mt-0 mb-[0.5rem] text-[1.8rem] font-bold leading-[1.2]">
150+
<Link
151+
to={post.url}
152+
className="text-blue-800 no-underline hover:text-blue-400 dark:!text-[#9ab3c0] dark:hover:!text-blue-200"
153+
>
154+
{post.title}
155+
</Link>
146156
</h2>
147157
{post.date && (
148-
<div className="blog-post-date">{post.date}</div>
158+
<div className="text-gray-500 text-[1.2rem] font-semibold mt-[0.25rem] mb-[1rem] italic dark:text-[#bbb]">
159+
{post.date}
160+
</div>
149161
)}
150-
<p>{post.teaser}</p>
151-
<Link to={post.url} className="read-more">
162+
<p className="text-gray-600 leading-[1.4] mb-[1rem] dark:text-gray-200">
163+
{post.teaser}
164+
</p>
165+
<Link
166+
to={post.url}
167+
className="text-blue-400 font-semibold no-underline hover:underline dark:text-blue-200"
168+
>
152169
Read More &rarr;
153170
</Link>
154171
</div>

src/components/Page/Page.scss

Lines changed: 0 additions & 98 deletions
This file was deleted.

0 commit comments

Comments
 (0)