mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-06-06 07:26:45 +00:00
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_JS_PATH: 'https://npm.elemecdn.com/prismjs@1.29.0/components/',
|
||||||
PRISM_THEME_PATH:
|
PRISM_THEME_PATH:
|
||||||
'https://npm.elemecdn.com/prism-themes/themes/prism-a11y-dark.min.css', // 代码样式主题 更多参考 https://github.com/PrismJS/prism-themes
|
'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', // 是否显示行号
|
CODE_LINE_NUMBERS: process.env.NEXT_PUBLIC_CODE_LINE_NUMBERS || 'false', // 是否显示行号
|
||||||
|
|
||||||
// Mermaid 图表CDN
|
// Mermaid 图表CDN
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ import { useRouter } from 'next/navigation'
|
|||||||
const PrismMac = () => {
|
const PrismMac = () => {
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (BLOG.CODE_MAC_BAR) {
|
if (JSON.parse(BLOG.CODE_MAC_BAR)) {
|
||||||
loadExternalResource('/css/prism-mac-style.css', 'css')
|
loadExternalResource('/css/prism-mac-style.css', 'css')
|
||||||
}
|
}
|
||||||
loadExternalResource(BLOG.PRISM_THEME_PATH, 'css')
|
loadExternalResource(BLOG.PRISM_THEME_PATH, 'css')
|
||||||
|
|||||||
@@ -768,7 +768,7 @@ code[class*='language-'] {
|
|||||||
overflow: auto;
|
overflow: auto;
|
||||||
font-family: SFMono-Regular, Consolas, 'Liberation Mono', Menlo, Courier,
|
font-family: SFMono-Regular, Consolas, 'Liberation Mono', Menlo, Courier,
|
||||||
monospace;
|
monospace;
|
||||||
@apply w-full mb-4 dark:bg-black;
|
@apply w-full mb-0 dark:bg-black !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.notion-column {
|
.notion-column {
|
||||||
@@ -2016,7 +2016,7 @@ code.language-mermaid {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.code-toolbar{
|
.code-toolbar{
|
||||||
@apply w-full shadow-md;
|
@apply w-full shadow-md pb-0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.mermaid > svg {
|
.mermaid > svg {
|
||||||
|
|||||||
Reference in New Issue
Block a user