Skip to content

Commit 5f06641

Browse files
committed
add code panel
1 parent 99cbba6 commit 5f06641

11 files changed

+309
-185
lines changed

app/build/mojs-curve-editor.js

Lines changed: 252 additions & 174 deletions
Large diffs are not rendered by default.

app/build/mojs-curve-editor.min.js

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/css/blocks/code-panel.postcss.css

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
@import '../assets/globals.postcss.css';
2+
3+
.code-panel {
4+
position: absolute;
5+
left: calc( 10 * $PX );
6+
top: calc( -32 * $PX );
7+
width: calc( 391 * $PX );
8+
height: calc( 32 * $PX );
9+
margin: 0 auto;
10+
border-radius: calc( 6 * $PX ) calc( 6 * $PX ) 0 0;
11+
background: rgba( 61, 27, 60, 1 );
12+
z-index: 3;
13+
14+
&__input-wrapp {
15+
width: 381px;
16+
height: 23px;
17+
margin: 5px 5px;
18+
border-radius: calc( 2 * $PX );
19+
background: rgba( 58, 8, 58, 1 );
20+
border: 1px solid #B3A0B2;
21+
box-shadow: inset 3px 3px 0 rgba(0,0,0,0.5);
22+
}
23+
&__input-field {
24+
display: block;
25+
background: transparent;
26+
color: $c-white;
27+
padding: 0.4em;
28+
border: none;
29+
width: 100%;
30+
}
31+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"code-panel":"_code-panel_1jdzk_3","code-panel__input-wrapp":"_code-panel__input-wrapp_1jdzk_1","code-panel__input-field":"_code-panel__input-field_1jdzk_1"}

app/css/blocks/curve-editor.postcss.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
top: 0;
2121
bottom: 0;
2222
padding: calc( $gap * $PX );
23-
23+
2424
& icon-divider {
2525
margin: calc( 10*$PX ) auto;
2626
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"curve-editor":"_curve-editor_hshpo_4","curve-editor__left":"_curve-editor__left_hshpo_1","curve-editor__right":"_curve-editor__right_hshpo_1","curve-editor__anchor-buttons":"_curve-editor__anchor-buttons_hshpo_1","curve-editor__mojs-logo":"_curve-editor__mojs-logo_hshpo_1"}
1+
{"curve-editor":"_curve-editor_dzxd1_4","curve-editor__left":"_curve-editor__left_dzxd1_1","curve-editor__right":"_curve-editor__right_dzxd1_1","curve-editor__anchor-buttons":"_curve-editor__anchor-buttons_dzxd1_1","curve-editor__mojs-logo":"_curve-editor__mojs-logo_dzxd1_1"}

app/css/blocks/curve.postcss.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/css/blocks/curve.postcss.css.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"curve":"_curve_adube_5","curve__svg-wrapper":"_curve__svg-wrapper_adube_1","curve__svg":"_curve__svg_adube_1","curve__svg-path":"_curve__svg-path_adube_1"}
1+
{"curve":"_curve_14zwe_5","curve__svg-wrapper":"_curve__svg-wrapper_14zwe_1","curve__svg":"_curve__svg_14zwe_1","curve__svg-path":"_curve__svg-path_14zwe_1"}

app/js/tags/code-panel.tag

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
2+
3+
<code-panel class={ this.CLASSES['code-panel'] }>
4+
<div class={ this.CLASSES['code-panel__input-wrapp'] }>
5+
<input class={ this.CLASSES['code-panel__input-field'] } type="text" readonly="readonly" />
6+
</div>
7+
8+
<script>
9+
this.CLASSES = require('../../css/blocks/code-panel.postcss.css.json');
10+
require('../../css/blocks/code-panel');
11+
</script>
12+
13+
</code-panel>

app/js/tags/curve-editor.tag

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
require('./resize-handle');
22
require('./icons');
33
require('./icon');
4+
require('./code-panel');
45
require('./icon-button');
56
require('./icon-divider');
67
require('./curve');
78

89
<curve-editor class={this.CLASSES['curve-editor']} style={this.getStyle()}>
910
<icons />
10-
11+
<code-panel />
1112
<div class={this.CLASSES['curve-editor__left']}>
1213
<icon-button shape="code"></icon-button>
1314
<icon-divider />

0 commit comments

Comments
 (0)