Skip to content

Commit c72bd32

Browse files
committed
Make design good again
1 parent a3fa336 commit c72bd32

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+775
-280
lines changed

src/scripts/components/Editor/Formula/Editor.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class EditorForumlaEditor extends Component {
3535
}
3636

3737
render() {
38-
const formulaClasses = className("formula-editor", this.props.className);
38+
const formulaClasses = className("editor-formula-editor", this.props.className);
3939

4040
return (
4141
<div className={formulaClasses}>

src/scripts/components/Editor/Formula/Help.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class EditorForumlaHelp extends PureComponent {
3232
{Object.keys(symbols).map(id => (
3333
<Markdown
3434
key={id}
35-
className="formula-help-symbol"
35+
className="editor-formula-help-symbol"
3636
content={`\`\`\`katex\n${symbols[id].content}\n\`\`\``}
3737
onClick={() => this.props.choose(symbols[id])}
3838
/>
@@ -42,7 +42,7 @@ class EditorForumlaHelp extends PureComponent {
4242

4343
render() {
4444
return (
45-
<div className="formula-help">
45+
<div className="editor-formula-help">
4646
{Object.keys(EditorForumlaHelp.symbols).map(type => this.renderGroup(type, EditorForumlaHelp.symbols[type]))}
4747
</div>
4848
);

src/scripts/components/Editor/Formula/HelpGroup.jsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ class EditorForumlaHelpGroup extends PureComponent {
1212

1313
render() {
1414
return (
15-
<div className="formula-help-group">
16-
<div className="formula-help-group-name">{this.props.name}</div>
15+
<div className="editor-formula-help-group">
16+
<div className="editor-formula-help-group-name">{this.props.name}</div>
1717

18-
<div className="formula-help-group-symbols">
18+
<div className="editor-formula-help-group-symbols">
1919
{this.props.children}
2020
</div>
2121
</div>

src/scripts/components/Editor/Formula/index.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ class EditorForumla extends Component {
9191

9292
<TabPanel className="qilin-popup-content">
9393
<Makrdown
94-
className="formula-preview"
94+
className="editor-formula-preview"
9595
content={`\`\`\`katex\n${this.state.value}\n\`\`\``}
9696
/>
9797

@@ -108,7 +108,7 @@ class EditorForumla extends Component {
108108

109109
<TabPanel className="qilin-popup-content">
110110
<CodeMirror
111-
className="formula-editor is-full"
111+
className="editor-formula-editor is-full"
112112
content={`\`\`\`katex\n${this.state.value}\n\`\`\``}
113113
options={{
114114
scrollPastEnd: false,

src/styles/components/_app.scss

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020
&-title {
2121
display: flex;
2222
outline: none;
23+
24+
-webkit-app-region: no-drag;
2325
}
2426
}
2527

@@ -38,5 +40,30 @@
3840
.Pane2 { width: 0 !important; }
3941
}
4042
}
43+
44+
&-pane {
45+
.Resizer {
46+
background-clip: padding-box;
47+
z-index: 1;
48+
49+
&.vertical {
50+
margin: 0 -5px;
51+
52+
width: 11px;
53+
height: auto;
54+
55+
border-width: 0 5px;
56+
border-style: solid;
57+
border-color: transparent;
58+
59+
cursor: col-resize;
60+
}
61+
}
62+
63+
.Pane {
64+
overflow-x: hidden;
65+
overflow-y: hidden;
66+
}
67+
}
4168
}
4269
}

src/styles/components/_editor-formula.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.formula {
1+
.editor-formula {
22
&-preview {
33
min-height: 50px;
44
}

src/styles/components/_editor-preview.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
.editor-preview {
22
width: 100%;
3-
height: calc(100vh - 50px + 1rem);
3+
height: calc(100vh - 50px);
44

55
overflow-x: auto;
66
overflow-y: auto;
Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,24 @@
11
.qilin-button {
22
display: flex;
3+
4+
text-align: center;
35
align-items: center;
46
justify-content: center;
7+
vertical-align: middle;
58

69
border: none;
710
outline: none;
811
cursor: pointer;
912

10-
overflow-x: hidden;
11-
overflow-y: hidden;
12-
1313
-webkit-appearance: none;
1414
-webkit-app-region: no-drag;
1515

16-
transition: all 100ms ease;
17-
18-
&.is-big {
19-
padding: .5rem 1rem;
16+
&, & > * {
17+
transition: all 100ms ease;
2018
}
2119

2220
&-icon {
2321
height: 15px;
2422
width: auto;
25-
26-
transition: all 100ms ease;
2723
}
2824
}

src/styles/components/qilin/_popup.scss

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,10 @@
1111
align-items: center;
1212
justify-content: center;
1313

14-
flex-basis: 50px;
15-
height: 50px;
16-
width: 100%;
17-
1814
cursor: -webkit-grab;
1915

20-
&-close,
21-
&-done {
16+
&-close, &-done {
2217
position: absolute;
23-
top: 2px;
24-
25-
cursor: pointer;
2618
}
2719

2820
&-close { left: 0; }
@@ -49,16 +41,10 @@
4941
flex-direction: column;
5042
flex: 1;
5143

52-
padding: .25rem 0 0 0;
53-
5444
&-list {
5545
&-item {
5646
display: inline-block;
5747
position: relative;
58-
bottom: -1px;
59-
60-
padding: .35rem .75rem;
61-
margin: 0 7px;
6248

6349
outline: none;
6450
list-style: none;

0 commit comments

Comments
 (0)