From 9afce297f6f520bca11703637495795fd2642073 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?TG=20=C3=97=20=E2=8A=99?= <*@tg-x.net> Date: Sat, 9 Nov 2019 21:38:48 +0100 Subject: [PATCH 1/8] build fix --- coffee/manager.coffee | 2 +- coffee/rendering.coffee | 2 +- package.json | 4 ++-- run | 5 +---- 4 files changed, 5 insertions(+), 8 deletions(-) diff --git a/coffee/manager.coffee b/coffee/manager.coffee index 7d2dd99..1b53127 100644 --- a/coffee/manager.coffee +++ b/coffee/manager.coffee @@ -22,7 +22,7 @@ class AppManager systemManager: null constructor: (@container, @controls) -> - @joystick = new Joystick(container) + @joystick = new Joystick(@container) @keystate = new KeyState @inputHandler = new InputHandler(@keystate, @joystick) diff --git a/coffee/rendering.coffee b/coffee/rendering.coffee index d035815..c042ad2 100644 --- a/coffee/rendering.coffee +++ b/coffee/rendering.coffee @@ -46,7 +46,7 @@ class Renderer stack:[] isDrawing:false constructor: (@container) -> - @context = new RenderingContext(container) + @context = new RenderingContext(@container) prepare: (system) => colors = getColors(system) diff --git a/package.json b/package.json index 30d06cb..98bd420 100644 --- a/package.json +++ b/package.json @@ -5,9 +5,9 @@ "version": "0.1.0", "dependencies": { "coffee-script": ">= 1.3.0", + "http-server": ">= 0.5.0", "jitter": ">= 1.1.1", - "node-sass": "3.4.2", "json-minify": ">= 1.0.0", - "http-server": ">= 0.5.0" + "sass": "^1.23.3" } } diff --git a/run b/run index 8a942ef..ca61d08 100755 --- a/run +++ b/run @@ -18,10 +18,7 @@ function handle_sigint() trap handle_sigint SIGINT (node_modules/http-server/bin/http-server . -p 8000 &> /dev/null) & - -(node_modules/node-sass/bin/node-sass sass/test.scss sass/test.css) & - +(node_modules/sass/sass.js css/ui.scss css/ui.css) & (node_modules/jitter/bin/jitter -b coffee js/generated) & wait - From 8e4d156ad8bc08d951c47fa676a9ff3b87c8dcfc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?TG=20=C3=97=20=E2=8A=99?= <*@tg-x.net> Date: Sat, 9 Nov 2019 22:56:22 +0100 Subject: [PATCH 2/8] minimize ui --- css/forkme.css | 133 ---------------------------------- sass/test.scss => css/ui.scss | 130 ++++++++++++++++----------------- index.html | 120 ++++++++++++------------------ js/lsys-intro.js | 6 +- 4 files changed, 111 insertions(+), 278 deletions(-) delete mode 100644 css/forkme.css rename sass/test.scss => css/ui.scss (84%) diff --git a/css/forkme.css b/css/forkme.css deleted file mode 100644 index b544963..0000000 --- a/css/forkme.css +++ /dev/null @@ -1,133 +0,0 @@ -/* Left will inherit from right (so we don't need to duplicate code */ -.github-fork-ribbon { - /* The right and left lasses determine the side we attach our banner to */ - position: absolute; - - /* Add a bit of padding to give some substance outside the "stitching" */ - padding: 2px 0; - - /* Set the base colour */ - background-color: #a00; - - /* Set a gradient: transparent black at the top to almost-transparent black at the bottom */ - background-image: -webkit-gradient(linear, left top, left bottom, from(rgba(0, 0, 0, 0.00)), to(rgba(0, 0, 0, 0.15))); - background-image: -webkit-linear-gradient(top, rgba(0, 0, 0, 0.00), rgba(0, 0, 0, 0.15)); - background-image: -moz-linear-gradient(top, rgba(0, 0, 0, 0.00), rgba(0, 0, 0, 0.15)); - background-image: -o-linear-gradient(top, rgba(0, 0, 0, 0.00), rgba(0, 0, 0, 0.15)); - background-image: -ms-linear-gradient(top, rgba(0, 0, 0, 0.00), rgba(0, 0, 0, 0.15)); - background-image: linear-gradient(top, rgba(0, 0, 0, 0.00), rgba(0, 0, 0, 0.15)); - filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0,StartColorStr='#000000', EndColorStr='#000000'); - - /* Add a drop shadow */ - -webkit-box-shadow: 0px 2px 3px 0px rgba(0, 0, 0, 0.5); - box-shadow: 0px 2px 3px 0px rgba(0, 0, 0, 0.5); - - z-index: 9999; -} - -.github-fork-ribbon a, -.github-fork-ribbon a:hover { - /* Set the font */ - font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; - font-size: 13px; - font-weight: 700; - color: white; - - /* Set the text properties */ - text-decoration: none; - text-shadow: 0 -1px rgba(0,0,0,0.5); - text-align: center; - - /* Set the geometry. If you fiddle with these you'll also need to tweak the top and right values in #github-fork-ribbon. */ - width: 200px; - line-height: 20px; - - /* Set the layout properties */ - display: inline-block; - padding: 2px 0; - - /* Add "stitching" effect */ - border-width: 1px 0; - border-style: dotted; - border-color: rgba(255,255,255,0.7); -} - -.github-fork-ribbon-wrapper { - width: 150px; - height: 150px; - position: absolute; - overflow: hidden; - top: 0; - z-index: 9999; -} - -.github-fork-ribbon-wrapper.fixed { - position: fixed; -} - -.github-fork-ribbon-wrapper.fm-left { - left: 0; -} - -.github-fork-ribbon-wrapper.right { - right: 0; -} - -.github-fork-ribbon-wrapper.left-bottom { - position: fixed; - top: inherit; - bottom: 0; - left: 0; -} - -.github-fork-ribbon-wrapper.right-bottom { - position: fixed; - top: inherit; - bottom: 0; - right: 0; -} - -.github-fork-ribbon-wrapper.right .github-fork-ribbon { - top: 42px; - right: -43px; - - /* Rotate the banner 45 degrees */ - -webkit-transform: rotate(45deg); - -moz-transform: rotate(45deg); - -o-transform: rotate(45deg); - transform: rotate(45deg); -} - -.github-fork-ribbon-wrapper.fm-left .github-fork-ribbon { - top: 42px; - left: -43px; - - /* Rotate the banner -45 degrees */ - -webkit-transform: rotate(-45deg); - -moz-transform: rotate(-45deg); - -o-transform: rotate(-45deg); - transform: rotate(-45deg); -} - - -.github-fork-ribbon-wrapper.left-bottom .github-fork-ribbon { - top: 80px; - left: -43px; - - /* Rotate the banner -45 degrees */ - -webkit-transform: rotate(45deg); - -moz-transform: rotate(45deg); - -o-transform: rotate(45deg); - transform: rotate(45deg); -} - -.github-fork-ribbon-wrapper.right-bottom .github-fork-ribbon { - top: 80px; - right: -43px; - - /* Rotate the banner -45 degrees */ - -webkit-transform: rotate(-45deg); - -moz-transform: rotate(-45deg); - -o-transform: rotate(-45deg); - transform: rotate(-45deg); -} diff --git a/sass/test.scss b/css/ui.scss similarity index 84% rename from sass/test.scss rename to css/ui.scss index 346baec..6e1e0f6 100644 --- a/sass/test.scss +++ b/css/ui.scss @@ -1,15 +1,4 @@ -$menu-color: #333; -$top:0; -$left:228px; -$bottom:240px; - -@mixin scrollbar{ -&::-webkit-scrollbar{width:4px;height:4px;} -&::-webkit-scrollbar-button:start:decrement, &::-webkit-scrollbar-button:end:increment{ display:block;height:2px;background-color: #232323; } -&::-webkit-scrollbar-track-piece{ background-color: #282828;-webkit-border-radius:0;-webkit-border-bottom-right-radius:4px;-webkit-border-bottom-left-radius:4px; } -&::-webkit-scrollbar-thumb:vertical{ height:5px;background-color: #6d6d6d;-webkit-border-radius:4px; } -&::-webkit-scrollbar-thumb:horizontal{ width:5px;background-color:#999;-webkit-border-radius:4px; } -} +$sideWidth: 230px; div { -webkit-touch-callout: none; @@ -19,15 +8,22 @@ div { -ms-user-select: none; user-select: none; } - +/* #helpTrigger{ background-color: rgb(163, 7, 7); color: rgb(236, 236, 236); - border-color: rgb(202, 202, 202); text-shadow: 1px 1px black; } - -.introjs-tooltip{ max-width: 350px; } +#helpTrigger:hover { + border-color: rgb(202, 202, 202); +} +*/ +.introjs-tooltip{ + max-height: 150px; + max-width: 350px; + overflow-x: hidden; + overflow-y: auto; +} .introjs-tooltip, .introjs-helperLayer{ color: #e8e8e8; background-color: rgb(70, 71, 77); @@ -40,7 +36,7 @@ div { color: #e8e8e8; background-color: rgba(94, 97, 111, 0.51) } -.introjs-overlay.hidden { +.hidden { display: none; } .introjs-overlay{ @@ -100,12 +96,12 @@ li{ -webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.1), 0 1px 10px rgba(0, 0, 0, 0.1); .actions{ padding-top:13px; - padding-right:11px; + padding-right:0px; a{ padding:2px 1px 1px 1px; } } a.site{ font-family:monospace; - padding-left:10px; + padding-left:0px; padding-top:4px; color: #dbdbdb; font-size:12pt; @@ -124,35 +120,48 @@ li{ } } -.container-left{ +.show-side.actions{ + padding-top: 13px; +} +.show-side.actions a{ + border: 0; +} + +.container-side{ + position: absolute; + top: 0; + right: 0; bottom: 0; + width: $sideWidth; cursor: default; - background-color:$menu-color; - left: 0; + background-color:#333; padding: 0 0 0 0px; - position: absolute; - border-right:1px solid #555; - top: $top; - width: $left; + border-left:1px solid #555; + scrollbar-width: thin; + overflow-x: hidden; + overflow-y: auto; + opacity: 0.7; + /* + &::-webkit-scrollbar{width:4px;height:4px;} + &::-webkit-scrollbar-button:start:decrement, &::-webkit-scrollbar-button:end:increment{ display:block;height:2px;background-color: #232323; } + &::-webkit-scrollbar-track-piece{ background-color: #282828;-webkit-border-radius:0;-webkit-border-bottom-right-radius:4px;-webkit-border-bottom-left-radius:4px; } + &::-webkit-scrollbar-thumb:vertical{ height:5px;background-color: #6d6d6d;-webkit-border-radius:4px; } + &::-webkit-scrollbar-thumb:horizontal{ width:5px;background-color:#999;-webkit-border-radius:4px; } + */ } -.container-right{ - bottom: $bottom; - left: $left+1; +.container-main{ + bottom: 0; + left: 0; margin: 0; padding: 0; position: absolute; right: 0; - top: $top; + top: 0; background-color: #1d1f20; } -.container-bottom{ - position:absolute; +.container-ticker{ padding:0; - bottom:0; - left:$left+1; - right:0; - height:$bottom - 1; border-top:1px solid #666; background-color:#222; .fade{ @@ -162,23 +171,9 @@ li{ background: linear-gradient(to bottom, rgba(34, 34, 34, 0) 0%, rgb(34,34,34) 70%) } } -.top{ - position:absolute; - top:0; - right:0; - left:0; - height:$top - 1; - background-color: #111115; - border-bottom:1px solid #3f3f3f; -} .controls{ - @include scrollbar; font-size:9pt; - position:absolute; - top:51px; - bottom:0; - right:1px; overflow:hidden; overflow-y:auto; @@ -244,7 +239,7 @@ li{ margin:0; } textarea{ - width:132px; + width:204px; } &.half input{ margin-left:72px; @@ -256,6 +251,10 @@ li{ width:64px; padding-left:8px; } + li .label { + display:inline-block; + width:68px; + } } ul.labels{ li{ @@ -311,13 +310,8 @@ li{ } .system-info { - position: absolute; - top:7px; - left:0; - right:0; text-align: center; background-color:rgba(0,0,0,0.3); - color: #d6d6d6; border:1px solid #363636; border-left:none; @@ -391,6 +385,11 @@ li{ font-size:12px; padding:0px 0px 0px 0px; } + i.icon-toggle{ + font-weight: bold; + letter-spacing: -2px; + padding: 0 3px; + } text-decoration: none; line-height:14px; color: #808080; @@ -439,15 +438,17 @@ li{ &.resizing{ cursor: ne-resize; } } } +.help-pad { + position: absolute; + top: 0; + bottom: 0; + left: 0; + right: $sideWidth+10; +} .ticker{ - @include scrollbar; - overflow-y: scroll; - position:absolute; - top:0; bottom:0;left:0;right:0; margin:1px; padding:0px; - text-align:center; .elem{ border:1px solid #6f6f6f; padding:2px; @@ -455,10 +456,8 @@ li{ border-radius:1px; position:relative; background-color: #2c2e33; - - width:130px; + width:103px; height:125px; - //position:relative; font-size:8pt; &:hover{ @@ -492,6 +491,3 @@ li{ } } } - - - diff --git a/index.html b/index.html index 4bd49b7..ade899b 100644 --- a/index.html +++ b/index.html @@ -5,26 +5,10 @@
Click and drag!
As you drag your mouse, you change the parameters of the system, which then gets redrawn.
The system's parameters are also sync'd automatically with the url - meaning you can share systems by pasting the url somewhere.
Also - since systems are just urls, your browsers back button works the way you would expect it to :)
Take a look at some of the examples here (you can scroll down!)
function (t) =+
rules =
function (t) =-
function (t) =+
function (t) =-
function (t) =+