From 7a9e10fb5f2c5f18066e6774a03b130559935aaa Mon Sep 17 00:00:00 2001 From: Torsten Ruger Date: Wed, 4 Apr 2018 13:16:59 +0300 Subject: [PATCH] 5 registers per row for better view --- assets/css/app.css.sass | 98 ++++++++++++++++++++++++++++++++++++ assets/css/app.css.scss | 104 --------------------------------------- assets/css/menu.css.sass | 56 +++++++++++++++++++++ assets/css/menu.css.scss | 60 ---------------------- config.ru | 4 +- lib/views/object_view.rb | 2 +- lib/views/switch_view.rb | 3 +- 7 files changed, 159 insertions(+), 168 deletions(-) create mode 100644 assets/css/app.css.sass delete mode 100644 assets/css/app.css.scss create mode 100644 assets/css/menu.css.sass delete mode 100644 assets/css/menu.css.scss diff --git a/assets/css/app.css.sass b/assets/css/app.css.sass new file mode 100644 index 0000000..7ffe05f --- /dev/null +++ b/assets/css/app.css.sass @@ -0,0 +1,98 @@ +// Place your apps css here +@import "susy" + + +$susy: ( columns: 5 , gutter-position: split ) + +.one_class + margin: 10px + + +.classes + @include span(12%) + + +.source_view + @include span(23%) + + +.instruction_view + @include span(23%) + + +.status_view + @include span(23%) + line-height : 1.25em + + +.labels_view + @include span(1) + margin-right: span(1) + height: 200px + + +.registers_view + @include span(80%) + .register_view + @include gallery(1) + margin-top: 10px + + + +.field + @include span(5) + + +.value + @include span(18) + + +.value_head + background-color: #C5FFD9 + + +.statement + margin-left: 10px + + +.ticker + text-align: right + + +.act + background-color: #00B3FF + -moz-border-radius: 7px + -webkit-border-radius: 7px + font-size: 100% + +.crawl + background-color: #009900 + -moz-border-radius: 7px + -webkit-border-radius: 7px + +.run + background-color: #00CC33 + -moz-border-radius: 7px + -webkit-border-radius: 7px + +.wizz + background-color: #00FF66 + -moz-border-radius: 7px + -webkit-border-radius: 7px + + +.bright + padding-right: 6px + padding-left: 6px + background-color: #00E3FF + -moz-border-radius: 7px + -webkit-border-radius: 7px + + +.fade_in + transition: background-color 100ms linear + padding-right: 6px + padding-left: 6px + background-color: #00E3FF + -moz-border-radius: 7px + -webkit-border-radius: 7px diff --git a/assets/css/app.css.scss b/assets/css/app.css.scss deleted file mode 100644 index 2f3ad06..0000000 --- a/assets/css/app.css.scss +++ /dev/null @@ -1,104 +0,0 @@ -// Place your apps css here -@import "susy"; - - -$susy: ( - columns: 24 , - gutter-position: split , -); - -.debugger_view { @include container(90%); } - -.one_class { - margin: 10px; -} - -.classes { - @include span(4); -} - -.source_view { - @include span(7); - margin-left: span(1); -} - -.instruction_view { @include span(9); } - -.status_view { - @include span(3 at 21); - line-height : 1.25em; -} - -.labels_view { - @include span(3); - margin-right: span(1); - height: 200px; -} - -.registers_view { - @include span(20 at 3); -} - -.register_view { - @include gallery(4); - margin-top: 10px; -} - -.field { - @include span(5) -} - -.value { - @include span(18) -} - -.value_head { - background-color: #C5FFD9; -} - -.statement { - margin-left: 10px; -} - -.ticker{ - text-align: right; -} - -.act{ - background-color: #00B3FF; - -moz-border-radius: 7px; - -webkit-border-radius: 7px; - font-size: 100%; -} -.crawl{ - background-color: #009900; - -moz-border-radius: 7px; - -webkit-border-radius: 7px; -} -.run{ - background-color: #00CC33; - -moz-border-radius: 7px; - -webkit-border-radius: 7px; -} -.wizz{ - background-color: #00FF66; - -moz-border-radius: 7px; - -webkit-border-radius: 7px; -} - -.bright { - padding-right: 6px; - padding-left: 6px; - background-color: #00E3FF ; - -moz-border-radius: 7px; - -webkit-border-radius: 7px; -} - -.fade_in { - transition: background-color 100ms linear; - padding-right: 6px; - padding-left: 6px; - background-color: #00E3FF ; - -moz-border-radius: 7px; - -webkit-border-radius: 7px; -} diff --git a/assets/css/menu.css.sass b/assets/css/menu.css.sass new file mode 100644 index 0000000..3d736fe --- /dev/null +++ b/assets/css/menu.css.sass @@ -0,0 +1,56 @@ +body + font-family: arial, helvetica, serif + + +#nav, #nav ul /* all lists */ + padding: 0 + margin: 0 + list-style: none + float: left + width: 190px + border-radius: 8px + background: #fff + border: 1px solid #C3D46A + + +#nav li /* all list items */ + position: relative + float: left + line-height: 1.25em + width: 180px + + +#nav li ul /* second-level lists */ + position: absolute + left: -999em + margin-left: 185px + margin-top: -2.7em + + +#nav li ul ul /* third-and-above-level lists */ + left: -999em + + +#nav li a , li span + padding-left: 5px + width: 180px + display: block + color: black + font-weight: bold + text-decoration: none + background-color: white + border-radius: 7px + + +#nav li a:hover + color: white + background-color: #98CC1F + + +#nav li:hover ul ul, #nav li:hover ul ul ul , #nav li:hover ul ul ul ul , #nav li:hover ul ul ul ul ul + left: -999em + + +/* lists nested under hovered list items */ +#nav li:hover ul, #nav li li:hover ul, #nav li li li:hover ul, #nav li li li li:hover ul , #nav li li li li li:hover ul + left: auto diff --git a/assets/css/menu.css.scss b/assets/css/menu.css.scss deleted file mode 100644 index fdd376b..0000000 --- a/assets/css/menu.css.scss +++ /dev/null @@ -1,60 +0,0 @@ -body { - font-family: arial, helvetica, serif; -} - -#nav, #nav ul { /* all lists */ - padding: 0; - margin: 0; - list-style: none; - float : left; - width : 10em; - /*border around submenu goes here*/ - -moz-border-radius: 8px; - -webkit-border-radius: 8px; - background:#fff; - border:1px solid #C3D46A -} - -#nav li { /* all list items */ - position : relative; - float : left; - line-height : 1.25em; - width: 9em; -} - -#nav li ul { /* second-level lists */ - position : absolute; - left: -999em; - margin-left : 10.0em; - margin-top : -2.7em; -} - -#nav li ul ul { /* third-and-above-level lists */ - left: -999em; -} - -#nav li a , li span { - padding-left: 0.5em; - width : 9.5em; - display : block; - color : black; - font-weight : bold; - text-decoration : none; - background-color : white; - -moz-border-radius: 7px; - -webkit-border-radius: 7px; -} - -#nav li a:hover { - color : white; - background-color : #98CC1F; -} - -#nav li:hover ul ul, #nav li:hover ul ul ul , #nav li:hover ul ul ul ul , #nav li:hover ul ul ul ul ul{ - left: -999em; -} - -/* lists nested under hovered list items */ -#nav li:hover ul, #nav li li:hover ul, #nav li li li:hover ul, #nav li li li li:hover ul , #nav li li li li li:hover ul { - left: auto; -} diff --git a/config.ru b/config.ru index 03d6617..a2463e9 100644 --- a/config.ru +++ b/config.ru @@ -29,8 +29,8 @@ run Opal::Server.new { |s| s.main = 'debugger.js.rb' s.append_path 'lib' s.append_path 'assets' -# s.debug = !ENV["DEBUG"].nil? + s.debug = !ENV["DEBUG"].nil? # s.source_map = true s.index_path = "index.html.erb" - s.sprockets.cache = Sprockets::Cache::MemoryStore.new(5000) + s.sprockets.cache = Sprockets::Cache::MemoryStore.new(10000) } diff --git a/lib/views/object_view.rb b/lib/views/object_view.rb index 0783364..872256b 100644 --- a/lib/views/object_view.rb +++ b/lib/views/object_view.rb @@ -45,7 +45,7 @@ class ObjectView < ListView end def content_elements - fields = [ConstantView.new("li" , "-------------------------")] + fields = [ConstantView.new("li" , "----------------------------------")] object = @object if object and ! object.is_a?(String) object.get_instance_variables.each do |variable| diff --git a/lib/views/switch_view.rb b/lib/views/switch_view.rb index a048558..bb40ffe 100644 --- a/lib/views/switch_view.rb +++ b/lib/views/switch_view.rb @@ -56,7 +56,8 @@ class SelectView < ElementView def get_codes {set_internal_byte: "return 'Hello'.set_internal_byte(1,75)" , called_if: 'if( 10 ); return "then";else;return "else";end' , - hello_world: "return 'Hello again'.putstring" + hello_world: "h = 'Hello World'.putstring;return h", + dynamic_call: "a = 15 ; return a.div10", } end