root 4 years ago
parent
commit
08d761ffc1
5 changed files with 36 additions and 26 deletions
  1. 3 3
      index.css
  2. 25 18
      index.html
  3. 2 2
      python/src/blockly/cocoblockly.js
  4. 2 2
      src/blockly/cocoblockly.js
  5. 4 1
      src/blockpy.css

+ 3 - 3
index.css

@@ -837,7 +837,7 @@ ul, li {
     position: absolute;
     padding: 0px 10px;
     color: #2D2F33;
-    width: 150px;
+    width: 140px;
     text-align: center;
 }
 
@@ -849,7 +849,7 @@ ul, li {
     left: 240px;
     padding: 0px 10px;
     color: #2D2F33;
-    width: 150px;
+    width: 140px;
     text-align: center;
 }
 
@@ -870,7 +870,7 @@ ul, li {
     /* border-radius: 13px 15px 0px 0px; */
     color: #4A6AFF;
     font-weight: 700;
-    width: 150px;
+    width: 140px;
     text-align: center;
 }
 

+ 25 - 18
index.html

@@ -323,7 +323,7 @@
                                 class="selectMode_input browser-default"
                                 style="font-size: 0.9rem;border: none;width: 130px;">
                             <i id="down" class="down"
-                                style="position: relative;top: -20px;float: right;right: 18px;"></i>
+                                style="position: relative;top: -20px;float: right;right: 9px;"></i>
                             <div class="downbox MouduleBox" id="downboxModule" style="top: 64px;">
                                 <div style="border: none;"><a href="javaScript:(0)" style="color: #424242 !important;"
                                         class="translatable_ai_module">A.I. Module</a></div>
@@ -684,7 +684,8 @@
                     <li id="cloudBtn-shares">
                         <i class="material-icons" style="margin-left:5px;cursor: pointer;display: none;">share</i>
                     </li>
-                    <i id="workspace_screenshot" style="margin-left:5px;cursor: pointer;position: absolute;right: 350px;">
+                    <i id="workspace_screenshot"
+                        style="margin-left:5px;cursor: pointer;position: absolute;right: 350px;">
                         <img src="./images/screenshot.png" style="width: 40px;height: 35px;margin:15px;" />
                     </i>
                     <i id="button_delete" class="material-icons sketch_name_icon right"
@@ -886,12 +887,12 @@
                                 style='height:calc(100% - 243px);display:block;overflow:auto'>
                                 <div class="card-header"
                                     style='position:relative;height: 45px;line-height: 45px;background: #E6F1FF;border-bottom: unset;'>
-                                    <!--<span class="header-icon">&lt &gt</span>--> <span id="python_SourceCode" class="header-text translate-code
+                                    <span id="python_SourceCode" class="header-text translate-code
                                             translatable_pythonSourceCode switch_box switch_select"
-                                        style='margin-left: 25px;'>Python
-                                        Source Code</span> <span id="Serial_Interaction"
+                                        style='margin-left: 5px;'>Python
+                                        Source Code</span>
+                                    <span id="Serial_Interaction"
                                         class="header-text translatable_serial_plotter switch_box1">串口数据显示</span>
-
                                     <span id="Serial_Display"
                                         class="header-text translatable_serial_visualization switch_box2">串口数据可视化</span>
 
@@ -921,7 +922,8 @@
                                         style="margin-left: 20px;cursor: pointer;position: absolute;top: 12px;right: 0px;display:none;">delete</i>
                                 </div>
                                 <div class="card-content"
-                                    style="position:relative;height: calc(100% - 90px);overflow:auto;margin-top: 45px;" id="python_box">
+                                    style="position:relative;height: calc(100% - 90px);overflow:auto;margin-top: 45px;"
+                                    id="python_box">
 
                                     <div class="editDiv" id="editDiv" style="top: 0;width: 100%;left: 0;padding: 0;z-index: 0;
                                         right: 0;">
@@ -1039,7 +1041,8 @@
                                 </div>
                                 <!--<div class="card-header">                    <span class="header-icon" style="line-height:40px;"><img style="height:30px;vertical-align:middle;" src="./images/icon-aspect.svg"></span>                    <span class="header-text translate-output">Output Area</span>                    <img class="fullscreenIcon" src="./images/icon-fullscreen.svg">                    <img class="fullscreenIcon hidden" src="./images/icon-fullscreen-exit.svg">                </div>-->
                                 <!--<div class="card-content" style="display:block;grid-template-rows:1fr 50px;">                    <div style="border-bottom:1px solid #ddd;padding:8px;overflow:hidden;">                   <div style="height:100%;overflow:hidden;">                            <div class='blockpy-printer blockpy-printer-default' style="resize:none;height:98%;width:100%;border:1px solid #818181;">                            </div>                        </div>                   </div>-->
-                                <div class="card-content" style="padding:0 10px;width:100%;height: 183px;background: #FFFFFF;">
+                                <div class="card-content"
+                                    style="padding:0 10px;width:100%;height: 183px;background: #FFFFFF;">
                                     <div class="row" id="status" style="display: none;">
                                         <div class="col s12"><img id="error-btn" class="activator"
                                                 src="./icons/error.png">
@@ -1050,20 +1053,23 @@
                                     <div class="row" style="width: 100%;margin: 0;margin-top: 20px;">
                                         <div id="uploader-btns" class="col s6">
                                             <a onclick='sendfile();' id="send_file" class="waves-effect
