Skip to content

Commit ee9d5b8

Browse files
authored
Merge pull request #26 from ducklord420/master
UI Improvements
2 parents aec6e17 + e1a68da commit ee9d5b8

File tree

4 files changed

+20
-61
lines changed

4 files changed

+20
-61
lines changed

README.rst

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,15 @@ This editor works with any modern web browser.
1414
In addition to cloning the repository it is required to retrieve the GIT
1515
submodules::
1616

17-
git clone https://github.com/bbcmicrobit/PythonEditor
17+
git clone https://github.com/ducklord420/PythonEditor.git
1818
cd PythonEditor
1919
git submodule update --init --recursive
2020

2121
**THIS NEEDS TO BE DONE BEFORE ANYTHING ELSE, OR IT WILL NOT WORK.**
2222

2323
Assuming you have Python 3 installed you can serve the editor like this::
2424

25-
$ ./bin/show
26-
http://localhost:8000/editor.html
27-
Serving HTTP on 0.0.0.0 port 8000 ...
25+
py -m http.server --bind 0.0.0.0
2826

2927
As the script tells us, point your browser to http://localhost:8000/editor.html.
3028

lib/skulpt/microbit/mb.css

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,8 @@
3636
width: 100%;
3737
display: block;
3838
font-size: 10px;
39-
color: #000000;
40-
background-color: #FFFFFF;
41-
background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.6) 5%, rgba(255, 255, 255, 0.6) 95%, rgba(255, 255, 255, 0) 100%);
39+
color: #FFFFFF;
40+
background-color: #3785ce;
4241
text-align: center;
4342
transition: all 0.5s;
4443

@@ -246,19 +245,19 @@
246245

247246
#mb_pin_type {
248247
margin: 10px 0;
249-
padding: 0 0 0 10px;
250-
background-color: rgba(20, 20, 20, 0.4);
248+
padding: 0 0 0 0;
249+
color: #FFFFFF;
251250
}
252251

253252
#mb_pin_type strong { font-weight: 700; }
254253
#mb_pin_type strong.Analog { color: rgb(7, 7, 207); }
255254
#mb_pin_type strong.Digital { color: rgb(3, 231, 3); }
256-
#mb_pin_type strong.Touch { color: #d40d0d; }
255+
#mb_pin_type strong.Touch { color: #FFFFFF; }
257256
#mb_pin_type strong.threeVolts { color: #eed814; }
258257

259258
#mb_btn_pin_touch {
260259
color: #FFFFFF;
261-
background: #d40d0d;
260+
background: #3785ce;
262261
border-radius: 5px;
263262
border: none;
264263
}

simulator.html

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -62,33 +62,23 @@
6262
</div>
6363
</div> <!-- END #sim-parameters -->
6464

65-
6665
<div id="sim-btns">
67-
<a href="#" id="accel-toggle">
66+
<a href="#" id="accel-toggle" title="Accelerometer">
6867
<div class="status-icon">
6968
<i class="fa fa-tachometer" title="accelerometer"></i>
7069
</div>
71-
<span class="sim-tip">
72-
Allows you to trigger gestures picked up by the accelerometer
73-
</span>
7470
</a>
7571

76-
<a href="#" id="thermo-toggle">
72+
<a href="#" id="thermo-toggle" title="Thermometer">
7773
<div class="status-icon">
7874
<i class="fa fa-thermometer" title="thermometer"></i>
7975
</div>
80-
<span class="sim-tip">
81-
Allows you to adjust the thermometer reading
82-
</span>
8376
</a>
8477

85-
<a href="#" id="pin-toggle">
78+
<a href="#" id="pin-toggle" title="I/O Pins">
8679
<div class="status-icon">
8780
<i class="fa fa-map-pin"></i>
8881
</div>
89-
<span class="sim-tip">
90-
Allows you to test functionality using the pins
91-
</span>
9282
</a>
9383
</div>
9484

static/css/simulator-ui.css

Lines changed: 9 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
11
#sim-wrap {
22
height: 655px;
33
width: 400px;
4-
background: linear-gradient(90deg, rgba(180, 180, 180, 0) 0%, rgba(180, 180, 180, 0.6) 5%, rgba(180, 180, 180, 0.6) 95%, rgba(180, 180, 180, 0) 100%);
54
font-family: Courier New, Courier, monospace;
5+
position: relative;
6+
bottom: 7.5px;
7+
}
8+
#mb_btn_pin_touch
9+
{
10+
margin-left: 0;
611
}
712

813
#sim-parameters
@@ -17,7 +22,7 @@
1722

1823
#sim-btns {
1924
position: fixed;
20-
bottom: 145px; left: 10px;
25+
bottom: 75px; left: 10px;
2126
width: 60px;
2227
display: none;
2328
}
@@ -46,45 +51,14 @@
4651
margin: 3px 0;
4752
}
4853

49-
#sim-btns a .sim-tip {
50-
visibility: hidden;
51-
max-width: 200px;
52-
color: #FFFFFF;
53-
background-color: rgb(34, 11, 165);
54-
text-align: center;
55-
padding: 2px 8px;
56-
border-radius: 4px;
57-
font-family: Arial, Helvetica, sans-serif;
58-
59-
position: absolute;
60-
top: 0%; left: 110%;
61-
z-index: 99;
62-
}
63-
64-
#sim-btns a:hover .sim-tip {
65-
visibility: visible;
66-
z-index: 99;
67-
}
68-
69-
#sim-btns a .sim-tip::after {
70-
content: " ";
71-
position: absolute;
72-
top: 50%;
73-
right: 100%;
74-
margin-top: -5px;
75-
border-width: 5px;
76-
border-style: solid;
77-
border-color: transparent rgb(34, 11, 165) transparent transparent;
78-
}
79-
8054
#sim-btns-toggle {
8155
height: 40px; width: 40px;
8256
border-radius: 20px;
8357
color: white;
8458
text-align: center;
8559
padding: 10px;
8660
position: fixed;
87-
bottom: 100px; left: 20px;
61+
bottom: 20px; left: 16px;
8862
cursor: pointer;
8963
background-color: rgb(68, 202, 226);
9064
box-sizing: border-box;
@@ -102,14 +76,12 @@
10276
{
10377
font-size: 20px;
10478
position: absolute;
105-
left: 10px;
106-
bottom: 50px;
79+
color: #ffffff;
10780
}
10881

10982
#thermometer .value span
11083
{
11184
font-weight: 600;
112-
color: rgba(180, 0, 0, 1);
11385
}
11486
/* END Thermometer */
11587

0 commit comments

Comments
 (0)