Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
canifa_note
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Vũ Hoàng Anh
canifa_note
Commits
72babbb3
Commit
72babbb3
authored
May 20, 2025
by
Steven
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: dark mode of highlight.js
parent
f9c0621c
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
5 additions
and
9 deletions
+5
-9
App.tsx
web/src/App.tsx
+1
-5
CodeBlock.tsx
web/src/components/MemoContent/CodeBlock.tsx
+0
-2
index.tsx
web/src/components/MemoEditor/index.tsx
+1
-2
tailwind.css
web/src/css/tailwind.css
+3
-0
No files found.
web/src/App.tsx
View file @
72babbb3
...
...
@@ -30,11 +30,7 @@ const App = observer(() => {
};
try
{
if
(
darkMediaQuery
.
addEventListener
)
{
darkMediaQuery
.
addEventListener
(
"change"
,
handleColorSchemeChange
);
}
else
{
darkMediaQuery
.
addListener
(
handleColorSchemeChange
);
}
darkMediaQuery
.
addEventListener
(
"change"
,
handleColorSchemeChange
);
}
catch
(
error
)
{
console
.
error
(
"failed to initial color scheme listener"
,
error
);
}
...
...
web/src/components/MemoContent/CodeBlock.tsx
View file @
72babbb3
...
...
@@ -6,8 +6,6 @@ import toast from "react-hot-toast";
import
{
cn
}
from
"@/utils"
;
import
MermaidBlock
from
"./MermaidBlock"
;
import
{
BaseProps
}
from
"./types"
;
import
"highlight.js/styles/atom-one-dark.css"
;
import
"highlight.js/styles/github.css"
;
// Special languages that are rendered differently.
enum
SpecialLanguage
{
...
...
web/src/components/MemoEditor/index.tsx
View file @
72babbb3
...
...
@@ -522,9 +522,8 @@ const MemoEditor = observer((props: Props) => {
<
div
className=
"w-full flex flex-row justify-between items-center py-3 gap-2 overflow-auto dark:border-t-zinc-500"
>
<
div
className=
"relative flex flex-row justify-start items-center"
onFocus=
{
(
e
)
=>
e
.
stopPropagation
()
}
>
<
Select
className=
"!text-sm"
variant=
"plain"
size=
"
md
"
size=
"
sm
"
value=
{
state
.
memoVisibility
}
startDecorator=
{
<
VisibilityIcon
visibility=
{
state
.
memoVisibility
}
/>
}
onChange=
{
(
_
,
visibility
)
=>
{
...
...
web/src/css/tailwind.css
View file @
72babbb3
@import
url("highlight.js/styles/github.css")
(
prefers-color-scheme
:
light
);
@import
url("highlight.js/styles/github-dark.css")
(
prefers-color-scheme
:
dark
);
@tailwind
base
;
@tailwind
components
;
@tailwind
utilities
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment