style: update elements style

更新元素样式
This commit is contained in:
yanglbme 2019-11-08 10:30:32 +08:00
parent b70514a3ad
commit 30cf5b13d9
5 changed files with 9 additions and 7 deletions

View File

@ -29,8 +29,8 @@
width: 35px; width: 35px;
height: 35px; height: 35px;
border: 5px solid rgba(189, 189, 189, 0.25); border: 5px solid rgba(189, 189, 189, 0.25);
border-left-color: rgba(3, 155, 229, 1); border-left-color: rgba(66, 185, 131, 0.9);
border-top-color: rgba(3, 155, 229, 1); border-top-color: rgba(66, 185, 131, 0.9);
border-radius: 50%; border-radius: 50%;
display: inline-block; display: inline-block;
animation: rotate 600ms infinite linear; animation: rotate 600ms infinite linear;

View File

@ -78,7 +78,7 @@ let app = new Vue({
if (this.wxRenderer.hasFootnotes()) { if (this.wxRenderer.hasFootnotes()) {
// 去除第一行的 margin-top // 去除第一行的 margin-top
output = output.replace(/(style=".*?)"/, '$1;margin-top: 0"'); output = output.replace(/(style=".*?)"/, '$1;margin-top: 0"');
// 引用 // 引用
output += this.wxRenderer.buildFootnotes(); output += this.wxRenderer.buildFootnotes();
// 附加的一些 style // 附加的一些 style
output += this.wxRenderer.buildAddition(); output += this.wxRenderer.buildAddition();

View File

@ -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 `<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 () { this.buildAddition = function () {

View File

@ -46,6 +46,7 @@ let default_theme = {
'font-weight': 'bold', 'font-weight': 'bold',
'font-size': '1em', 'font-size': '1em',
'margin': '2em 8px 0.5em', 'margin': '2em 8px 0.5em',
'color': 'rgba(66, 185, 131, 0.9)'
}, },
// 段落样式 // 段落样式
@ -85,8 +86,8 @@ let default_theme = {
image: { image: {
'border-radius': '4px', 'border-radius': '4px',
'display': 'block', 'display': 'block',
'margin': '0.5em auto', 'margin': '0.1em auto 0.5em',
'width': '100% !important' 'width': '100% !important',
}, },
image_org: { image_org: {
'border-radius': '4px', 'border-radius': '4px',
@ -113,7 +114,7 @@ let default_theme = {
listitem: { listitem: {
'text-indent': '-1em', 'text-indent': '-1em',
'display': 'block', 'display': 'block',
'margin': '0.5em 8px' 'margin': '0.2em 8px'
}, },
codespan: { codespan: {
'font-size': '90%', 'font-size': '90%',

View File

@ -5,6 +5,7 @@ function setColorWithTemplate(template) {
custom_theme.block.h1['border-bottom'] = `2px solid ${color}`; custom_theme.block.h1['border-bottom'] = `2px solid ${color}`;
custom_theme.block.h2['background'] = color; custom_theme.block.h2['background'] = color;
custom_theme.block.h3['border-left'] = `3px solid ${color}`; custom_theme.block.h3['border-left'] = `3px solid ${color}`;
custom_theme.block.h4['color'] = color;
custom_theme.inline.strong['color'] = color; custom_theme.inline.strong['color'] = color;
return custom_theme return custom_theme
}; };