From 84b2a52214854a29791f40366609649a5e29b9e1 Mon Sep 17 00:00:00 2001 From: yanglbme Date: Wed, 6 Nov 2019 17:13:48 +0800 Subject: [PATCH] feat: update index style --- assets/scripts/editor.js | 6 +++--- assets/scripts/themes/default-theme.js | 16 ++++++++++++++-- index.html | 10 +++++----- 3 files changed, 22 insertions(+), 10 deletions(-) diff --git a/assets/scripts/editor.js b/assets/scripts/editor.js index 9c25577..7626509 100644 --- a/assets/scripts/editor.js +++ b/assets/scripts/editor.js @@ -27,9 +27,9 @@ let app = new Vue({ { label: '16px', value: '16px', desc: '稍大' }, ], colorOption: [ - { label: '橘红', value: 'rgba(255, 95, 46, 0.9)', author: '#FF5F2E' }, - { label: '淡绿', value: 'rgba(66, 185, 131, 0.9)', author: '#42B983'}, - { label: '暗青', value: 'rgba(0, 139, 139, 0.9)', author: '#008B8B'} + { label: '橘红', value: 'rgba(255, 95, 46, 0.9)', hex: '#FF5F2E' }, + { label: '淡绿', value: 'rgba(66, 185, 131, 0.9)', hex: '#42B983'}, + { label: '暗青', value: 'rgba(0, 139, 139, 0.9)', hex: '#008B8B'} ], aboutDialogVisible: false }; diff --git a/assets/scripts/themes/default-theme.js b/assets/scripts/themes/default-theme.js index 660eb58..9c41d04 100644 --- a/assets/scripts/themes/default-theme.js +++ b/assets/scripts/themes/default-theme.js @@ -8,6 +8,7 @@ let default_theme = { 'margin': '1em 8px' }, block: { + // 一级标题样式 h1: { 'font-size': '1.2em', 'text-align': 'center', @@ -17,6 +18,8 @@ let default_theme = { 'padding': '0 1em', 'border-bottom': '2px solid rgba(255, 95, 46, 0.9)' }, + + // 二级标题样式 h2: { 'font-size': '1.1em', 'text-align': 'center', @@ -27,6 +30,8 @@ let default_theme = { 'background': 'rgba(255, 95, 46, 0.9)', 'color': '#fff' }, + + // 三级标题样式 h3: { 'font-weight': 'bold', 'font-size': '1.1em', @@ -35,15 +40,21 @@ let default_theme = { 'padding-left': '8px', 'border-left': '3px solid rgba(255, 95, 46, 0.9)' }, + + // 四级标题样式 h4: { 'font-weight': 'bold', 'font-size': '1em', 'margin': '2em 8px 0.5em', }, + + // 段落样式 p: { 'margin': '1.5em 8px', 'letter-spacing': '0.1em' }, + + // 引用样式 blockquote: { 'font-style': 'normal', 'border-left': 'none', @@ -118,6 +129,8 @@ let default_theme = { 'color': '#576b95', 'text-decoration': 'none', }, + + // 字体加粗样式 strong: { 'color': 'rgba(255, 95, 46, 0.9)', 'font-weight': 'bold', @@ -144,5 +157,4 @@ let default_theme = { 'font-size': '0.8em' } } -}; - +}; \ No newline at end of file diff --git a/index.html b/index.html index c6d5773..0d98634 100644 --- a/index.html +++ b/index.html @@ -33,14 +33,14 @@ - + - + {{ font.label }} @@ -49,7 +49,7 @@ - + {{ size.label }} {{ size.desc }} @@ -57,10 +57,10 @@ - + {{ color.label }} - {{ color.author }} + {{ color.hex }}