Skip to content

UI Improvements #26

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 11, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,15 @@ This editor works with any modern web browser.
In addition to cloning the repository it is required to retrieve the GIT
submodules::

git clone https://github.com/bbcmicrobit/PythonEditor
git clone https://github.com/ducklord420/PythonEditor.git
cd PythonEditor
git submodule update --init --recursive

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

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

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

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

Expand Down
13 changes: 6 additions & 7 deletions lib/skulpt/microbit/mb.css
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,8 @@
width: 100%;
display: block;
font-size: 10px;
color: #000000;
background-color: #FFFFFF;
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%);
color: #FFFFFF;
background-color: #3785ce;
text-align: center;
transition: all 0.5s;

Expand Down Expand Up @@ -246,19 +245,19 @@

#mb_pin_type {
margin: 10px 0;
padding: 0 0 0 10px;
background-color: rgba(20, 20, 20, 0.4);
padding: 0 0 0 0;
color: #FFFFFF;
}

#mb_pin_type strong { font-weight: 700; }
#mb_pin_type strong.Analog { color: rgb(7, 7, 207); }
#mb_pin_type strong.Digital { color: rgb(3, 231, 3); }
#mb_pin_type strong.Touch { color: #d40d0d; }
#mb_pin_type strong.Touch { color: #FFFFFF; }
#mb_pin_type strong.threeVolts { color: #eed814; }

#mb_btn_pin_touch {
color: #FFFFFF;
background: #d40d0d;
background: #3785ce;
border-radius: 5px;
border: none;
}
Expand Down
16 changes: 3 additions & 13 deletions simulator.html
Original file line number Diff line number Diff line change
Expand Up @@ -62,33 +62,23 @@
</div>
</div> <!-- END #sim-parameters -->


<div id="sim-btns">
<a href="#" id="accel-toggle">
<a href="#" id="accel-toggle" title="Accelerometer">
<div class="status-icon">
<i class="fa fa-tachometer" title="accelerometer"></i>
</div>
<span class="sim-tip">
Allows you to trigger gestures picked up by the accelerometer
</span>
</a>

<a href="#" id="thermo-toggle">
<a href="#" id="thermo-toggle" title="Thermometer">
<div class="status-icon">
<i class="fa fa-thermometer" title="thermometer"></i>
</div>
<span class="sim-tip">
Allows you to adjust the thermometer reading
</span>
</a>

<a href="#" id="pin-toggle">
<a href="#" id="pin-toggle" title="I/O Pins">
<div class="status-icon">
<i class="fa fa-map-pin"></i>
</div>
<span class="sim-tip">
Allows you to test functionality using the pins
</span>
</a>
</div>

Expand Down
46 changes: 9 additions & 37 deletions static/css/simulator-ui.css
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
#sim-wrap {
height: 655px;
width: 400px;
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%);
font-family: Courier New, Courier, monospace;
position: relative;
bottom: 7.5px;
}
#mb_btn_pin_touch
{
margin-left: 0;
}

#sim-parameters
Expand All @@ -17,7 +22,7 @@

#sim-btns {
position: fixed;
bottom: 145px; left: 10px;
bottom: 75px; left: 10px;
width: 60px;
display: none;
}
Expand Down Expand Up @@ -46,45 +51,14 @@
margin: 3px 0;
}

#sim-btns a .sim-tip {
visibility: hidden;
max-width: 200px;
color: #FFFFFF;
background-color: rgb(34, 11, 165);
text-align: center;
padding: 2px 8px;
border-radius: 4px;
font-family: Arial, Helvetica, sans-serif;

position: absolute;
top: 0%; left: 110%;
z-index: 99;
}

#sim-btns a:hover .sim-tip {
visibility: visible;
z-index: 99;
}

#sim-btns a .sim-tip::after {
content: " ";
position: absolute;
top: 50%;
right: 100%;
margin-top: -5px;
border-width: 5px;
border-style: solid;
border-color: transparent rgb(34, 11, 165) transparent transparent;
}

#sim-btns-toggle {
height: 40px; width: 40px;
border-radius: 20px;
color: white;
text-align: center;
padding: 10px;
position: fixed;
bottom: 100px; left: 20px;
bottom: 20px; left: 16px;
cursor: pointer;
background-color: rgb(68, 202, 226);
box-sizing: border-box;
Expand All @@ -102,14 +76,12 @@
{
font-size: 20px;
position: absolute;
left: 10px;
bottom: 50px;
color: #ffffff;
}

#thermometer .value span
{
font-weight: 600;
color: rgba(180, 0, 0, 1);
}
/* END Thermometer */

Expand Down