panweitong 4 years ago
parent
commit
66a72d5f25
7 changed files with 37 additions and 24 deletions
  1. 18 7
      index.css
  2. 4 4
      index.html
  3. 2 1
      index.js
  4. 4 4
      python/index.css
  5. 6 6
      python/index.html
  6. 1 0
      python/index.js
  7. 2 2
      src/blockly/cocoblockly.js

+ 18 - 7
index.css

@@ -84,9 +84,9 @@ body>.shadowbox {
     .translatable_sketch_name {
         width: 100px;
     }
-    #iot_modules {
+    /* #iot_modules {
         width: 118px !important;
-    }
+    } */
     #sketch_name {
         margin-left: 0 !important;
         /* width: 100px !important; */
@@ -854,7 +854,7 @@ ul, li {
     display: inline-block;
     bottom: 0;
     position: absolute;
-    padding: 0px 10px;
+    padding: 0px 6px;
     color: #2D2F33;
     width: 140px;
     text-align: center;
@@ -866,7 +866,7 @@ ul, li {
     bottom: 0;
     position: absolute;
     left: 240px;
-    padding: 0px 10px;
+    padding: 0px 6px;
     color: #2D2F33;
     width: 140px;
     text-align: center;
@@ -878,9 +878,9 @@ ul, li {
     bottom: 0;
     position: absolute;
     left: 450px;
-    padding: 0px 10px;
+    padding: 0px 6px;
     color: #2D2F33;
-    width: 150px;
+    /* width: 125px; */
     text-align: center;
 }
 
@@ -889,7 +889,7 @@ ul, li {
     /* border-radius: 13px 15px 0px 0px; */
     color: #4A6AFF;
     font-weight: 700;
-    width: 140px;
+    /* width: 125px; */
     text-align: center;
 }
 
@@ -1274,5 +1274,16 @@ table td, th {
 
     .switch_box2 {
         left: 250px;
+        /* width: 145px; */
+        padding: 0 6px;
+    }
+
+    .switch_select {
+        background: #fff;
+        /* border-radius: 13px 15px 0px 0px; */
+        color: #4A6AFF;
+        font-weight: 700;
+        /* width: 125px; */
+        text-align: center;
     }
 }

+ 4 - 4
index.html

@@ -888,7 +888,7 @@
                                     style='position:relative;height: 45px;line-height: 45px;background: #E6F1FF;border-bottom: unset;'>
                                     <span id="python_SourceCode" class="header-text translate-code
                                             translatable_pythonSourceCode switch_box switch_select"
-                                        style='margin-left: 5px;'>Python
+                                        style='margin-left: 0px;'>Python
                                         Source Code</span>
                                     <span id="Serial_Interaction"
                                         class="header-text translatable_serial_plotter switch_box1">串口数据显示</span>
@@ -1050,7 +1050,7 @@
                                     </div>
 
                                     <div class="row" style="width: 100%;margin: 0;margin-top: 20px;">
-                                        <div id="uploader-btns" class="col s6">
+                                        <div id="uploader-btns" class="col s7">
                                             <a onclick='sendfile();' id="send_file" class="waves-effect
                                                     waves-light btn blue disabled" style="padding:0 0.5rem;border-radius: 3px;
                                                 width: 88px;height: 36px;">
@@ -1094,7 +1094,7 @@
                                             style="display:none"><span id="gettype">Upload
                                                 files</span></a>
 
-                                        <div class="col s6 btn-network" style="padding-right:1px;">
+                                        <div class="col s5 btn-network" style="padding-right:1px;">
                                             <div class="select-wrapper initialized">
                                                 <!-- <span class="caret">▼</span> -->
                                                 <i class="down"></i>
@@ -1113,7 +1113,7 @@
                                             </div>
                                         </div>
 
-                                        <div class="col cs6 btn-network hidden" style="padding-right:1px;width: 50%;">
+                                        <div class="col s5 btn-network hidden" style="padding-right:1px;width: 50%;">
                                             <div class="select-wrapper initialized" style='width: 61%;float: left;'>
                                                 <input type="text" class="select-dropdown" data-activates=""
                                                     id='ipAddress' placeholder="请输入ip地址">

+ 2 - 1
index.js

@@ -502,6 +502,7 @@ function styled() {
     $("input").css("font-family", "Arial");
     $("#workspace_screenshot").css("right", "470px");
     $("#downloadbutton-li").css("right", "62px");
+    $("#uploadpy").css("width","120px");
   }
 }
 
@@ -1159,7 +1160,7 @@ function switchCC(e) {
         "display": "block"
       });
       $(".blockpy-toolbar-upload").css({
-        "display": "block"
+        "display": "none"
       });
       $("#repl_delete").css("display", "none");
     }

