@@ -3,6 +3,9 @@ import { notFound } from 'next/navigation'
33import Link from 'next/link'
44import { ArrowLeft , Terminal , FileCode , Check } from 'lucide-react'
55import CodeModalButton from '@/components/CodeModalButton'
6+ import LanguageIcon from '@/components/LanguageIcon'
7+ import { Prism as SyntaxHighlighter } from 'react-syntax-highlighter'
8+ import { vscDarkPlus } from 'react-syntax-highlighter/dist/esm/styles/prism'
69
710export function generateStaticParams ( ) {
811 return tools . map ( ( tool ) => ( {
@@ -43,37 +46,38 @@ export default async function ToolPage({ params }: { params: Promise<{ id: strin
4346 const category = categories [ tool . category ]
4447
4548 return (
46- < div className = "min-h-screen bg-white" >
49+ < div className = "min-h-screen bg-white dark:bg-gray-900 " >
4750 < div className = "container mx-auto px-4 py-12" >
4851 { /* Back Button */ }
4952 < Link
5053 href = "/"
51- className = "inline-flex items-center gap-2 text-gray-600 hover:text-black transition-colors mb-8"
54+ className = "inline-flex items-center gap-2 text-gray-600 dark:text-gray-400 hover:text-black dark:hover:text-white transition-colors mb-8"
5255 >
5356 < ArrowLeft size = { 20 } />
5457 Ana Sayfaya Dön
5558 </ Link >
5659
5760 { /* Header */ }
58- < div className = "bg-white rounded-xl p-4 md:p-8 border-2 border-black mb-8" >
61+ < div className = "bg-white dark:bg-gray-800 rounded-xl p-4 md:p-8 border-2 border-black dark:border-white mb-8" >
5962 < div className = "flex flex-col md:flex-row md:items-start md:justify-between gap-4 mb-6" >
6063 < div className = "flex-1" >
6164 < div className = "flex items-center gap-3 mb-4" >
6265 < span className = "text-4xl md:text-5xl" > { category . icon } </ span >
6366 < div >
64- < h1 className = "text-2xl md:text-4xl font-bold text-black" > { tool . name } </ h1 >
65- < p className = "text-gray-600 mt-1 md:mt-2 text-sm md:text-base" > { category . name } </ p >
67+ < h1 className = "text-2xl md:text-4xl font-bold text-black dark:text-white " > { tool . name } </ h1 >
68+ < p className = "text-gray-600 dark:text-gray-400 mt-1 md:mt-2 text-sm md:text-base" > { category . name } </ p >
6669 </ div >
6770 </ div >
68- < p className = "text-base md:text-xl text-gray-700" >
71+ < p className = "text-base md:text-xl text-gray-700 dark:text-gray-300 " >
6972 { tool . description }
7073 </ p >
7174 </ div >
7275 < div className = "flex flex-row md:flex-col gap-2" >
73- < span className = "px-3 md:px-4 py-2 bg-gray-200 text-black rounded-lg text-xs md:text-sm font-medium whitespace-nowrap" >
76+ < span className = "px-3 md:px-4 py-2 bg-gray-200 dark:bg-gray-800 text-black dark:text-white rounded-lg text-xs md:text-sm font-medium whitespace-nowrap flex items-center gap-2" >
77+ < LanguageIcon language = { tool . language } size = { 16 } />
7478 { tool . language }
7579 </ span >
76- < span className = "px-3 md:px-4 py-2 bg-black text-white rounded-lg text-xs md:text-sm font-medium text-center break-all md:break-normal" >
80+ < span className = "px-3 md:px-4 py-2 bg-black dark:bg-white text-white dark:text-black rounded-lg text-xs md:text-sm font-medium text-center break-all md:break-normal" >
7781 { tool . fileName }
7882 </ span >
7983 </ div >
@@ -83,49 +87,57 @@ export default async function ToolPage({ params }: { params: Promise<{ id: strin
8387 < div className = "grid md:grid-cols-2 gap-4 mt-6" >
8488 { tool . features . map ( ( feature , i ) => (
8589 < div key = { i } className = "flex items-start gap-3" >
86- < Check className = "text-black flex-shrink-0 mt-1" size = { 20 } />
87- < span className = "text-gray-700" > { feature } </ span >
90+ < Check className = "text-black dark:text-white flex-shrink-0 mt-1" size = { 20 } />
91+ < span className = "text-gray-700 dark:text-gray-300 " > { feature } </ span >
8892 </ div >
8993 ) ) }
9094 </ div >
9195 </ div >
9296
9397 { /* Usage */ }
94- < div className = "bg-white rounded-xl p-8 border-2 border-black mb-8" >
98+ < div className = "bg-white dark:bg-gray-800 rounded-xl p-8 border-2 border-black dark:border-white mb-8" >
9599 < div className = "flex items-center gap-3 mb-4" >
96- < Terminal className = "text-black" size = { 24 } />
97- < h2 className = "text-2xl font-bold text-black" > Kullanım</ h2 >
100+ < Terminal className = "text-black dark:text-white " size = { 24 } />
101+ < h2 className = "text-2xl font-bold text-black dark:text-white " > Kullanım</ h2 >
98102 </ div >
99- < div className = "bg-black rounded-lg p-4 font-mono text-sm" >
103+ < div className = "bg-black dark:bg-gray-950 rounded-lg p-4 font-mono text-sm" >
100104 < code className = "text-green-400" > $ { tool . usage } </ code >
101105 </ div >
102106 </ div >
103107
104108 { /* Code */ }
105- < div className = "bg-white rounded-xl p-8 border-2 border-black mb-8" >
109+ < div className = "bg-white dark:bg-gray-800 rounded-xl p-8 border-2 border-black dark:border-white mb-8" >
106110 < div className = "flex items-center justify-between mb-4" >
107111 < div className = "flex items-center gap-3" >
108- < FileCode className = "text-black" size = { 24 } />
109- < h2 className = "text-2xl font-bold text-black" > Kaynak Kod</ h2 >
112+ < FileCode className = "text-black dark:text-white " size = { 24 } />
113+ < h2 className = "text-2xl font-bold text-black dark:text-white " > Kaynak Kod</ h2 >
110114 </ div >
111115 </ div >
112116 < CodeModalButton code = { tool . code } title = { `${ tool . name } - Kaynak Kod` } language = { tool . language } />
113117 </ div >
114118
115119 { /* Example Output */ }
116- < div className = "bg-white rounded-xl p-8 border-2 border-black" >
120+ < div className = "bg-white dark:bg-gray-900 rounded-xl p-8 border-2 border-black dark:border-white " >
117121 < div className = "flex items-center gap-3 mb-4" >
118- < Terminal className = "text-black" size = { 24 } />
119- < h2 className = "text-2xl font-bold text-black" > Örnek Çıktı</ h2 >
120- </ div >
121- < div className = "bg-black rounded-lg p-6 font-mono text-sm" >
122- < pre className = "text-green-400 whitespace-pre-wrap" > { tool . example } </ pre >
122+ < Terminal className = "text-black dark:text-white" size = { 24 } />
123+ < h2 className = "text-2xl font-bold text-black dark:text-white" > Örnek Çıktı</ h2 >
123124 </ div >
125+ < SyntaxHighlighter
126+ language = "bash"
127+ style = { vscDarkPlus }
128+ customStyle = { {
129+ margin : 0 ,
130+ borderRadius : '0.5rem' ,
131+ fontSize : '0.875rem' ,
132+ } }
133+ >
134+ { tool . example }
135+ </ SyntaxHighlighter >
124136 </ div >
125137
126138 { /* Related Tools */ }
127139 < div className = "mt-12" >
128- < h2 className = "text-2xl font-bold text-black mb-6" > Benzer Araçlar</ h2 >
140+ < h2 className = "text-2xl font-bold text-black dark:text-white mb-6" > Benzer Araçlar</ h2 >
129141 < div className = "grid md:grid-cols-3 gap-6" >
130142 { tools
131143 . filter ( t => t . category === tool . category && t . id !== tool . id )
@@ -134,12 +146,12 @@ export default async function ToolPage({ params }: { params: Promise<{ id: strin
134146 < Link
135147 key = { relatedTool . id }
136148 href = { `/tool/${ relatedTool . id } ` }
137- className = "group bg-white rounded-xl p-6 border-2 border-black hover:bg-black hover:text-white transition-all"
149+ className = "group bg-white dark:bg-gray-800 rounded-xl p-6 border-2 border-black dark:border-white hover:bg-black dark: hover:bg-white hover: text-white dark:hover:text-black transition-all"
138150 >
139- < h3 className = "text-xl font-bold text-black group-hover:text-white mb-2" >
151+ < h3 className = "text-xl font-bold text-black dark:text-white group-hover:text-white dark:group-hover:text-black mb-2" >
140152 { relatedTool . name }
141153 </ h3 >
142- < p className = "text-gray-600 group-hover:text-gray-300 text-sm line-clamp-2" >
154+ < p className = "text-gray-600 dark:text-gray-400 group-hover:text-gray-300 dark:group-hover:text-gray-600 text-sm line-clamp-2" >
143155 { relatedTool . description }
144156 </ p >
145157 </ Link >
0 commit comments