From f6cf30f8c8d03199f140414c4acfdbce4cb2b639 Mon Sep 17 00:00:00 2001 From: ducklord420 <34382650+ducklord420@users.noreply.github.com> Date: Thu, 11 Apr 2019 09:22:15 +0100 Subject: [PATCH 1/2] Update README.rst Changed the git repository address to match this repository and changed the command to serve the editor. --- README.rst | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/README.rst b/README.rst index d157f2c2..f78fd380 100644 --- a/README.rst +++ b/README.rst @@ -14,7 +14,7 @@ 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 @@ -22,9 +22,7 @@ submodules:: 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. From 376b1c02148e57392c236b5611f379f62e2337ec Mon Sep 17 00:00:00 2001 From: Jason Liu Date: Thu, 11 Apr 2019 19:29:17 +0100 Subject: [PATCH 2/2] Improved UI --- lib/skulpt/microbit/mb.css | 13 +++++------ simulator.html | 16 +++---------- static/css/simulator-ui.css | 46 ++++++++----------------------------- 3 files changed, 18 insertions(+), 57 deletions(-) diff --git a/lib/skulpt/microbit/mb.css b/lib/skulpt/microbit/mb.css index 9db6eeb9..15e62657 100644 --- a/lib/skulpt/microbit/mb.css +++ b/lib/skulpt/microbit/mb.css @@ -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; @@ -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; } diff --git a/simulator.html b/simulator.html index b07a4671..612c287f 100644 --- a/simulator.html +++ b/simulator.html @@ -62,33 +62,23 @@ -
- +
- - Allows you to trigger gestures picked up by the accelerometer -
- +
- - Allows you to adjust the thermometer reading -
- +
- - Allows you to test functionality using the pins -
diff --git a/static/css/simulator-ui.css b/static/css/simulator-ui.css index 7bb9ad9d..4cdfb3cd 100644 --- a/static/css/simulator-ui.css +++ b/static/css/simulator-ui.css @@ -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 @@ -17,7 +22,7 @@ #sim-btns { position: fixed; - bottom: 145px; left: 10px; + bottom: 75px; left: 10px; width: 60px; display: none; } @@ -46,37 +51,6 @@ 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; @@ -84,7 +58,7 @@ 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; @@ -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 */