File tree Expand file tree Collapse file tree 1 file changed +16
-6
lines changed
Expand file tree Collapse file tree 1 file changed +16
-6
lines changed Original file line number Diff line number Diff line change @@ -314,12 +314,22 @@ const DokumentBlogPostPage = () => {
314314 remarkPlugins = { [ remarkGfm , remarkMath ] }
315315 rehypePlugins = { [ rehypeRaw , rehypeKatex ] }
316316 components = { {
317- a : ( p ) => (
318- < MarkdownLink
319- { ...p }
320- className = "font-bold underline decoration-emerald-600/30 hover:decoration-emerald-600"
321- />
322- ) ,
317+ a : ( p ) => {
318+ const isVocab =
319+ p . href &&
320+ ( p . href . startsWith ( '/vocab/' ) ||
321+ p . href . includes ( '/#/vocab/' ) ) ;
322+ return (
323+ < MarkdownLink
324+ { ...p }
325+ className = {
326+ isVocab
327+ ? 'font-bold text-black bg-emerald-300 px-1 hover:bg-emerald-700 hover:text-white transition-all cursor-help no-underline'
328+ : 'font-bold underline decoration-emerald-600/30 hover:decoration-emerald-600 text-emerald-800'
329+ }
330+ />
331+ ) ;
332+ } ,
323333 pre : ( { children } ) => < > { children } </ > ,
324334 code : CodeBlock ,
325335 } }
You can’t perform that action at this time.
0 commit comments