refactoring

This commit is contained in:
Silver Kuusik 2018-01-28 10:36:50 +01:00
parent 7615a86a4d
commit fe28b73ec0
41 changed files with 47 additions and 150 deletions

View File

Before

Width:  |  Height:  |  Size: 43 B

After

Width:  |  Height:  |  Size: 43 B

View File

Before

Width:  |  Height:  |  Size: 326 B

After

Width:  |  Height:  |  Size: 326 B

View File

Before

Width:  |  Height:  |  Size: 766 B

After

Width:  |  Height:  |  Size: 766 B

View File

Before

Width:  |  Height:  |  Size: 198 B

After

Width:  |  Height:  |  Size: 198 B

View File

Before

Width:  |  Height:  |  Size: 796 B

After

Width:  |  Height:  |  Size: 796 B

View File

Before

Width:  |  Height:  |  Size: 738 B

After

Width:  |  Height:  |  Size: 738 B

View File

Before

Width:  |  Height:  |  Size: 4.0 KiB

After

Width:  |  Height:  |  Size: 4.0 KiB

View File

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

6
assets/css/cookieconsent.min.css vendored Normal file
View File

@ -0,0 +1,6 @@
.cc-window{opacity:1;transition:opacity 1s ease}.cc-window.cc-invisible{opacity:0}.cc-animate.cc-revoke{transition:transform 1s ease}.cc-animate.cc-revoke.cc-top{transform:translateY(-2em)}.cc-animate.cc-revoke.cc-bottom{transform:translateY(2em)}.cc-animate.cc-revoke.cc-active.cc-bottom,.cc-animate.cc-revoke.cc-active.cc-top,.cc-revoke:hover{transform:translateY(0)}.cc-grower{max-height:0;overflow:hidden;transition:max-height 1s}
.cc-link,.cc-revoke:hover{text-decoration:underline}.cc-revoke,.cc-window{position:fixed;overflow:hidden;box-sizing:border-box;font-family:Helvetica,Calibri,Arial,sans-serif;font-size:16px;line-height:1.5em;display:-ms-flexbox;display:flex;-ms-flex-wrap:nowrap;flex-wrap:nowrap;z-index:9999}.cc-window.cc-static{position:static}.cc-window.cc-floating{padding:2em;max-width:24em;-ms-flex-direction:column;flex-direction:column}.cc-window.cc-banner{padding:1em 1.8em;width:100%;-ms-flex-direction:row;flex-direction:row}.cc-revoke{padding:.5em}.cc-header{font-size:18px;font-weight:700}.cc-btn,.cc-close,.cc-link,.cc-revoke{cursor:pointer}.cc-link{opacity:.8;display:inline-block;padding:.2em}.cc-link:hover{opacity:1}.cc-link:active,.cc-link:visited{color:initial}.cc-btn{display:block;padding:.4em .8em;font-size:.9em;font-weight:700;border-width:2px;border-style:solid;text-align:center;white-space:nowrap}.cc-banner .cc-btn:last-child{min-width:140px}.cc-highlight .cc-btn:first-child{background-color:transparent;border-color:transparent}.cc-highlight .cc-btn:first-child:focus,.cc-highlight .cc-btn:first-child:hover{background-color:transparent;text-decoration:underline}.cc-close{display:block;position:absolute;top:.5em;right:.5em;font-size:1.6em;opacity:.9;line-height:.75}.cc-close:focus,.cc-close:hover{opacity:1}
.cc-revoke.cc-top{top:0;left:3em;border-bottom-left-radius:.5em;border-bottom-right-radius:.5em}.cc-revoke.cc-bottom{bottom:0;left:3em;border-top-left-radius:.5em;border-top-right-radius:.5em}.cc-revoke.cc-left{left:3em;right:unset}.cc-revoke.cc-right{right:3em;left:unset}.cc-top{top:1em}.cc-left{left:1em}.cc-right{right:1em}.cc-bottom{bottom:1em}.cc-floating>.cc-link{margin-bottom:1em}.cc-floating .cc-message{display:block;margin-bottom:1em}.cc-window.cc-floating .cc-compliance{-ms-flex:1;flex:1}.cc-window.cc-banner{-ms-flex-align:center;align-items:center}.cc-banner.cc-top{left:0;right:0;top:0}.cc-banner.cc-bottom{left:0;right:0;bottom:0}.cc-banner .cc-message{-ms-flex:1;flex:1}.cc-compliance{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-line-pack:justify;align-content:space-between}.cc-compliance>.cc-btn{-ms-flex:1;flex:1}.cc-btn+.cc-btn{margin-left:.5em}
@media print{.cc-revoke,.cc-window{display:none}}@media screen and (max-width:900px){.cc-btn{white-space:normal}}@media screen and (max-width:414px) and (orientation:portrait),screen and (max-width:736px) and (orientation:landscape){.cc-window.cc-top{top:0}.cc-window.cc-bottom{bottom:0}.cc-window.cc-banner,.cc-window.cc-left,.cc-window.cc-right{left:0;right:0}.cc-window.cc-banner{-ms-flex-direction:column;flex-direction:column}.cc-window.cc-banner .cc-compliance{-ms-flex:1;flex:1}.cc-window.cc-floating{max-width:none}.cc-window .cc-message{margin-bottom:1em}.cc-window.cc-banner{-ms-flex-align:unset;align-items:unset}}
.cc-floating.cc-theme-classic{padding:1.2em;border-radius:5px}.cc-floating.cc-type-info.cc-theme-classic .cc-compliance{text-align:center;display:inline;-ms-flex:none;flex:none}.cc-theme-classic .cc-btn{border-radius:5px}.cc-theme-classic .cc-btn:last-child{min-width:140px}.cc-floating.cc-type-info.cc-theme-classic .cc-btn{display:inline-block}
.cc-theme-edgeless.cc-window{padding:0}.cc-floating.cc-theme-edgeless .cc-message{margin:2em 2em 1.5em}.cc-banner.cc-theme-edgeless .cc-btn{margin:0;padding:.8em 1.8em;height:100%}.cc-banner.cc-theme-edgeless .cc-message{margin-left:1em}.cc-floating.cc-theme-edgeless .cc-btn+.cc-btn{margin-left:0}

