mirror of
https://github.com/seejohnrun/haste-server
synced 2025-08-20 21:23:09 -07:00
Update scrolling
This commit is contained in:
parent
75bf4124e5
commit
dfcd5eeef1
4 changed files with 25 additions and 3 deletions
|
@ -234,7 +234,11 @@ haste.prototype.loadDocument = function(key) {
|
|||
_this.doc = new haste_document();
|
||||
_this.doc.load(parts[0], function(ret) {
|
||||
if (ret) {
|
||||
_this.$code.html(ret.value);
|
||||
let code = document.createElement('code');
|
||||
code.innerHTML = ret.value;
|
||||
let pre = document.getElementById("box");
|
||||
pre.appendChild(code);
|
||||
|
||||
_this.setTitle(ret.key);
|
||||
_this.fullKey();
|
||||
_this.$textarea.val('').hide();
|
||||
|
|
2
static/application.min.js
vendored
2
static/application.min.js
vendored
File diff suppressed because one or more lines are too long
|
@ -76,7 +76,7 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<pre id="box" style="display:none;" class="hljs" tabindex="0"><code></code></pre>
|
||||
<pre id="box" style="display:none;" class="hljs" tabindex="0"></pre>
|
||||
<textarea spellcheck="false" style="display:none;"></textarea>
|
||||
</body>
|
||||
|
||||
|
|
|
@ -12,6 +12,24 @@ Orginal Style from ethanschoonover.com/solarized (c) Jeremy Hull <sourdrums@gmai
|
|||
color: #78797A;
|
||||
}
|
||||
|
||||
pre.hljs {
|
||||
white-space: pre-wrap;
|
||||
}
|
||||
pre.hljs::before {
|
||||
counter-reset: listing;
|
||||
}
|
||||
pre.hljs code {
|
||||
counter-increment: listing;
|
||||
}
|
||||
pre.hljs code::before {
|
||||
content: counter(listing) ". ";
|
||||
display: inline-block;
|
||||
width: 8em; /* now works */
|
||||
padding-left: auto; /* now works */
|
||||
margin-left: auto; /* now works */
|
||||
text-align: right; /* now works */
|
||||
}
|
||||
|
||||
.hljs-comment,
|
||||
.hljs-quote {
|
||||
color: #586e75;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue