@@ -9,6 +9,8 @@ import { SafeHTML } from '@/components/SafeHTML'
99import { ArticleCard } from '@/components/ArticleCard'
1010import { TableOfContents } from '@/components/TableOfContents'
1111import { ArticleSidebar } from '@/components/ArticleSidebar'
12+ import AuthorInfo from '@/components/AuthorInfo'
13+ import ShareButtons from '@/components/ShareButtons'
1214import { notFound } from 'next/navigation'
1315import type { Metadata } from 'next'
1416
@@ -143,80 +145,12 @@ export default async function ArticlePage({ params }: Props) {
143145 </ div >
144146
145147 { /* 著者情報セクション */ }
146- < div className = "mt-12 rounded-xl border border-gray-200 bg-gray-50 p-6" >
147- < div className = "flex items-start gap-4" >
148- < div className = "h-16 w-16 overflow-hidden rounded-full bg-gray-300" >
149- < div className = "flex h-full w-full items-center justify-center text-2xl text-gray-600" >
150- 👨⚕️
151- </ div >
152- </ div >
153- < div className = "flex-1" >
154- < h3 className = "mb-2 text-lg font-semibold text-[color:var(--foreground)]" >
155- 編集部
156- </ h3 >
157- < p className = "text-sm text-gray-600" >
158- 医者と歯医者の交換日記編集部です。医科歯科連携に関する最新情報や実践的なノウハウをお届けしています。
159- </ p >
160- </ div >
161- </ div >
162- </ div >
148+ < AuthorInfo author = { article . author } />
163149
164- { /* ソーシャルシェア */ }
165- < div className = "mt-8 flex items-center gap-4" >
166- < span className = "text-sm font-medium text-gray-600" >
167- シェア:
168- </ span >
169- < div className = "flex gap-2" >
170- < a
171- href = { `https://x.com/intent/tweet?url=${ encodeURIComponent ( `https://www.ishatohaisha.com/general/${ article . id } ` ) } &text=${ encodeURIComponent ( article . title ) } ` }
172- target = "_blank"
173- rel = "noopener noreferrer"
174- className = "flex h-8 w-8 items-center justify-center rounded-full bg-black text-white transition-colors hover:bg-gray-800"
175- aria-label = "X(旧Twitter)でシェア"
176- >
177- < svg
178- className = "h-4 w-4"
179- fill = "currentColor"
180- viewBox = "0 0 24 24"
181- aria-hidden = "true"
182- >
183- < path d = "M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z" />
184- </ svg >
185- </ a >
186- < a
187- href = { `https://www.facebook.com/sharer/sharer.php?u=${ encodeURIComponent ( `https://www.ishatohaisha.com/general/${ article . id } ` ) } ` }
188- target = "_blank"
189- rel = "noopener noreferrer"
190- className = "flex h-8 w-8 items-center justify-center rounded-full bg-blue-600 text-white transition-colors hover:bg-blue-700"
191- aria-label = "Facebookでシェア"
192- >
193- < svg
194- className = "h-4 w-4"
195- fill = "currentColor"
196- viewBox = "0 0 24 24"
197- aria-hidden = "true"
198- >
199- < path d = "M24 12.073c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.99 4.388 10.954 10.125 11.854v-8.385H7.078v-3.47h3.047V9.43c0-3.007 1.792-4.669 4.533-4.669 1.312 0 2.686.235 2.686.235v2.953H15.83c-1.491 0-1.956.925-1.956 1.874v2.25h3.328l-.532 3.47h-2.796v8.385C19.612 23.027 24 18.062 24 12.073z" />
200- </ svg >
201- </ a >
202- < a
203- href = { `https://www.linkedin.com/shareArticle?mini=true&url=${ encodeURIComponent ( `https://www.ishatohaisha.com/general/${ article . id } ` ) } &title=${ encodeURIComponent ( article . title ) } ` }
204- target = "_blank"
205- rel = "noopener noreferrer"
206- className = "flex h-8 w-8 items-center justify-center rounded-full bg-blue-600 text-white transition-colors hover:bg-blue-700"
207- aria-label = "LinkedInでシェア"
208- >
209- < svg
210- className = "h-4 w-4"
211- fill = "currentColor"
212- viewBox = "0 0 24 24"
213- aria-hidden = "true"
214- >
215- < path d = "M19 0h-14c-2.761 0-5 2.239-5 5v14c0 2.761 2.239 5 5 5h14c2.762 0 5-2.239 5-5v-14c0-2.761-2.238-5-5-5zm-11 19h-3v-11h3v11zm-1.5-12.268c-.966 0-1.75-.79-1.75-1.764s.784-1.764 1.75-1.764 1.75.79 1.75 1.764-.783 1.764-1.75 1.764zm13.5 12.268h-3v-5.604c0-3.368-4-3.113-4 0v5.604h-3v-11h3v1.765c1.396-2.586 7-2.777 7 2.476v6.759z" />
216- </ svg >
217- </ a >
218- </ div >
219- </ div >
150+ < ShareButtons
151+ url = { `https://www.ishatohaisha.com/general/${ article . id } ` }
152+ title = { article . title }
153+ />
220154 { /* 関連記事 */ }
221155 { relatedArticlesWithEndpoint . length > 0 && (
222156 < div className = "mt-12" >
0 commit comments