Skip to content

Commit

Permalink
fix: update code style
Browse files Browse the repository at this point in the history
* 统一代码风格
* 修复超链接问题
* 新增待办列表
  • Loading branch information
yanglbme committed Jun 25, 2020
1 parent 1f07dd3 commit cecd7dd
Show file tree
Hide file tree
Showing 17 changed files with 1,028 additions and 987 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ Markdown 文档自动即时渲染为微信图文,让你不再为微信文章
- [x] 支持自定义 CSS 样式并实时渲染
- [x] 支持一键恢复至默认内容及样式
- [x] 支持打开或关闭引用链接的选项
- [ ] 新建右键点击菜单栏
- [ ] 插入表格功能优化


![select-and-change-color-theme](https://imgkr.cn-bj.ufileos.com/32c05c23-6309-491f-bd0d-f22a62c944b4.gif)

Expand Down
251 changes: 131 additions & 120 deletions public/assets/css/app.css
Original file line number Diff line number Diff line change
@@ -1,234 +1,245 @@
* {
box-sizing: border-box;
margin: 0;
padding: 0;
box-sizing: border-box;
margin: 0;
padding: 0;
}

input, button, textarea {
font-family: inherit;
input,
button,
textarea {
font-family: inherit;
}

h1, h2, h3, h4, h5, h6 {
font-weight: normal;
h1,
h2,
h3,
h4,
h5,
h6 {
font-weight: normal;
}

em {
font-style: normal !important;
font-style: normal !important;
}

html, body {
height: 100%;
font-family: 'PingFang SC', BlinkMacSystemFont, Roboto, 'Helvetica Neue', sans-serif;
html,
body {
height: 100%;
font-family: 'PingFang SC', BlinkMacSystemFont, Roboto, 'Helvetica Neue', sans-serif;
}

.el-message__icon {
display: none
display: none
}

.container {
height: 100%;
display: flex;
flex-direction: column;
height: 100%;
display: flex;
flex-direction: column;
}

.top {
height: 60px;
padding: 10px 20px;
display: flex;
align-items: center;
margin-right: 20px;
height: 60px;
padding: 10px 20px;
display: flex;
align-items: center;
margin-right: 20px;
}

.web-title {
margin: 0 15px 0 5px;
margin: 0 15px 0 5px;
}

.web-icon {
width: auto;
height: 1.5rem;
vertical-align: middle;
width: auto;
height: 1.5rem;
vertical-align: middle;
}

#editor {
height: 100%;
display: block;
border: none;
width: 100%;
padding: 10px;
height: 100%;
display: block;
border: none;
width: 100%;
padding: 10px;
}

section {
height: 100%;
height: 100%;
}

.main-body {
display: flex;
flex-direction: column;
padding-top: 0;
padding-bottom: 10px;
display: flex;
flex-direction: column;
padding-top: 0;
padding-bottom: 10px;
}

.ctrl {
flex-basis: 60px;
flex-grow: 1;
flex-shrink: 1;
display: flex;
align-items: center;
flex-basis: 60px;
flex-grow: 1;
flex-shrink: 1;
display: flex;
align-items: center;
}

.preview-wrapper {
box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1);
padding: 0;
align-items: center;
justify-content: center;
display: flex;
overflow: scroll;
word-break: break-all;
box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1);
padding: 0;
align-items: center;
justify-content: center;
display: flex;
overflow: scroll;
word-break: break-all;
}

.main-section {
display: flex;
height: 100%;
display: flex;
height: 100%;
}

.hint {
opacity: 0.6;
margin: 20px 0;
opacity: 0.6;
margin: 20px 0;
}

.preview {
margin: 0 -20px;
width: 375px;
padding: 20px;
font-size: 14px;
box-sizing: border-box;
outline: none;
box-shadow: 0 0 60px rgba(0, 0, 0, 0.1);
margin: 0 -20px;
width: 375px;
padding: 20px;
font-size: 14px;
box-sizing: border-box;
outline: none;
box-shadow: 0 0 60px rgba(0, 0, 0, 0.1);
}

.preview table {
margin-bottom: 10px;
border-collapse: collapse;
display: table;
width: 100% !important;
margin-bottom: 10px;
border-collapse: collapse;
display: table;
width: 100% !important;
}

/*
.preview table tr:nth-child(even){
background: rgb(250, 250, 250);
}
*/
.select-item-left {
float: left;
float: left;
}

.select-item-right {
float: right;
color: #8492a6;
font-size: 13px;
float: right;
color: #8492a6;
font-size: 13px;
}

.CodeMirror {
height: 100% !important;
box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1);
font-size: 14px;
padding: 20px;
width: 100% !important;
font-family: 'PingFang SC', BlinkMacSystemFont, Roboto, 'Helvetica Neue', sans-serif !important;
height: 100% !important;
box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1);
font-size: 14px;
padding: 20px;
width: 100% !important;
font-family: 'PingFang SC', BlinkMacSystemFont, Roboto, 'Helvetica Neue', sans-serif !important;
}

