mirror of
https://github.com/doocs/md.git
synced 2024-11-24 19:10:34 +08:00
feat: update index style
This commit is contained in:
parent
ea290176ad
commit
84b2a52214
@ -27,9 +27,9 @@ let app = new Vue({
|
|||||||
{ label: '16px', value: '16px', desc: '稍大' },
|
{ label: '16px', value: '16px', desc: '稍大' },
|
||||||
],
|
],
|
||||||
colorOption: [
|
colorOption: [
|
||||||
{ label: '橘红', value: 'rgba(255, 95, 46, 0.9)', author: '#FF5F2E' },
|
{ label: '橘红', value: 'rgba(255, 95, 46, 0.9)', hex: '#FF5F2E' },
|
||||||
{ label: '淡绿', value: 'rgba(66, 185, 131, 0.9)', author: '#42B983'},
|
{ label: '淡绿', value: 'rgba(66, 185, 131, 0.9)', hex: '#42B983'},
|
||||||
{ label: '暗青', value: 'rgba(0, 139, 139, 0.9)', author: '#008B8B'}
|
{ label: '暗青', value: 'rgba(0, 139, 139, 0.9)', hex: '#008B8B'}
|
||||||
],
|
],
|
||||||
aboutDialogVisible: false
|
aboutDialogVisible: false
|
||||||
};
|
};
|
||||||
|
@ -8,6 +8,7 @@ let default_theme = {
|
|||||||
'margin': '1em 8px'
|
'margin': '1em 8px'
|
||||||
},
|
},
|
||||||
block: {
|
block: {
|
||||||
|
// 一级标题样式
|
||||||
h1: {
|
h1: {
|
||||||
'font-size': '1.2em',
|
'font-size': '1.2em',
|
||||||
'text-align': 'center',
|
'text-align': 'center',
|
||||||
@ -17,6 +18,8 @@ let default_theme = {
|
|||||||
'padding': '0 1em',
|
'padding': '0 1em',
|
||||||
'border-bottom': '2px solid rgba(255, 95, 46, 0.9)'
|
'border-bottom': '2px solid rgba(255, 95, 46, 0.9)'
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// 二级标题样式
|
||||||
h2: {
|
h2: {
|
||||||
'font-size': '1.1em',
|
'font-size': '1.1em',
|
||||||
'text-align': 'center',
|
'text-align': 'center',
|
||||||
@ -27,6 +30,8 @@ let default_theme = {
|
|||||||
'background': 'rgba(255, 95, 46, 0.9)',
|
'background': 'rgba(255, 95, 46, 0.9)',
|
||||||
'color': '#fff'
|
'color': '#fff'
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// 三级标题样式
|
||||||
h3: {
|
h3: {
|
||||||
'font-weight': 'bold',
|
'font-weight': 'bold',
|
||||||
'font-size': '1.1em',
|
'font-size': '1.1em',
|
||||||
@ -35,15 +40,21 @@ let default_theme = {
|
|||||||
'padding-left': '8px',
|
'padding-left': '8px',
|
||||||
'border-left': '3px solid rgba(255, 95, 46, 0.9)'
|
'border-left': '3px solid rgba(255, 95, 46, 0.9)'
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// 四级标题样式
|
||||||
h4: {
|
h4: {
|
||||||
'font-weight': 'bold',
|
'font-weight': 'bold',
|
||||||
'font-size': '1em',
|
'font-size': '1em',
|
||||||
'margin': '2em 8px 0.5em',
|
'margin': '2em 8px 0.5em',
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// 段落样式
|
||||||
p: {
|
p: {
|
||||||
'margin': '1.5em 8px',
|
'margin': '1.5em 8px',
|
||||||
'letter-spacing': '0.1em'
|
'letter-spacing': '0.1em'
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// 引用样式
|
||||||
blockquote: {
|
blockquote: {
|
||||||
'font-style': 'normal',
|
'font-style': 'normal',
|
||||||
'border-left': 'none',
|
'border-left': 'none',
|
||||||
@ -118,6 +129,8 @@ let default_theme = {
|
|||||||
'color': '#576b95',
|
'color': '#576b95',
|
||||||
'text-decoration': 'none',
|
'text-decoration': 'none',
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// 字体加粗样式
|
||||||
strong: {
|
strong: {
|
||||||
'color': 'rgba(255, 95, 46, 0.9)',
|
'color': 'rgba(255, 95, 46, 0.9)',
|
||||||
'font-weight': 'bold',
|
'font-weight': 'bold',
|
||||||
@ -145,4 +158,3 @@ let default_theme = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
10
index.html
10
index.html
@ -33,14 +33,14 @@
|
|||||||
<el-header class="top">
|
<el-header class="top">
|
||||||
<el-form size="mini" class="ctrl" :inline=true>
|
<el-form size="mini" class="ctrl" :inline=true>
|
||||||
<el-form-item label="编辑器主题">
|
<el-form-item label="编辑器主题">
|
||||||
<el-select v-model="currentEditorTheme" size="mini" placeholder="选择字体" @change="editorThemeChanged">
|
<el-select v-model="currentEditorTheme" size="mini" placeholder="选择编辑器主题" clearable @change="editorThemeChanged">
|
||||||
<el-option v-for="editorTheme in editorThemes" :key="editorTheme.value" :label="editorTheme.label"
|
<el-option v-for="editorTheme in editorThemes" :key="editorTheme.value" :label="editorTheme.label"
|
||||||
:value="editorTheme.value">
|
:value="editorTheme.value">
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="字体">
|
<el-form-item label="字体">
|
||||||
<el-select v-model="currentFont" size="mini" placeholder="选择字体" @change="fontChanged">
|
<el-select v-model="currentFont" size="mini" placeholder="选择字体" clearable @change="fontChanged">
|
||||||
<el-option v-for="font in builtinFonts" :style="{fontFamily: font.value}" :key="font.value"
|
<el-option v-for="font in builtinFonts" :style="{fontFamily: font.value}" :key="font.value"
|
||||||
:label="font.label" :value="font.value">
|
:label="font.label" :value="font.value">
|
||||||
<span class="select-item-left">{{ font.label }}</span>
|
<span class="select-item-left">{{ font.label }}</span>
|
||||||
@ -49,7 +49,7 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="字号">
|
<el-form-item label="字号">
|
||||||
<el-select v-model="currentSize" size="mini" placeholder="选择段落字体大小" @change="sizeChanged">
|
<el-select v-model="currentSize" size="mini" placeholder="选择段落字号" clearable @change="sizeChanged">
|
||||||
<el-option v-for="size in sizeOption" :key="size.value" :label="size.label" :value="size.value">
|
<el-option v-for="size in sizeOption" :key="size.value" :label="size.label" :value="size.value">
|
||||||
<span class="select-item-left">{{ size.label }}</span>
|
<span class="select-item-left">{{ size.label }}</span>
|
||||||
<span class="select-item-right">{{ size.desc }}</span>
|
<span class="select-item-right">{{ size.desc }}</span>
|
||||||
@ -57,10 +57,10 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="颜色">
|
<el-form-item label="颜色">
|
||||||
<el-select v-model="currentColor" size="mini" placeholder="选择颜色" @change="colorChanged">
|
<el-select v-model="currentColor" size="mini" placeholder="选择颜色" clearable @change="colorChanged">
|
||||||
<el-option v-for="color in colorOption" :key="color.value" :label="color.label" :value="color.value">
|
<el-option v-for="color in colorOption" :key="color.value" :label="color.label" :value="color.value">
|
||||||
<span class="select-item-left">{{ color.label }}</span>
|
<span class="select-item-left">{{ color.label }}</span>
|
||||||
<span class="select-item-right">{{ color.author }}</span>
|
<span class="select-item-right">{{ color.hex }}</span>
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
Loading…
Reference in New Issue
Block a user