-                                                    waves-light btn blue disabled"
-                                                style="margin-right:2.5rem;padding:0 0.5rem;border-radius: 3px;
+                                                    waves-light btn blue disabled" style="padding:0 0.5rem;border-radius: 3px;
                                                 width: 90px;height: 36px;">
                                                 <!-- <i style="cursor: pointer;" class="fa fa-play-circle"
                                                     aria-hidden="true"></i> -->
-                                                <img src="./images/run.png" style="vertical-align: middle;cursor: pointer;margin-right: 5px;">
-                                                <span id="runCode" style="font-size: 14px;color: #FFFFFF;letter-spacing: 0;"></span>
+                                                <img src="./images/run.png"
+                                                    style="vertical-align: middle;cursor: pointer;margin-right: 5px;">
+                                                <span id="runCode"
+                                                    style="font-size: 14px;color: #FFFFFF;letter-spacing: 0;"></span>
                                             </a>
                                             <a onclick="uploadpyfile()" id="uploadpy" class="waves-effect
                                             waves-light btn blue disabled" style="padding:0 0.5rem;border-radius: 3px;
                                             width: 90px;height: 36px;">
                                                 <!-- <i style="cursor: pointer;" class="fa fa-upload" aria-hidden="true"></i> -->
-                                                <img src="./images/uploadCode.png" style="vertical-align: middle;cursor: pointer;margin-right: 5px;">
-                                                <span id="uploadFiles" style="font-size: 14px;color: #FFFFFF;letter-spacing: 0;"></span>
+                                                <img src="./images/uploadCode.png"
+                                                    style="vertical-align: middle;cursor: pointer;margin-right: 5px;">
+                                                <span id="uploadFiles"
+                                                    style="font-size: 14px;color: #FFFFFF;letter-spacing: 0;"></span>
                                             </a>
                                             <div style="float: right;">
                                                 <li style="display: none;">
@@ -1093,8 +1099,7 @@
                                             <div class="select-wrapper initialized">
                                                 <!-- <span class="caret">▼</span> -->
                                                 <i class="down"></i>
-                                                <input
-                                                    type="text" class="select-dropdown" id="select_dropdown"
+                                                <input type="text" class="select-dropdown" id="select_dropdown"
                                                     readonly="true"
                                                     data-activates="select-options-eca84f35-6884-7dc4-9d8b-c14115abe698"
                                                     value="">
@@ -1180,10 +1185,12 @@
                                         
                                     </div> -->
 
-                                    <div class="row" id="uploader_connect_status" style="margin-top: 16px;display: block;">
+                                    <div class="row" id="uploader_connect_status"
+                                        style="margin-top: 16px;display: block;">
                                         <div class="col s12">
                                             <div style="margin:7px 0;">
-                                                <span class="translatable_uploader_connect_status" style="font-size: 16px;color: #3D3D3D;letter-spacing: 0;">请到"连接"下载安装程序并连接硬件。</span>
+                                                <span class="translatable_uploader_connect_status"
+                                                    style="font-size: 16px;color: #3D3D3D;letter-spacing: 0;">请到"连接"下载安装程序并连接硬件。</span>
                                             </div>
                                         </div>
                                     </div>

+ 2 - 2
python/src/blockly/cocoblockly.js

@@ -1376,13 +1376,13 @@ async function cocoblockly() {
         // for (var i = 0; i < $('.Hardware2').length - 1; i++) {
         //     $('.HarxA')[i].className = 'Hardware2 HarxA max'
         // }
-        $("#python_SourceCode")[0].style.marginLeft = '25px';
+        $("#python_SourceCode")[0].style.marginLeft = '5px';
         // $("#repl_delete")[0].style.left = '310px'
     } else {
         // for (var i = 0; i < $('.Hardware2').length - 1; i++) {
         //     $('.HarxA')[i].className = 'Hardware2 HarxA'
         // }
-        $("#python_SourceCode")[0].style.marginLeft = '25px';
+        $("#python_SourceCode")[0].style.marginLeft = '5px';
         // $("#repl_delete")[0].style.left = '260px'
     }
     // (function() {

+ 2 - 2
src/blockly/cocoblockly.js

@@ -1376,13 +1376,13 @@ async function cocoblockly() {
         // for (var i = 0; i < $('.Hardware2').length - 1; i++) {
         //     $('.HarxA')[i].className = 'Hardware2 HarxA max'
         // }
-        $("#python_SourceCode")[0].style.marginLeft = '25px';
+        $("#python_SourceCode")[0].style.marginLeft = '5px';
         // $("#repl_delete")[0].style.left = '310px'
     } else {
         // for (var i = 0; i < $('.Hardware2').length - 1; i++) {
         //     $('.HarxA')[i].className = 'Hardware2 HarxA'
         // }
-        $("#python_SourceCode")[0].style.marginLeft = '25px';
+        $("#python_SourceCode")[0].style.marginLeft = '5px';
         // $("#repl_delete")[0].style.left = '260px'
     }
     // (function() {

+ 4 - 1
src/blockpy.css

@@ -382,7 +382,10 @@ img.fullscreenIcon {
 .card-header > span.header-text {
   font-size: 15px;
   line-height: 40px;
-  /* font-weight: 200; */
+  display:block;
+  float: left;
+  position: static;
+  margin-top: 5px;
 }
 
 .card-content {