Fix mardown viewer text color

This commit is contained in:
Richard Roberson 2025-04-15 11:41:26 -06:00
parent 8cd6158bc4
commit 741ffe56d0
4 changed files with 26 additions and 5 deletions

4
package-lock.json generated
View file

@ -1,12 +1,12 @@
{
"name": "openreader-webui",
"version": "0.2.6",
"version": "0.3.0-patch.1",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "openreader-webui",
"version": "0.2.6",
"version": "0.3.0-patch.1",
"dependencies": {
"@headlessui/react": "^2.2.0",
"@types/howler": "^2.2.12",

View file

@ -1,6 +1,6 @@
{
"name": "openreader-webui",
"version": "0.3.0",
"version": "0.3.0-patch.1",
"private": true,
"scripts": {
"dev": "next dev --turbopack -p 3003",

View file

@ -28,7 +28,7 @@ export function HTMLViewer({ className = '' }: HTMLViewerProps) {
<TTSPlayer />
</div>
<div className="flex-1 overflow-auto">
<div className={`px-4 ${isTxtFile ? 'whitespace-pre-wrap font-mono text-sm' : 'prose dark:prose-invert'}`}>
<div className={`px-4 ${isTxtFile ? 'whitespace-pre-wrap font-mono text-sm' : 'prose prose-base'}`}>
{isTxtFile ? (
currDocData
) : (

View file

@ -1,5 +1,4 @@
import type { Config } from "tailwindcss";
//@plugin "@tailwindcss/typography";
import typography from "@tailwindcss/typography";
export default {
@ -44,6 +43,28 @@ export default {
'100%': { transform: 'scale(0.95)', opacity: '0' },
},
},
typography: {
DEFAULT: {
css: {
'--tw-prose-body': 'var(--foreground)',
'--tw-prose-headings': 'var(--foreground)',
'--tw-prose-lead': 'var(--muted)',
'--tw-prose-links': 'var(--accent)',
'--tw-prose-bold': 'var(--foreground)',
'--tw-prose-counters': 'var(--muted)',
'--tw-prose-bullets': 'var(--muted)',
'--tw-prose-hr': 'var(--offbase)',
'--tw-prose-quotes': 'var(--foreground)',
'--tw-prose-quote-borders': 'var(--offbase)',
'--tw-prose-captions': 'var(--muted)',
'--tw-prose-code': 'var(--foreground)',
'--tw-prose-pre-code': 'var(--foreground)',
'--tw-prose-pre-bg': 'var(--base)',
'--tw-prose-th-borders': 'var(--offbase)',
'--tw-prose-td-borders': 'var(--offbase)',
},
},
},
},
},
plugins: [typography],