mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-14 07:26:52 +00:00
Merge pull request #1251 from tangly1024/fix/code-bar-style
fix/mac_code_style
This commit is contained in:
@@ -97,7 +97,7 @@ const BLOG = {
|
||||
PRISM_JS_PATH: 'https://npm.elemecdn.com/prismjs@1.29.0/components/',
|
||||
PRISM_THEME_PATH:
|
||||
'https://npm.elemecdn.com/prism-themes/themes/prism-a11y-dark.min.css', // 代码样式主题 更多参考 https://github.com/PrismJS/prism-themes
|
||||
CODE_MAC_BAR: true, // 代码左上角显示mac的红黄绿图标
|
||||
CODE_MAC_BAR: process.env.NEXT_PUBLIC_CODE_MAC_BAR || true, // 代码左上角显示mac的红黄绿图标
|
||||
CODE_LINE_NUMBERS: process.env.NEXT_PUBLIC_CODE_LINE_NUMBERS || 'false', // 是否显示行号
|
||||
|
||||
// Mermaid 图表CDN
|
||||
|
||||
@@ -21,7 +21,7 @@ import { useRouter } from 'next/navigation'
|
||||
const PrismMac = () => {
|
||||
const router = useRouter()
|
||||
useEffect(() => {
|
||||
if (BLOG.CODE_MAC_BAR) {
|
||||
if (JSON.parse(BLOG.CODE_MAC_BAR)) {
|
||||
loadExternalResource('/css/prism-mac-style.css', 'css')
|
||||
}
|
||||
loadExternalResource(BLOG.PRISM_THEME_PATH, 'css')
|
||||
|
||||
@@ -768,7 +768,7 @@ code[class*='language-'] {
|
||||
overflow: auto;
|
||||
font-family: SFMono-Regular, Consolas, 'Liberation Mono', Menlo, Courier,
|
||||
monospace;
|
||||
@apply w-full mb-4 dark:bg-black;
|
||||
@apply w-full mb-0 dark:bg-black !important;
|
||||
}
|
||||
|
||||
.notion-column {
|
||||
@@ -2016,7 +2016,7 @@ code.language-mermaid {
|
||||
}
|
||||
|
||||
.code-toolbar{
|
||||
@apply w-full shadow-md;
|
||||
@apply w-full shadow-md pb-0;
|
||||
}
|
||||
|
||||
.mermaid > svg {
|
||||
|
||||
Reference in New Issue
Block a user