mirror of
https://github.com/doocs/md.git
synced 2024-11-24 19:10:34 +08:00
style: update elements style
更新元素样式
This commit is contained in:
parent
b70514a3ad
commit
30cf5b13d9
@ -29,8 +29,8 @@
|
||||
width: 35px;
|
||||
height: 35px;
|
||||
border: 5px solid rgba(189, 189, 189, 0.25);
|
||||
border-left-color: rgba(3, 155, 229, 1);
|
||||
border-top-color: rgba(3, 155, 229, 1);
|
||||
border-left-color: rgba(66, 185, 131, 0.9);
|
||||
border-top-color: rgba(66, 185, 131, 0.9);
|
||||
border-radius: 50%;
|
||||
display: inline-block;
|
||||
animation: rotate 600ms infinite linear;
|
||||
|
@ -78,7 +78,7 @@ let app = new Vue({
|
||||
if (this.wxRenderer.hasFootnotes()) {
|
||||
// 去除第一行的 margin-top
|
||||
output = output.replace(/(style=".*?)"/, '$1;margin-top: 0"');
|
||||
// 引用注脚
|
||||
// 引用脚注
|
||||
output += this.wxRenderer.buildFootnotes();
|
||||
// 附加的一些 style
|
||||
output += this.wxRenderer.buildAddition();
|
||||
|
@ -65,7 +65,7 @@ let WxRenderer = function (opts) {
|
||||
}
|
||||
return `<code style="font-size: 90%; opacity: 0.6;">[${x[0]}]</code> ${x[1]}: <i>${x[2]}</i><br/>`
|
||||
});
|
||||
return `<h3 ${getStyles('h3')}>引用链接</h3><p ${getStyles('footnotes')}>${footnoteArray.join('\n')}</p>`
|
||||
return `<h4 ${getStyles('h4')}>引用链接</h4><p ${getStyles('footnotes')}>${footnoteArray.join('\n')}</p>`
|
||||
};
|
||||
|
||||
this.buildAddition = function () {
|
||||
|
@ -46,6 +46,7 @@ let default_theme = {
|
||||
'font-weight': 'bold',
|
||||
'font-size': '1em',
|
||||
'margin': '2em 8px 0.5em',
|
||||
'color': 'rgba(66, 185, 131, 0.9)'
|
||||
},
|
||||
|
||||
// 段落样式
|
||||
@ -85,8 +86,8 @@ let default_theme = {
|
||||
image: {
|
||||
'border-radius': '4px',
|
||||
'display': 'block',
|
||||
'margin': '0.5em auto',
|
||||
'width': '100% !important'
|
||||
'margin': '0.1em auto 0.5em',
|
||||
'width': '100% !important',
|
||||
},
|
||||
image_org: {
|
||||
'border-radius': '4px',
|
||||
@ -113,7 +114,7 @@ let default_theme = {
|
||||
listitem: {
|
||||
'text-indent': '-1em',
|
||||
'display': 'block',
|
||||
'margin': '0.5em 8px'
|
||||
'margin': '0.2em 8px'
|
||||
},
|
||||
codespan: {
|
||||
'font-size': '90%',
|
||||
|
@ -5,6 +5,7 @@ function setColorWithTemplate(template) {
|
||||
custom_theme.block.h1['border-bottom'] = `2px solid ${color}`;
|
||||
custom_theme.block.h2['background'] = color;
|
||||
custom_theme.block.h3['border-left'] = `3px solid ${color}`;
|
||||
custom_theme.block.h4['color'] = color;
|
||||
custom_theme.inline.strong['color'] = color;
|
||||
return custom_theme
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user