From 39b277e44f2882fa91e0f61738bb529c9b22e7e8 Mon Sep 17 00:00:00 2001 From: d11e9 Date: Sun, 30 Aug 2015 22:11:33 +0000 Subject: [PATCH 01/13] ui tidy and show syntax errors in editor --- index.html | 797 +++++++++++++++++++++++++++------------------------ solidity.svg | 91 ++---- 2 files changed, 445 insertions(+), 443 deletions(-) diff --git a/index.html b/index.html index 5c334f02f4..3c16bac11b 100644 --- a/index.html +++ b/index.html @@ -12,67 +12,135 @@ body { font-size: 12px; color: #111111; } -#solIcon { - right: 10px; - top: 10px; +#editor { position: absolute; - height: 100px; - width: 100px; - overflow: hidden; -} -#solIcon img { - top: -20px; - right: -10px; - position: absolute; - height: 100px; + top: 0; + left: 0px; + width: auto; + bottom: 0px; + right: 32em; + } -#optimizeBox { +#input { + font-size: 15px; position: absolute; - top: 30px; - left: 720px; - font-size: 14px; + top: 0; + left: 0; + right: 0; + bottom: 0; } -#input { + +#righthand-panel { position: absolute; - top: 120px; - left: 0px; - width: 700px; + top: 0; + width: 32em; + right: 0; bottom: 0px; - font-size: 15px; + overflow: auto; + border-left: 1px solid #ccc; } + #output { + border-top: 1px solid #ccc; position: absolute; - top: 120px; - left: 720px; - right: 10px; + top: 18em; + width: 32em; + right: 0; bottom: 0px; - font-size: 14px; - overflow: auto; } + #header { - margin-bottom: 4px; + font-size: 14px; + padding: 1em; + font-size: 12px; + height: 18em; +} + +#header h1 { + margin-top: 0; } + +#header .info { clear: left; } + +#header #solIcon { + float: left; + height: 5em; +} + .col1 { - width: 18ex; - display: inline-block; + width: 30%; + float: left; } .col2 { - width: 60ex; - display: inline-block; + width: 70%; + float: left; +} + +.row { + overflow: auto; } .gethDeployText { border-color: #bebebe; - height: 2.5ex; + height: 2.5em; + width: 100%; + display: block; } .runButton { - width: 30ex; + width: 16em; text-align: left; overflow: hidden; + margin-right: 0.6em; } .contractInstance { - margin-left: 2ex; + margin-left: 2em; margin-bottom: 20px; } + + +.contractOutput { + border-bottom: 1px solid #ccc; + padding: 0.4em; + box-sizing: border-box; +} + +.contractOutput .title { + margin: 0; + cursor: pointer; +} + +.contractOutput .body { + display: none; + margin-top: 10px; +} + +.contractOutput.show .body { + display: block; +} + +.contractOutput .title:before { + content: "\25B6"; + color: #ccc; + margin-right: 0.4em; + font-size: 10px; +} + +.contractOutput.show .title:before { + content: "\25BC"; +} + + +.solError { + position: absolute; + background-color: rgba(255, 0, 0, 0.5); + z-index:40; +} + +.error { + background-color: rgba(255, 0, 0, 0.5); + border-radius: 0; + border: 0 none; +} + @@ -82,367 +150,338 @@ body { -
-

Solidity realtime compiler and runtime

-Version: (loading)
-Execution environment does not connect to any node, everyhing is in-memory only.
-Note: If Chrome/Chromium reports "Uncaught JavaScript Exception", -enable the debug console (Ctrl+Shift+i) and reload. -
- -
-
contract Ballot { +
+
contract Ballot { struct Voter { uint weight; - bool voted; + bool voted uint8 vote; address delegate; } struct Proposal { uint voteCount; } +} +
+
- address chairperson; - mapping(address => Voter) voters; - Proposal[] proposals; +
+ +
+
- // Create a new ballot with $(_numProposals) different proposals. - function Ballot(uint8 _numProposals) { - chairperson = msg.sender; - voters[chairperson].weight = 1; - proposals.length = _numProposals; - } + + var inputField = $('').attr('placeholder', inputs); + var outputSpan = $('
'); + var button = $('