feat: markdown style

This commit is contained in:
tim
2025-07-21 23:07:03 +08:00
parent 846b265b9a
commit 929b9baa0c
4 changed files with 8 additions and 5 deletions

View File

@@ -112,13 +112,14 @@ body {
padding: 2px 6px;
border: none;
border-radius: 4px;
background-color: var(--primary-color);
color: #fff;
background-color: white;
opacity: 0.8;
color: black;
cursor: pointer;
}
.copy-code-btn:hover {
background-color: var(--primary-color-hover);
opacity: 1;
}
.info-content-text code {
@@ -126,6 +127,8 @@ body {
font-size: 13px;
border-radius: 4px;
white-space: pre-wrap;
background-color: var(--normal-background-color);
color: var(--text-color);
}
.info-content-text a {

View File

@@ -93,7 +93,6 @@ export default {
onMounted(() => {
vditorInstance.value = new Vditor(props.editorId, {
placeholder: '请输入正文...',
height: 450,
theme: getEditorTheme(),
preview: {
theme: { current: getPreviewTheme() },

View File

@@ -14,7 +14,7 @@ const md = new MarkdownIt({
} else {
code = hljs.highlightAuto(str).value
}
return `<pre class="code-block"><button class="copy-code-btn">复制</button><code class="hljs language-${lang || ''}">${code}</code></pre>`
return `<pre class="code-block"><button class="copy-code-btn">Copy</button><code class="hljs language-${lang || ''}">${code}</code></pre>`
}
})

View File

@@ -359,6 +359,7 @@ export default {
align-items: center;
flex-wrap: wrap;
margin-top: 20px;
padding-bottom: 50px;
}
@media (max-width: 768px) {