Binary file not shown.

View File

@ -1,6 +1,12 @@
/* load the Orbitron font */
@font-face {
font-family: Orbitron;
src: url(fonts/orbitron-medium-webfont.woff);
}
html, body { html, body {
height: 100%; height: 100%;
font-family: "Orbitron" !important; font-family: Orbitron !important;
} }
body { body {
overflow: hidden; overflow: hidden;
@ -104,6 +110,7 @@ div#readOnlyBlocklyCode {
height: 100%; height: 100%;
font-size: 1.3em; font-size: 1.3em;
} }
/* for desktop screen */ /* for desktop screen */
@media screen and (min-width: 1000px) { @media screen and (min-width: 1000px) {
/* logo object */ /* logo object */
@ -149,6 +156,7 @@ div#readOnlyBlocklyCode {
height: 100%; height: 100%;
} }
} }
/* for mobile and tablet screen */ /* for mobile and tablet screen */
@media screen and (max-width: 1000px) { @media screen and (max-width: 1000px) {
/* logo object */ /* logo object */

View File

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 27 KiB

12
assets/js/cookie.js Normal file
View File

@ -0,0 +1,12 @@
window.addEventListener("load", function() {
window.cookieconsent.initialise({
"palette": {
"popup": {
"background": "#242943ff"
},
"button": {
"background": "#ffd500ff"
}
}
})
});

1
assets/js/cookieconsent.min.js vendored Normal file

File diff suppressed because one or more lines are too long

View File

@ -318,7 +318,7 @@ window.onload = function() {
var blocklyDiv = document.getElementById('blocklyDiv'); var blocklyDiv = document.getElementById('blocklyDiv');
workspace = Blockly.inject(blocklyDiv, { workspace = Blockly.inject(blocklyDiv, {
scrollbars: false, scrollbars: false,
media: 'media/', media: 'assets/blockly/media/',
trashcan: true, trashcan: true,
sounds: true, sounds: true,
zoom: { zoom: {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.5 KiB

View File

@ -1,9 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<browserconfig>
<msapplication>
<tile>
<square150x150logo src="/mstile-150x150.png"/>
<TileColor>#da532c</TileColor>
</tile>
</msapplication>
</browserconfig>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

View File

@ -1,18 +0,0 @@
{
"name": "",
"icons": [
{
"src": "/android-chrome-192x192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "/android-chrome-512x512.png",
"sizes": "512x512",
"type": "image/png"
}
],
"theme_color": "#ffffff",
"background_color": "#ffffff",
"display": "standalone"
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.5 KiB

View File

@ -1,87 +0,0 @@
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN"
"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
<svg version="1.0" xmlns="http://www.w3.org/2000/svg"
width="640.000000pt" height="640.000000pt" viewBox="0 0 640.000000 640.000000"
preserveAspectRatio="xMidYMid meet">
<metadata>
Created by potrace 1.11, written by Peter Selinger 2001-2013
</metadata>
<g transform="translate(0.000000,640.000000) scale(0.100000,-0.100000)"
fill="#000000" stroke="none">
<path d="M762 5235 c-210 -46 -395 -212 -467 -422 -13 -37 -26 -88 -29 -113
-2 -25 -5 -254 -5 -510 l-1 -465 -125 -65 -125 -65 2 -258 3 -259 115 -70 c63
-38 118 -73 122 -76 4 -4 8 -232 10 -507 4 -485 4 -502 26 -564 63 -182 218
-344 392 -409 77 -28 107 -32 253 -37 l127 -5 0 220 0 220 -97 0 c-110 0 -161
17 -207 66 -60 65 -59 54 -59 573 l0 476 -41 34 c-79 64 -122 100 -264 216
l-142 117 83 66 c46 37 101 81 122 97 21 17 84 67 140 112 l102 82 0 473 c1
518 0 518 61 581 51 54 86 65 220 66 l82 1 0 220 0 220 -117 -1 c-65 0 -146
-7 -181 -14z"/>
<path d="M3105 5241 c-181 -44 -310 -221 -298 -409 11 -184 136 -325 326 -366
l27 -6 0 -133 0 -132 -772 -1 c-425 0 -791 -4 -813 -8 -90 -15 -186 -82 -241
-167 -43 -69 -56 -138 -56 -310 l-1 -159 -166 0 c-129 0 -172 -3 -187 -14 -18
-14 -19 -31 -20 -450 -1 -421 -1 -436 18 -453 17 -16 42 -18 177 -19 87 0 163
-4 169 -8 7 -4 10 -61 10 -161 0 -174 12 -231 62 -307 47 -70 133 -136 205
-155 17 -4 764 -8 1660 -8 l1630 0 58 23 c108 44 203 163 222 280 4 24 7 108
7 188 -1 141 0 144 21 145 12 0 86 1 165 1 122 1 146 3 165 18 l22 18 1 433
c1 408 0 433 -17 450 -17 17 -37 19 -188 19 l-169 0 0 156 c0 86 -6 178 -12
206 -33 137 -154 252 -290 276 -25 4 -391 7 -815 7 l-770 0 3 131 3 132 50 12
c68 17 135 55 189 110 207 207 118 564 -162 652 -60 18 -157 22 -213 9z m-810
-1706 c201 -53 342 -228 349 -435 10 -274 -208 -493 -484 -484 -256 7 -457
225 -448 484 4 125 45 218 137 311 122 122 282 166 446 124z m2070 -7 c188
-61 316 -232 324 -433 10 -250 -195 -470 -444 -479 -275 -11 -500 210 -489
479 3 82 5 92 33 165 82 217 349 341 576 268z"/>
<path d="M5330 5032 l0 -219 109 -5 c98 -4 114 -7 150 -31 48 -32 87 -81 96
-124 3 -17 6 -245 7 -505 0 -462 0 -475 20 -487 16 -10 169 -129 298 -233 14
-11 49 -38 77 -60 41 -31 50 -43 40 -52 -6 -6 -107 -89 -224 -184 l-211 -173
-1 -464 c0 -286 -4 -479 -10 -503 -13 -46 -62 -99 -116 -123 -30 -14 -65 -19
-137 -19 l-98 0 0 -220 0 -220 128 4 c142 4 199 15 287 54 135 59 259 179 320
308 60 127 58 108 62 644 3 367 7 498 16 506 7 7 53 37 102 68 50 30 99 62
110 71 18 14 19 29 20 262 0 166 -4 250 -11 258 -6 6 -61 40 -122 75 l-111 65
-1 470 c-1 259 -3 481 -6 495 -36 211 -142 370 -315 473 -105 62 -174 79 -336
85 l-143 4 0 -220z"/>
<path d="M2094 1660 c0 -132 2 -241 5 -242 3 0 73 -2 155 -3 l149 -2 31 27 31
28 0 113 c2 189 -8 199 -177 199 l-113 0 0 57 0 58 -41 3 -40 3 0 -241z m286
-25 c3 -33 4 -78 2 -100 l-4 -40 -91 1 c-51 1 -97 2 -102 3 -8 1 -13 151 -6
192 1 4 45 6 99 5 l97 -1 5 -60z"/>
<path d="M4149 1888 c0 -7 0 -34 1 -60 l1 -46 -120 -4 c-114 -3 -122 -4 -146
-29 -25 -24 -26 -30 -27 -147 -1 -131 9 -164 55 -181 12 -4 87 -7 167 -7 l145
1 3 243 2 242 -40 0 c-25 0 -40 -5 -41 -12z m-1 -287 c1 -52 -1 -97 -7 -100
-8 -5 -122 -6 -183 -2 -16 1 -18 12 -17 93 0 51 2 95 4 98 2 3 48 5 102 5 l98
0 3 -94z"/>
<path d="M4295 1888 c-3 -11 -1 -48 4 -68 0 -3 18 -5 38 -5 38 0 38 0 39 43
l0 42 -38 0 c-22 0 -40 -5 -43 -12z"/>
<path d="M1149 1865 c-1 0 -2 -102 -3 -227 l-2 -227 40 2 c45 2 41 -10 45 120
l1 37 73 0 72 -1 66 -77 c63 -74 69 -78 108 -79 23 0 44 3 47 8 3 5 -20 39
-52 76 l-57 68 33 6 c60 13 74 38 76 137 1 96 -12 136 -48 149 -16 5 -379 13
-399 8z m361 -84 c5 -1 5 -32 1 -113 -1 -15 -17 -17 -141 -17 -86 -1 -140 3
-141 9 0 6 0 30 0 55 0 25 0 49 0 54 1 5 11 11 24 13 18 2 239 2 257 -1z"/>
<path d="M2949 1836 c-1 -37 -1 -383 0 -408 1 -13 10 -17 41 -16 l40 0 0 94 0
94 53 -1 c34 -1 57 -7 67 -18 8 -9 40 -45 70 -81 30 -36 60 -70 66 -76 12 -13
91 -17 99 -4 5 8 -64 96 -132 170 -18 19 -33 40 -33 46 0 6 38 58 85 114 46
57 82 106 80 110 -2 4 -25 7 -49 7 -44 0 -46 -1 -120 -92 l-76 -92 -55 -1 -55
-1 0 95 0 94 -40 -2 c-37 -1 -40 -3 -41 -32z"/>
<path d="M1703 1764 c-39 -19 -43 -36 -44 -175 -2 -164 7 -173 175 -175 128
-2 165 7 186 45 5 11 10 74 10 141 0 121 0 122 -29 151 -29 29 -30 29 -148 29
-87 0 -126 -5 -150 -16z m243 -164 c1 -52 -2 -97 -6 -100 -5 -3 -50 -5 -102
-5 l-93 1 -3 89 c-2 48 -1 93 1 100 3 7 40 11 104 10 l99 0 0 -95z"/>
<path d="M2564 1770 c-46 -18 -54 -46 -54 -178 0 -122 0 -124 28 -151 28 -28
28 -28 161 -27 132 1 133 1 157 29 23 26 24 35 24 152 0 117 -1 125 -25 153
l-25 30 -122 1 c-68 0 -133 -4 -144 -9z m233 -170 c1 -52 -2 -97 -7 -100 -4
-3 -50 -5 -102 -5 l-93 1 -3 93 c-2 57 1 97 7 101 6 3 52 6 103 5 l93 0 2 -95z"/>
<path d="M3473 1756 l-28 -24 0 -134 c0 -181 5 -186 192 -184 119 1 123 2 149
28 27 26 27 30 28 147 0 182 -9 191 -194 191 -111 0 -121 -2 -147 -24z m257
-158 c0 -71 -3 -98 -12 -99 -7 0 -52 -2 -100 -3 -73 -2 -88 1 -89 13 -4 39 -4
167 -2 177 2 6 42 10 103 10 l100 -1 0 -97z"/>
<path d="M4298 1773 c-2 -4 -4 -87 -4 -183 l1 -175 41 0 42 -1 -2 181 -1 180
-37 3 c-20 2 -38 -1 -40 -5z"/>
<path d="M4442 1597 l1 -183 41 0 41 1 0 138 c0 86 3 138 10 138 5 1 52 2 103
3 l92 1 0 -140 0 -141 40 -1 c46 -1 42 -18 42 171 0 194 -3 196 -222 196
l-148 0 0 -183z"/>
<path d="M4899 1751 c-29 -29 -29 -30 -29 -155 0 -118 1 -127 24 -153 24 -27
26 -28 138 -28 64 0 116 -4 120 -10 4 -5 8 -20 8 -32 0 -23 -2 -23 -115 -23
l-115 0 0 -40 0 -40 129 0 c125 0 129 1 155 26 28 29 28 30 26 319 0 109 -1
110 -30 138 -30 26 -33 27 -156 27 -125 0 -126 0 -155 -29z m256 -156 l0 -100
-93 0 c-52 0 -98 2 -102 5 -6 4 -8 192 -1 196 0 0 45 0 99 -1 l97 -1 0 -99z"/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 5.5 KiB

View File

@ -3,47 +3,31 @@
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<title>Sumorobot</title> <title>Sumorobot</title>
<link rel="stylesheet" href="styles.css"> <!-- css -->
<link rel="stylesheet" href="bootstrap.min.css"> <link rel="stylesheet" href="assets/css/styles.css">
<link href="https://fonts.googleapis.com/css?family=Orbitron" rel="stylesheet"> <link rel="stylesheet" href="assets/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/cookieconsent2/3.0.3/cookieconsent.min.css"> <link rel="stylesheet" type="text/css" href="assets/css/cookieconsent.min.css">
<!-- begin favicon --> <!-- favicon -->
<link rel="apple-touch-icon" sizes="180x180" href="favicons/apple-touch-icon.png"> <link rel="icon" type="image/png" sizes="32x32" href="assets/img/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="32x32" href="favicons/favicon-32x32.png"> <!-- cookie notification -->
<link rel="icon" type="image/png" sizes="16x16" href="favicons/favicon-16x16.png"> <script src="assets/js/cookieconsent.min.js" type="text/javascript" charset="utf-8"></script>
<link rel="manifest" href="favicons/manifest.json"> <script src="assets/js/cookie.js" type="text/javascript" charset="utf-8"></script>
<link rel="mask-icon" href="favicons/safari-pinned-tab.svg" color="#5bbad5"> <!-- Google Blockly -->
<meta name="theme-color" content="#ffffff"> <script src="assets/blockly/blockly_compressed.js" type="text/javascript" charset="utf-8"></script>
<!-- end of favicon --> <script src="assets/blockly/blocks_compressed.js" type="text/javascript" charset="utf-8"></script>
<script src="jquery.min.js" type="text/javascript" charset="utf-8"></script> <script src="assets/blockly/python_compressed.js" type="text/javascript" charset="utf-8"></script>
<script src="blockly_compressed.js" type="text/javascript" charset="utf-8"></script> <script src="assets/blockly/msg/js/en.js" type="text/javascript" charset="utf-8"></script>
<script src="blocks_compressed.js" type="text/javascript" charset="utf-8"></script> <script src="assets/js/jquery.min.js" type="text/javascript" charset="utf-8"></script>
<script src="python_compressed.js" type="text/javascript" charset="utf-8"></script> <script src="assets/js/sumorobot.js" type="text/javascript" charset="utf-8"></script>
<script src="msg/js/en.js" type="text/javascript" charset="utf-8"></script> <!-- ace editor -->
<script src="sumorobot.js" type="text/javascript" charset="utf-8"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/ace/1.2.9/ace.js" type="text/javascript" charset="utf-8"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/ace/1.2.9/ace.js" type="text/javascript" charset="utf-8"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/ace/1.2.9/ext-language_tools.js" type="text/javascript" charset="utf-8"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/ace/1.2.9/ext-language_tools.js" type="text/javascript" charset="utf-8"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/cookieconsent2/3.0.3/cookieconsent.min.js"></script>
<script>
window.addEventListener("load", function() {
window.cookieconsent.initialise({
"palette": {
"popup": {
"background": "#242943ff"
},
"button": {
"background": "#ffd500ff"
}
}
})
});
</script>
</head> </head>
<body> <body>
<div id="battery">Disconnected</div> <div id="battery">Disconnected</div>
<div id="panel"> <div id="panel">
<img class="logo" src="logo.png" alt="logo"> <img class="logo" src="assets/img/logo.png" alt="logo">
<div class="input-group"> <div class="input-group">
<span class="input-group-addon" id="robot-label">robot name</span> <span class="input-group-addon" id="robot-label">robot name</span>
<input type="text" class="form-control" id="robot-id" placeholder="sumo-ID" /> <input type="text" class="form-control" id="robot-id" placeholder="sumo-ID" />