/* ele ui */
.el-form-item {
margin-bottom: 0 !important;
margin-bottom: 0 !important;
}

.el-tooltip {
cursor: pointer;
cursor: pointer;
}

/*wechat code block*/
.rich_media_content .code-snippet *, .rich_media_content .code-snippet__fix * {
max-width: 1000% !important;
.rich_media_content .code-snippet *,
.rich_media_content .code-snippet__fix * {
max-width: 1000% !important;
}

.code-snippet__fix {
word-wrap: break-word !important;
font-size: 14px;
margin: 10px 8px;
color: #333;
position: relative;
background-color: rgb(238,238,238);
border: 1px solid #f0f0f0;
border-radius: 2px;
display: flex;
line-height: 24px;
word-wrap: break-word !important;
font-size: 14px;
margin: 10px 8px;
color: #333;
position: relative;
background-color: rgb(238, 238, 238);
border: 1px solid #f0f0f0;
border-radius: 2px;
display: flex;
line-height: 24px;
}

.code-snippet__fix .code-snippet__line-index {
counter-reset: line;
flex-shrink: 0;
height: 100%;
padding: 1em;
list-style-type: none;
counter-reset: line;
flex-shrink: 0;
height: 100%;
padding: 1em;
list-style-type: none;
}

.code-snippet__fix .code-snippet__line-index li {
list-style-type: none;
text-align: right;
list-style-type: none;
text-align: right;
}

.code-snippet__fix .code-snippet__line-index li::before {
min-width: 1.5em;
text-align: right;
left: -2.5em;
counter-increment: line;
content: counter(line);
display: inline;
color: rgba(0, 0, 0, 0.15);
min-width: 1.5em;
text-align: right;
left: -2.5em;
counter-increment: line;
content: counter(line);
display: inline;
color: rgba(0, 0, 0, 0.15);
}

.code-snippet__fix pre {
overflow-x: auto;
padding: 1em 1em 1em 1em;
white-space: normal;
flex: 1;
-webkit-overflow-scrolling: touch;
overflow-x: auto;
padding: 1em 1em 1em 1em;
white-space: normal;
flex: 1;
-webkit-overflow-scrolling: touch;
}

.code-snippet__fix code {
text-align: left;
font-size: 14px;
white-space: pre;
display: flex;
position: relative;
font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace;
text-align: left;
font-size: 14px;
white-space: pre;
display: flex;
position: relative;
font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace;
}

::-webkit-scrollbar {
width: 6px;
height: 6px;
background-color: #FFF;
width: 6px;
height: 6px;
background-color: #FFF;
}

::-webkit-scrollbar-track {
border-radius: 6px;
background-color: rgba(200, 200, 200, 0.3);
border-radius: 6px;
background-color: rgba(200, 200, 200, 0.3);
}

::-webkit-scrollbar-thumb {
border-radius: 6px;
background-color: rgba(144, 146, 152, 0.5);
transition: background-color .3s;
border-radius: 6px;
background-color: rgba(144, 146, 152, 0.5);
transition: background-color .3s;
}

::-webkit-scrollbar-thumb:hover {
background-color: rgba(144, 146, 152, 0.5);
background-color: rgba(144, 146, 152, 0.5);
}

.CodeMirror-vscrollbar:focus {
outline: none;
}

.CodeMirror-scroll, .preview-wrapper {
.CodeMirror-scroll,
.preview-wrapper {
overflow: unset;
overflow-y: scroll;
}
Loading

0 comments on commit cecd7dd

Please sign in to comment.