Skip to content

Commit 1aebe2d

Browse files
committed
fix(gatsby-theme-pitayan): style adjustment for post page
1 parent 8a61f8a commit 1aebe2d

File tree

3 files changed

+23
-38
lines changed

3 files changed

+23
-38
lines changed

packages/gatsby-theme-pitayan/src/assets/css/markdown.css

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,6 @@
11
.markdown {
2-
h1,
3-
h2,
4-
h3,
5-
h4,
6-
h5,
7-
h6,
8-
blockquote,
9-
p,
10-
ul,
11-
pre,
12-
ol {
13-
@apply mark-w-sm;
14-
@apply md:mark-w-md;
15-
}
2+
@apply mark-w-sm;
3+
@apply md:mark-w-md;
164

175
h1,
186
h2,
@@ -33,11 +21,6 @@
3321
}
3422
}
3523

36-
table {
37-
@apply mark-w-md;
38-
@apply lg:mark-w-lg;
39-
}
40-
4124
a {
4225
@apply text-blue-600;
4326

packages/gatsby-theme-pitayan/src/components/AuthorCard/index.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,11 @@ const AuthorCard: React.FC<AuthorCardProps> = ({
2828
yamlId,
2929
}) => {
3030
return (
31-
<div className={`${className} flex flex-wrap`}>
32-
<Avatar className={`mb-4 mr-8 ${avatarClassName}`} initial={initial} image={image} />
33-
<div className="flex flex-col items-stretch justify-between flex-1">
31+
<div className={`${className} flex flex-wrap space-x-0 sm:space-x-8`}>
32+
<div className="w-full sm:w-auto text-center">
33+
<Avatar className={`mb-4 ${avatarClassName}`} initial={initial} image={image} />
34+
</div>
35+
<div className="flex flex-col items-stretch justify-between flex-1 text-center sm:text-left">
3436
<h3 className="leading-tight md:leading-tight">
3537
{name}
3638
{yamlId &&

packages/gatsby-theme-pitayan/src/templates/post/index.tsx

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -131,14 +131,14 @@ const Post: React.FC<PostProps> = ({
131131
<h1 className="text-center">{title}</h1>
132132
<PostMeta className="block mb-4 text-center" date={date} timeToRead={timeToRead} />
133133

134-
<div className="flex flex-wrap items-center justify-between">
134+
<div className="block sm:flex flex-wrap items-center justify-center sm:justify-between">
135135
<PostAuthors data={coAuthors} />
136136
<SocialSharing
137137
url={url}
138138
title={title}
139139
hashtags={categories.join(",")}
140140
description={description}
141-
className="space-x-6 text-xl py-4"
141+
className="space-x-6 text-xl py-4 justify-center"
142142
twitter
143143
facebook
144144
linkedin
@@ -158,15 +158,15 @@ const Post: React.FC<PostProps> = ({
158158
</MDXProvider>
159159
</article>
160160

161-
<div className="my-8 mark-w-sm md:mark-w-md">
162-
<div className="flex flex-wrap justify-between">
163-
<CategoryTags className="my-4" categories={categories} />
161+
<div className="my-8 max-w-lg md:max-w-2xl mx-auto">
162+
<div className="block sm:flex flex-wrap items-center justify-center sm:justify-between">
163+
<CategoryTags className="my-8 justify-center" categories={categories} />
164164
<SocialSharing
165165
url={url}
166166
title={title}
167167
hashtags={categories.join(",")}
168168
description={description}
169-
className="space-x-6 text-xl my-4"
169+
className="space-x-6 text-xl my-8 justify-center"
170170
twitter
171171
facebook
172172
linkedin
@@ -175,20 +175,20 @@ const Post: React.FC<PostProps> = ({
175175
/>
176176
</div>
177177

178-
<div className="flex justify-between flex-wrap text-base mt-12 mb-24">
179-
<div className="p-4 bg-gray-50 border border-solid border-gray-100 dark:bg-gray-800 dark:border-gray-800 rounded my-4">
180-
<Link to={previous.slug} className="site-link w-64 my-2 block">
181-
<div className="flex justify-center items-center space-x-2">
182-
<RiArrowLeftLine className="block text-2xl" />
178+
<div className="flex justify-around flex-wrap text-base mt-12 mb-24">
179+
<div className="p-4 my-4 bg-gray-50 border border-solid border-gray-100 dark:bg-gray-800 dark:border-gray-800 rounded mr-auto w-full md:w-[49%]">
180+
<Link to={previous.slug} className="site-link my-2 block">
181+
<div className="flex items-start space-x-2">
182+
<RiArrowLeftLine className="block h-6 w-6" />
183183
<span>{previous.title}</span>
184184
</div>
185185
</Link>
186186
</div>
187-
<div className="text-right ml-auto p-4 bg-gray-50 border border-solid border-gray-100 dark:bg-gray-800 dark:border-gray-800 rounded my-4">
188-
<Link to={next.slug} className="site-link w-64 my-2 block">
189-
<div className="flex justify-center items-center space-x-2">
187+
<div className="p-4 my-4 bg-gray-50 border border-solid border-gray-100 dark:bg-gray-800 dark:border-gray-800 rounded ml-auto w-full md:w-[49%]">
188+
<Link to={next.slug} className="site-link my-2 block text-right">
189+
<div className="flex items-start space-x-2 justify-end">
190190
<span>{next.title}</span>
191-
<RiArrowRightLine className="block text-2xl" />
191+
<RiArrowRightLine className="block h-6 w-6" />
192192
</div>
193193
</Link>
194194
</div>
@@ -211,7 +211,7 @@ const Post: React.FC<PostProps> = ({
211211
})}
212212
</div>
213213

214-
<div className="my-24 mark-w-sm md:max-w-full">
214+
<div className="my-24 max-w-lg sm:max-w-full mx-auto">
215215
<h5 className="mb-12 text-center">Related Posts</h5>
216216
<PostsGroup
217217
posts={relatedPosts}

0 commit comments

Comments
 (0)