+ 4 - 4
python/index.css

@@ -84,12 +84,12 @@ body>.shadowbox {
     .translatable_sketch_name {
         width: 100px;
     }
-    #iot_modules {
-        width: 110px !important;
-    }
+    /* #iot_modules {
+        width: 140px !important;
+    } */
     #sketch_name {
         margin-left: 0 !important;
-        width: 100px !important;
+        /* width: 100px !important; */
     }
 }
 

+ 6 - 6
python/index.html

@@ -1037,10 +1037,10 @@
                                     </div>
 
                                     <div class="row" style="width: 100%;margin: 0;margin-top: 20px;">
-                                        <div id="uploader-btns" class="col s6">
+                                        <div id="uploader-btns" class="col s7">
                                             <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;
-                                                width: 90px;height: 36px;">
+                                                    waves-light btn blue disabled" style="padding:0 0.5rem;border-radius: 3px;
+                                                width: 88px;height: 36px;">
                                                 <!-- <i style="cursor: pointer;" class="fa fa-play-circle"
                                                     aria-hidden="true"></i> -->
                                                 <img src="./images/run.png"
@@ -1050,7 +1050,7 @@
                                             </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;">
+                                            width: 88px;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;">
@@ -1081,7 +1081,7 @@
                                             style="display:none"><span id="gettype">Upload
                                                 files</span></a>
 
-                                        <div class="col s6 btn-network" style="padding-right:1px;">
+                                        <div class="col s5 btn-network" style="padding-right:1px;">
                                             <div class="select-wrapper initialized"><span class="caret">▼</span><input
                                                     type="text" class="select-dropdown" id="select_dropdown"
                                                     readonly="true"
@@ -1098,7 +1098,7 @@
                                             </div>
                                         </div>
 
-                                        <div class="col cs6 btn-network hidden" style="padding-right:1px;width: 50%;">
+                                        <div class="col s5 btn-network hidden" style="padding-right:1px;width: 50%;">
                                             <div class="select-wrapper initialized" style='width: 61%;float: left;'>
                                                 <input type="text" class="select-dropdown" data-activates=""
                                                     id='ipAddress' placeholder="请输入ip地址">

+ 1 - 0
python/index.js

@@ -495,6 +495,7 @@ function styled() {
     $("body").css("font-family", "Arial");
     $("input").css("font-family", "Arial");
     $("#downloadbutton-li").css("right", "62px");
+    $("#uploadpy").css("width","120px");
   }
 }
 

+ 2 - 2
src/blockly/cocoblockly.js

@@ -1378,13 +1378,13 @@ async function cocoblockly() {
         // for (var i = 0; i < $('.Hardware2').length - 1; i++) {
         //     $('.HarxA')[i].className = 'Hardware2 HarxA max'
         // }
-        $("#python_SourceCode")[0].style.marginLeft = '5px';
+        $("#python_SourceCode")[0].style.marginLeft = '0px';
         // $("#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 = '5px';
+        $("#python_SourceCode")[0].style.marginLeft = '0px';
         // $("#repl_delete")[0].style.left = '260px'
     }
     // (function() {