diff --git a/static/application.css b/static/application.css index 8bd3131..70458c0 100644 --- a/static/application.css +++ b/static/application.css @@ -36,6 +36,18 @@ textarea { user-select: none; } +.line { + /* display: block;*/ +} + +.line:hover { + background-color: #cbd387; +} + +.lineHighlight { + background-color: yellow; +} + /* code box when locked */ #box { diff --git a/static/application.js b/static/application.js index ce6c741..a8af5be 100644 --- a/static/application.js +++ b/static/application.js @@ -47,20 +47,19 @@ haste_document.prototype.load = function(key, callback, lang) { currentLine <= selectedLines.endLine ) { highlighted = - '' + highlighted + ""; + "" + highlighted + ""; } - - highlighted = "" + highlighted + ""; + highlighted = "" + highlighted + ""; high.value += highlighted + "\n"; } - // scroll to position in document after ensuring components have had time to render + // scroll to position in document after ensuring components h"ve had time to render setTimeout(function() { // show current line and the one before it if (selectedLines.startLine >= 3) { document.body.scrollTo(0, $("#line-" + (selectedLines.startLine - 2)).offset().top) } else { // if lines 1-2, go to top of file - document.body.scrollTop(0); + document.body.scrollTo(0, 0); } }, 0); } catch (err) { @@ -423,5 +422,4 @@ $(function() { } } }); - -}); +}); \ No newline at end of file diff --git a/static/index.html b/static/index.html index 41a87ff..6bfea97 100644 --- a/static/index.html +++ b/static/index.html @@ -1,100 +1,105 @@ -
+ -