panweitong 4 years ago
parent
commit
7a8a6db318
8 changed files with 49 additions and 11 deletions
  1. 38 4
      index.css
  2. 2 2
      index.html
  3. 4 0
      index.js
  4. 1 1
      msg/en.js
  5. 1 1
      msg/zh-hans.js
  6. 1 1
      msg/zh-hant.js
  7. 1 1
      python/src/blockly/cocoblockly.js
  8. 1 1
      src/blockly/cocoblockly.js

+ 38 - 4
index.css

@@ -81,7 +81,7 @@ body>.shadowbox {
     }
     #sketch_name {
         margin-left: 0 !important;
-        width: 100px !important;
+        /* width: 100px !important; */
     }
 }
 
@@ -836,7 +836,7 @@ ul, li {
     display: inline-block;
     bottom: 0;
     position: absolute;
-    left: 170px;
+    left: 130px;
     padding: 0px 10px;
     color: #2D2F33;
 }
@@ -846,7 +846,7 @@ ul, li {
     display: inline-block;
     bottom: 0;
     position: absolute;
-    left: 300px;
+    left: 260px;
     padding: 0px 10px;
     color: #2D2F33;
 }
@@ -1205,5 +1205,39 @@ table td, th {
     transform: translateY(5px);
 }
 
+.display_switch_box2{
+    
+}
+
+@media only screen and (max-width: 1700px){
+    .switch_box2 {
+        cursor: pointer;
+        display: none;
+        bottom: 0;
+        position: absolute;
+        left: 260px;
+        padding: 0px 10px;
+        color: #2D2F33;
+    }
+
+    .display_switch_box2{
+        display: inline-block;
+    }
 
- 
+    .switch_select {
+        background: #fff;
+        /* border-radius: 13px 15px 0px 0px; */
+        color: #4A6AFF;
+        font-weight: 700;
+    }
+}
+
+@media only screen and (max-width: 1280px){
+    .switch_box1 {
+        left: 120px;
+    }
+
+    .switch_box2 {
+        left: 250px;
+    }
+}

+ 2 - 2
index.html

@@ -884,7 +884,7 @@
                                     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
                                             translatable_pythonSourceCode switch_box switch_select"
-                                        style='margin-left: 25px;'>Python
+                                        style='margin-left: 1px;'>Python
                                         Source Code</span> <span id="Serial_Interaction"
                                         class="header-text translatable_serial_plotter switch_box1">串口数据显示</span>
 
@@ -909,7 +909,7 @@
                                     <img class="fullscreenIcon hidden" src="./images/icon-fullscreen-exit.svg">
 
                                     <i id="repl_delete" class="material-icons sketch_name_icon right"
-                                        style="margin-left: 20px;cursor: pointer;position: absolute;top: 12px;right: 12px;display:none;">delete</i>
+                                        style="margin-left: 20px;cursor: pointer;position: absolute;top: 12px;right: -4px;display:none;">delete</i>
                                 </div>
                                 <div class="card-content"
                                     style="position:relative;height: calc(100% - 45px);overflow:auto;" id="python_box">

+ 4 - 0
index.js

@@ -484,6 +484,8 @@ function styled() {
     $("#local_help").addClass("helpEnglish");
     $("#local_help_ai_kit").css("left", "528px");
     $("#help_extends").css("left", "528px");
+    $("#Serial_Interaction").css("left","120px");
+    $("#Serial_Display").css("left","260px");
   }
 }
 
@@ -1092,6 +1094,7 @@ function switchCC(e) {
       replbox.className = "card-content"
       repl_delete.style.display = "none";
       $('#switchSerial1').click();
+      $("#Serial_Display").addClass("display_switch_box2");
       $(".blockpy-toolbar-edit").css({
         "display": "none"
       });
@@ -1129,6 +1132,7 @@ function switchCC(e) {
       pythonbox.className = "card-content"
       replbox.className = "card-content hidden"
       repl_delete.style.display = "none";
+      $("#Serial_Display").removeClass("display_switch_box2");
       $(".blockpy-toolbar-edit").css({
         "display": "block"
       });

+ 1 - 1
msg/en.js

@@ -138,7 +138,7 @@ Ardublockly.LOCALISED_TEXT = {
     cancel: "Cancel",
 
     /* Arduino Source Code Panel */
-    pythonSourceCode: "Python Source Code",
+    pythonSourceCode: "Python Code",
     blocksXml: "Upload Area",
 
     /* Serial Monitor Panel */

+ 1 - 1
msg/zh-hans.js

@@ -135,7 +135,7 @@ Ardublockly.LOCALISED_TEXT = {
     return: "确认",
 
     /* Arduino Source Code Panel */
-    pythonSourceCode: "Python代码",
+    pythonSourceCode: "Python代码",
     blocksXml: "上传区",
 
     /* Serial Monitor Panel */

+ 1 - 1
msg/zh-hant.js

@@ -136,7 +136,7 @@ Ardublockly.LOCALISED_TEXT = {
     return: "確認",
 
     /* Arduino Source Code Panel */
-    pythonSourceCode: "Python 程式碼",
+    pythonSourceCode: "Python程式碼",
     blocksXml: "上載區",
 
     /* Serial Monitor Panel */

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

@@ -1381,7 +1381,7 @@ async function cocoblockly() {
         // 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 = '1px';
         // $("#repl_delete")[0].style.left = '260px'
     }
     // (function() {

+ 1 - 1
src/blockly/cocoblockly.js

@@ -1381,7 +1381,7 @@ async function cocoblockly() {
         // 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 = '1px';
         // $("#repl_delete")[0].style.left = '260px'
     }
     // (function() {