diff --git a/done.txt b/done.txt index 4bcea62..a3c88ff 100644 --- a/done.txt +++ b/done.txt @@ -39,3 +39,4 @@ x 2015-03-25 remove the SAUCE lines at bottom, return ANSI object for render @SA x 2015-03-25 help on top of panel mode (always top) x 2015-03-25 info page x 2015-03-25 center panel mode vertically +x 2015-03-25 center ascii if smaller than 1 page (ansi too?) diff --git a/index.html b/index.html index 0c3b031..b9862bf 100644 --- a/index.html +++ b/index.html @@ -41,6 +41,7 @@
  • UpDownPageupPagedown Move about by line/page
  • HomeEnd Move to top/bottom (no zoom reset)
  • I SAUCE or Partymeister info
  • +
  • V Center Small Ascii Vertically
  • H This help (: Esc Cancel fullscreen
  • Tab also works for "info" but browsers hate it, so use 'I'
  • diff --git a/list.sahli b/list.sahli index 4d0b6eb..5ea3430 100644 --- a/list.sahli +++ b/list.sahli @@ -7,7 +7,7 @@ }, "filedata": [ { - "file": "spaceflight.asc", + "file": "az0!-revi510n.txt", "name": "Spaceflight", "amiga": true, "filetype": "plain", diff --git a/sahli.coffee b/sahli.coffee index 5329a3a..9382403 100644 --- a/sahli.coffee +++ b/sahli.coffee @@ -64,6 +64,9 @@ class @Sahli pdiv.prepend buf.clone() pdiv.append ptxt pdiv.append buf +# this is still needed for some Amiga stuff done on Amiga. +# probably should allow other overrides for UTF-8 and so on. + req.overrideMimeType 'text/plain; charset=ISO-8859-1' req.onreadystatechange = -> if req.readyState == req.DONE if req.status == 200 or req.status == 0 @@ -143,7 +146,6 @@ class @Sahli $('body').stop() @loadinfopanel i - @togglefullscreen = -> docElm = document.documentElement if @fullscreen @@ -217,7 +219,7 @@ class @Sahli # - save width upon draw # - toggle zoom out to full width / normal # - with a number, change width by that much -# if scrolling, where are we in the doc? zoom to THAT area. +# if scrolling, where are we in the doc? zoom to THAT area. - not implemented @zoom = (amt) -> zoomee = $('div.scrolly') if amt? @@ -225,7 +227,6 @@ class @Sahli newwidth = @origwidth else newwidth = zoomee.width() + amt - console.log "#{zoomee.width()} #{newwidth}" zoomee.width newwidth $('canvas').width newwidth else @@ -324,6 +325,8 @@ class @Sahli @panelmode(1) when @keycode 'i' $('div.infobox').toggle() + when @keycode 'v' + $('h6').height( (window.innerHeight - $('.scrolly').height()) / 2 ) when @keycode '1' @changespeed 1 when @keycode '2' diff --git a/sahli.css b/sahli.css index 45759d8..12186ec 100644 --- a/sahli.css +++ b/sahli.css @@ -32,17 +32,8 @@ body { } h6 { - position: fixed; - top: 1ex; - left: 1ex; - border: 1px green ridge; - padding: .125em 1em; - color: black; - background-color: green; - -webkit-border-radius: 8px; - -moz-border-radius: 8px; - border-radius: 8px; - display: none; + color: transparent; + background-color: transparent; } .help { @@ -131,6 +122,10 @@ p.infobox { margin: .25ex; } +.ty50 { + transform: translateY(-50%); +} + .bigtext { background-color: lightsteelblue; border: 1px outset steelblue; diff --git a/sahli.js b/sahli.js index 1caa9f9..821024c 100644 --- a/sahli.js +++ b/sahli.js @@ -71,6 +71,7 @@ l__________/__________|___|______l__________j_____j pdiv.prepend(buf.clone()); pdiv.append(ptxt); pdiv.append(buf); + req.overrideMimeType('text/plain; charset=ISO-8859-1'); req.onreadystatechange = function() { if (req.readyState === req.DONE) { if (req.status === 200 || req.status === 0) { @@ -266,7 +267,6 @@ l__________/__________|___|______l__________j_____j } else { newwidth = zoomee.width() + amt; } - console.log((zoomee.width()) + " " + newwidth); zoomee.width(newwidth); return $('canvas').width(newwidth); } else { @@ -377,6 +377,8 @@ l__________/__________|___|______l__________j_____j return _this.panelmode(1); case _this.keycode('i'): return $('div.infobox').toggle(); + case _this.keycode('v'): + return $('h6').height((window.innerHeight - $('.scrolly').height()) / 2); case _this.keycode('1'): return _this.changespeed(1); case _this.keycode('2'): diff --git a/todo.txt b/todo.txt index cb79a70..f26a2e7 100644 --- a/todo.txt +++ b/todo.txt @@ -7,4 +7,3 @@ (C) SAHLI ansi & ascii for load page (C) redo load page (not popup, info) (B) Preload -(A) center ascii if smaller than 1 page (ansi too?)