Skip to content

Commit

Permalink
website: update markdow style.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcjlove committed Dec 29, 2021
1 parent 9738278 commit 11521ce
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
11 changes: 7 additions & 4 deletions website/src/components/Markdown.module.less
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,17 @@
max-width: 860px;
margin: 0 auto;
padding-bottom: 20px;
position: relative;
.editor {
margin-left: 25px;
padding: 3px 5px;
background: #2196f3;
border-radius: 3px;
position: absolute;
right: 20px;
padding: 3px 8px 4px 8px;
background: #333333;
border-radius: 0 0 3px 3px;
text-decoration: initial;
color: #fff;
transition: all 0.3s;
font-size: 14px;
&:hover {
background-color: #3f51b4;
}
Expand Down
6 changes: 5 additions & 1 deletion website/src/components/Markdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,12 @@ export default class Markdown extends Component<MarkdownProps, MarkdownState> {
return (
<div className={styles.warpper}>
<div className={styles.markdown}>
<EditorUrl editorUrl={this.editorUrl} />
{this.example && <div className={styles.example}>{this.example}</div>}
<MarkdownPreview source={this.state.mdStr.replace(/([\s\S]*)<!--dividing-->/, '')} style={{ padding: '20px 26px' }} />
<MarkdownPreview
source={this.state.mdStr.replace(/([\s\S]*)<!--dividing-->/, '')}
style={{ padding: '20px 26px', minHeight: 120 }}
/>
<EditorUrl editorUrl={this.editorUrl} />
</div>
<div className={styles.footer}>
Expand Down

0 comments on commit 11521ce

Please sign in to comment.