@@ -15,7 +15,6 @@ import useScrollSpy from '@/hooks/useScrollspy';
15
15
16
16
import BlogCard from '@/components/content/blog/BlogCard' ;
17
17
import Comment from '@/components/content/Comment' ;
18
- import LikeButton from '@/components/content/LikeButton' ;
19
18
import MDXComponents from '@/components/content/MDXComponents' ;
20
19
import ReloadDevtool from '@/components/content/ReloadDevtool' ;
21
20
import TableOfContents , {
@@ -96,71 +95,69 @@ export default function SingleBlogPage({
96
95
97
96
< main >
98
97
< ReloadDevtool />
99
- < section className = 'pt-[60px] ' >
98
+ < section className = '' >
100
99
< div className = 'layout pt-8' >
101
- < div className = 'rounded-[8px] bg-white p-4 shadow dark:border-gray-600 dark:bg-[#121212]' >
102
- < h1 className = 'mt-4 text-3xl dark:text-gray-100' >
103
- { frontmatter . title }
104
- </ h1 >
105
-
106
- < p className = 'mt-2 text-sm text-gray-600 dark:text-gray-300' >
107
- Written on{ ' ' }
108
- { format ( new Date ( frontmatter . publishedAt ) , 'MMMM dd, yyyy' ) } by
109
- Chocolate.
110
- </ p >
111
- { frontmatter . lastUpdated && (
112
- < div className = 'mt-2 flex flex-wrap gap-2 text-sm text-gray-700 dark:text-gray-200' >
113
- < p >
114
- Last updated{ ' ' }
115
- { format ( new Date ( frontmatter . lastUpdated ) , 'MMMM dd, yyyy' ) }
116
- .
117
- </ p >
118
- < UnstyledLink
119
- href = { COMMIT_HISTORY_LINK }
120
- className = { clsx (
121
- 'inline-flex items-center gap-1 rounded-sm font-medium' ,
122
- 'text-gray-600 hover:text-gray-900 dark:text-gray-300 dark:hover:text-primary-300' ,
123
- 'focus:outline-none focus-visible:ring focus-visible:ring-primary-300'
124
- ) }
125
- >
126
- < MdHistory className = 'text-lg' />
127
- < span > See changes</ span >
128
- </ UnstyledLink >
129
- </ div >
130
- ) }
131
- < div className = 'mt-6 flex items-center justify-start gap-2 text-sm font-medium text-gray-600 dark:text-gray-300' >
132
- < div className = 'flex items-center gap-1' >
133
- < HiOutlineClock className = 'inline-block text-base' />
134
- { frontmatter . readingTime . text }
135
- </ div >
136
- { meta ?. devtoViews ? (
137
- < Tooltip
138
- content = {
139
- < >
140
- { meta . devtoViews . toLocaleString ( ) } views on{ ' ' }
141
- < CustomLink href = 'https://dev.to/theodorusclarence' >
142
- dev.to
143
- </ CustomLink >
144
- </ >
145
- }
146
- position = 'bottom'
147
- >
100
+ < section className = 'grid grid-cols-[auto,334px] gap-8 mid:grid-cols-none' >
101
+ < article className = 'mdx prose dark:prose-invert mx-auto mt-4 w-full rounded-[8px] border border-white bg-white px-8 py-6 shadow transition-colors dark:border-gray-600 dark:bg-[#121212] mb:px-4 mb:pt-0' >
102
+ < span className = 'mt-0 block border-b-[1px] border-solid border-b-[#eee] pb-[0.2em] text-3xl font-normal leading-normal text-[#1f2d3d] dark:border-b-gray-600 dark:text-[#fff] dark:opacity-90' >
103
+ { frontmatter . title }
104
+ </ span >
105
+ < p className = 'mt-2 text-sm text-gray-600 dark:text-gray-300' >
106
+ Written on{ ' ' }
107
+ { format ( new Date ( frontmatter . publishedAt ) , 'MMMM dd, yyyy' ) }
108
+ </ p >
109
+ { frontmatter . lastUpdated && (
110
+ < div className = 'mt-2 flex flex-wrap gap-2 text-sm text-gray-700 dark:text-gray-200' >
111
+ < p >
112
+ Last updated{ ' ' }
113
+ { format (
114
+ new Date ( frontmatter . lastUpdated ) ,
115
+ 'MMMM dd, yyyy'
116
+ ) }
117
+ .
118
+ </ p >
119
+ < UnstyledLink
120
+ href = { COMMIT_HISTORY_LINK }
121
+ className = { clsx (
122
+ 'inline-flex items-center gap-1 rounded-sm font-medium' ,
123
+ 'text-gray-600 hover:text-gray-900 dark:text-gray-300 dark:hover:text-primary-300' ,
124
+ 'focus:outline-none focus-visible:ring focus-visible:ring-primary-300'
125
+ ) }
126
+ >
127
+ < MdHistory className = 'text-lg' />
128
+ < span > See changes</ span >
129
+ </ UnstyledLink >
130
+ </ div >
131
+ ) }
132
+ < div className = 'mt-2 flex items-center justify-start gap-2 text-sm font-medium text-gray-600 dark:text-gray-300' >
133
+ < div className = 'flex items-center gap-1' >
134
+ < HiOutlineClock className = 'inline-block text-base' />
135
+ { frontmatter . readingTime . text }
136
+ </ div >
137
+ { meta ?. devtoViews ? (
138
+ < Tooltip
139
+ content = {
140
+ < >
141
+ { meta . devtoViews . toLocaleString ( ) } views on{ ' ' }
142
+ < CustomLink href = 'https://dev.to/theodorusclarence' >
143
+ dev.to
144
+ </ CustomLink >
145
+ </ >
146
+ }
147
+ position = 'bottom'
148
+ >
149
+ < div className = 'flex items-center gap-1' >
150
+ < HiOutlineEye className = 'inline-block text-base' />
151
+ { meta ?. views ?. toLocaleString ( ) ?? '-' } views
152
+ </ div >
153
+ </ Tooltip >
154
+ ) : (
148
155
< div className = 'flex items-center gap-1' >
149
156
< HiOutlineEye className = 'inline-block text-base' />
150
157
{ meta ?. views ?. toLocaleString ( ) ?? '-' } views
151
158
</ div >
152
- </ Tooltip >
153
- ) : (
154
- < div className = 'flex items-center gap-1' >
155
- < HiOutlineEye className = 'inline-block text-base' />
156
- { meta ?. views ?. toLocaleString ( ) ?? '-' } views
157
- </ div >
158
- ) }
159
- </ div >
160
- </ div >
161
-
162
- < section className = 'grid grid-cols-[auto,250px] gap-8' >
163
- < article className = 'mdx prose dark:prose-invert mx-auto mt-4 w-full rounded-[8px] bg-white px-4 py-6 shadow transition-colors dark:bg-[#121212]' >
159
+ ) }
160
+ </ div >
164
161
< Component
165
162
components = {
166
163
{
@@ -171,16 +168,16 @@ export default function SingleBlogPage({
171
168
/>
172
169
</ article >
173
170
174
- < aside className = 'py-4' >
171
+ < aside className = 'py-4 mid:hidden ' >
175
172
< div className = 'sticky top-[84px] rounded-[8px] bg-white px-4 py-5 shadow dark:bg-[#121212]' >
176
173
< TableOfContents
177
174
toc = { toc }
178
175
minLevel = { minLevel }
179
176
activeSection = { decodeURI ( activeSection as string ) }
180
177
/>
181
- < div className = 'flex items-center justify-center py-8' >
178
+ { /* <div className='flex items-center justify-center py-8'>
182
179
<LikeButton slug={contentSlug} />
183
- </ div >
180
+ </div> */ }
184
181
</ div >
185
182
</ aside >
186
183
</ section >
@@ -192,7 +189,7 @@ export default function SingleBlogPage({
192
189
{ populatedRecommendations . length > 0 && (
193
190
< div className = 'mt-20 dark:text-gray-200' >
194
191
< h2 > Other posts that you might like</ h2 >
195
- < ul className = 'sm:grid-cols-2 mt-4 grid grid-cols-3 gap-4' >
192
+ < ul className = 'mt-4 grid grid-cols-1 gap-4' >
196
193
{ populatedRecommendations . map ( ( post , i ) => (
197
194
< BlogCard
198
195
onClick = { ( ) => {
0 commit comments