mirror of
https://github.com/doocs/md.git
synced 2025-02-02 19:27:46 +08:00
Compare commits
1 Commits
71dd0d8118
...
f8a68bd83e
Author | SHA1 | Date | |
---|---|---|---|
|
f8a68bd83e |
@ -6,9 +6,6 @@
|
|||||||
* 召集令:如果你有好看的主题样式,欢迎分享,让更多人能够使用到你的主题。
|
* 召集令:如果你有好看的主题样式,欢迎分享,让更多人能够使用到你的主题。
|
||||||
* 提交区:https://github.com/doocs/md/discussions/426
|
* 提交区:https://github.com/doocs/md/discussions/426
|
||||||
*/
|
*/
|
||||||
/* 顶层容器样式 */
|
|
||||||
container {
|
|
||||||
}
|
|
||||||
/* 一级标题样式 */
|
/* 一级标题样式 */
|
||||||
h1 {
|
h1 {
|
||||||
}
|
}
|
||||||
|
@ -9,7 +9,6 @@ const defaultTheme: Theme = {
|
|||||||
'line-height': `1.75`,
|
'line-height': `1.75`,
|
||||||
},
|
},
|
||||||
block: {
|
block: {
|
||||||
container: {},
|
|
||||||
// 一级标题
|
// 一级标题
|
||||||
h1: {
|
h1: {
|
||||||
'display': `table`,
|
'display': `table`,
|
||||||
@ -289,7 +288,6 @@ const graceTheme = toMerged(defaultTheme, {
|
|||||||
base: {
|
base: {
|
||||||
},
|
},
|
||||||
block: {
|
block: {
|
||||||
'container': {},
|
|
||||||
'h1': {
|
'h1': {
|
||||||
'padding': `0.5em 1em`,
|
'padding': `0.5em 1em`,
|
||||||
'border-bottom': `2px solid var(--md-primary-color)`,
|
'border-bottom': `2px solid var(--md-primary-color)`,
|
||||||
|
@ -213,7 +213,7 @@ export const useStore = defineStore(`store`, () => {
|
|||||||
</style>
|
</style>
|
||||||
`
|
`
|
||||||
|
|
||||||
output.value = renderer.createContainer(outputTemp)
|
output.value = outputTemp
|
||||||
}
|
}
|
||||||
|
|
||||||
// 更新 CSS
|
// 更新 CSS
|
||||||
|
@ -3,7 +3,7 @@ import type { PropertiesHyphen } from 'csstype'
|
|||||||
import type { Token } from 'marked'
|
import type { Token } from 'marked'
|
||||||
|
|
||||||
type GFMBlock = `blockquote_note` | `blockquote_tip` | `blockquote_important` | `blockquote_warning` | `blockquote_caution` | `blockquote_title` | `blockquote_title_note` | `blockquote_title_tip` | `blockquote_title_important` | `blockquote_title_warning` | `blockquote_title_caution` | `blockquote_p` | `blockquote_p_note` | `blockquote_p_tip` | `blockquote_p_important` | `blockquote_p_warning` | `blockquote_p_caution`
|
type GFMBlock = `blockquote_note` | `blockquote_tip` | `blockquote_important` | `blockquote_warning` | `blockquote_caution` | `blockquote_title` | `blockquote_title_note` | `blockquote_title_tip` | `blockquote_title_important` | `blockquote_title_warning` | `blockquote_title_caution` | `blockquote_p` | `blockquote_p_note` | `blockquote_p_tip` | `blockquote_p_important` | `blockquote_p_warning` | `blockquote_p_caution`
|
||||||
export type Block = `container` | `h1` | `h2` | `h3` | `h4` | `h5` | `h6` | `p` | `blockquote` | `blockquote_p` | `code_pre` | `code` | `image` | `ol` | `ul` | `footnotes` | `figure` | `hr` | GFMBlock
|
export type Block = `h1` | `h2` | `h3` | `h4` | `h5` | `h6` | `p` | `blockquote` | `blockquote_p` | `code_pre` | `code` | `image` | `ol` | `ul` | `footnotes` | `figure` | `hr` | GFMBlock
|
||||||
export type Inline = `listitem` | `codespan` | `link` | `wx_link` | `strong` | `table` | `thead` | `td` | `footnote` | `figcaption` | `em`
|
export type Inline = `listitem` | `codespan` | `link` | `wx_link` | `strong` | `table` | `thead` | `td` | `footnote` | `figcaption` | `em`
|
||||||
|
|
||||||
interface CustomCSSProperties {
|
interface CustomCSSProperties {
|
||||||
|
@ -43,7 +43,6 @@ export function customCssWithTemplate(jsonString: Partial<Record<Block | Inline,
|
|||||||
}
|
}
|
||||||
|
|
||||||
const blockKeys: Block[] = [
|
const blockKeys: Block[] = [
|
||||||
`container`,
|
|
||||||
`h1`,
|
`h1`,
|
||||||
`h2`,
|
`h2`,
|
||||||
`h3`,
|
`h3`,
|
||||||
|
@ -274,8 +274,5 @@ export function initRenderer(opts: IOpts) {
|
|||||||
buildFootnotes,
|
buildFootnotes,
|
||||||
setOptions,
|
setOptions,
|
||||||
reset,
|
reset,
|
||||||
createContainer(content: string) {
|
|
||||||
return styledContent(`container`, content, `section`)
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -54,13 +54,5 @@ export default defineConfig({
|
|||||||
css: {
|
css: {
|
||||||
devSourcemap: true,
|
devSourcemap: true,
|
||||||
},
|
},
|
||||||
build: {
|
},
|
||||||
rollupOptions: {
|
)
|
||||||
output: {
|
|
||||||
chunkFileNames: `static/js/md-[name]-[hash].js`,
|
|
||||||
entryFileNames: `static/js/md-[name]-[hash].js`,
|
|
||||||
assetFileNames: `static/[ext]/md-[name]-[hash].[ext]`,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
Loading…
Reference in New Issue
Block a user