Skip to content

Commit

Permalink
fix: manual toggle theme
Browse files Browse the repository at this point in the history
  • Loading branch information
mistersupri committed Jan 7, 2025
1 parent b4d34e5 commit 4a67842
Show file tree
Hide file tree
Showing 4 changed files with 1,193 additions and 4 deletions.
4 changes: 2 additions & 2 deletions packages/app-client/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
<link rel="manifest" href="/site.webmanifest">

<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/github-markdown-css/5.8.1/github-markdown.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.11.1/styles/github.min.css">
<link rel="stylesheet" href="/github-markdown.css">
<link rel="stylesheet" href="/github-highlight.css">

<!-- Structured Data (JSON-LD for rich snippets) -->
<script type="application/ld+json">
Expand Down
121 changes: 121 additions & 0 deletions packages/app-client/public/github-highlight.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
.markdown-body[data-theme="light"] {
color-scheme: light;
--color-text: #24292e;
--color-text-keyword: #d73a49;
--color-text-title: #6f42c1;
--color-text-attribute: #005cc5;
--color-text-string: #032f62;
--color-text-symbol: #e36209;
--color-text-code: #6a737d;
--color-text-quote: #22863a;
--color-text-section: #005cc5;
--color-text-bullet: #735c0f;
--color-text-addition: #22863a;
--bg-color-text-addition: #f0fff4;
--color-text-deletion: #b31d28;
--bg-color-text-deletion: #ffeef0;
}

.markdown-body[data-theme="dark"] {
color-scheme: light;
--color-text: #c9d1d9;
--color-text-keyword: #ff7b72;
--color-text-title: #d2a8ff;
--color-text-attribute: #79c0ff;
--color-text-string: #a5d6ff;
--color-text-symbol: #ffa657;
--color-text-code: #8b949e;
--color-text-quote: #7ee787;
--color-text-section: #1f6feb;
--color-text-bullet: #f2cc60;
--color-text-addition: #aff5b4;
--bg-color-text-addition: #033a16;
--color-text-deletion: #ffdcd7;
--bg-color-text-deletion: #67060c;
}

pre code.hljs {
display: block;
overflow-x: auto;
padding: 1em;
}
code.hljs {
padding: 3px 5px;
}
.hljs {
color: var(--color-text);
background: #fff;
}
.hljs-doctag,
.hljs-keyword,
.hljs-meta .hljs-keyword,
.hljs-template-tag,
.hljs-template-variable,
.hljs-type,
.hljs-variable.language_ {
color: var(--color-text-keyword);
}
.hljs-title,
.hljs-title.class_,
.hljs-title.class_.inherited__,
.hljs-title.function_ {
color: var(--color-text-title);
}
.hljs-attr,
.hljs-attribute,
.hljs-literal,
.hljs-meta,
.hljs-number,
.hljs-operator,
.hljs-selector-attr,
.hljs-selector-class,
.hljs-selector-id,
.hljs-variable {
color: var(--color-text-attribute);
}
.hljs-meta .hljs-string,
.hljs-regexp,
.hljs-string {
color: var(--color-text-string);
}
.hljs-built_in,
.hljs-symbol {
color: var(--color-text-symbol);
}
.hljs-code,
.hljs-comment,
.hljs-formula {
color: var(--color-text-code);
}
.hljs-name,
.hljs-quote,
.hljs-selector-pseudo,
.hljs-selector-tag {
color: var(--color-text-quote);
}
.hljs-subst {
color: var(--color-text);
}
.hljs-section {
color: var(--color-text-section);
font-weight: 700;
}
.hljs-bullet {
color: var(--color-text-bullet);
}
.hljs-emphasis {
color: var(--color-text);
font-style: italic;
}
.hljs-strong {
color: var(--color-text);
font-weight: 700;
}
.hljs-addition {
color: var(--color-text-addition);
background-color: var(--bg-color-text-addition);
}
.hljs-deletion {
color: var(--color-text-deletion);
background-color: var(--bg-color-text-deletion);
}
Loading

0 comments on commit 4a67842

Please sign in to comment.