mirror of
https://github.com/perlbot/perlbuut-pastebin
synced 2025-06-07 14:17:26 -04:00
Some ux changes.
This commit is contained in:
parent
7ec3cab742
commit
3a00e9921d
6 changed files with 32 additions and 4 deletions
BIN
static/fonts/FiraCode-Bold.woff2
Normal file
BIN
static/fonts/FiraCode-Bold.woff2
Normal file
Binary file not shown.
BIN
static/fonts/FiraCode-Light.woff2
Normal file
BIN
static/fonts/FiraCode-Light.woff2
Normal file
Binary file not shown.
BIN
static/fonts/FiraCode-Medium.woff2
Normal file
BIN
static/fonts/FiraCode-Medium.woff2
Normal file
Binary file not shown.
BIN
static/fonts/FiraCode-Regular.woff2
Normal file
BIN
static/fonts/FiraCode-Regular.woff2
Normal file
Binary file not shown.
|
@ -15,6 +15,10 @@
|
|||
html, body, #content {
|
||||
width: 100%;
|
||||
}
|
||||
@font-face {
|
||||
font-family: "FiraCode";
|
||||
src: url("/static/fonts/FiraCode-Regular.woff2") format('woff2');
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
$(function() {
|
||||
|
@ -144,6 +148,25 @@
|
|||
//editor.setTheme("ace/theme/twilight");
|
||||
editor.session.setMode("ace/mode/perl");
|
||||
|
||||
editor.setOptions({maxLines: Infinity, fontFamily: ['FiraCode']});
|
||||
/*editor.middleClick = false;
|
||||
editor.on("mousedown", function (e) {
|
||||
if (e.domEvent.which == 2) { // middle click
|
||||
editor.middleClick = true;
|
||||
var tempText = editor.getSelectedText();
|
||||
if (e.$pos) {
|
||||
editor.session.insert(e.$pos, tempText);
|
||||
}
|
||||
window.setTimeout(function () {
|
||||
editor.middleClick = false;
|
||||
if (e.$pos) {
|
||||
editor.moveCursorTo(e.$pos.row, e.$pos.column + tempText.length);
|
||||
}
|
||||
}, 200);
|
||||
}
|
||||
});*/
|
||||
|
||||
|
||||
function setup_columns() {
|
||||
if (showingeval && showingmodules) {
|
||||
$("#editors").removeClass().addClass('col-md-6');
|
||||
|
|
|
@ -9,6 +9,11 @@
|
|||
html, body, #content {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: "FiraCode";
|
||||
src: url("/static/fonts/FiraCode-Regular.woff2") format('woff2');
|
||||
}
|
||||
</style>
|
||||
[% END %]
|
||||
|
||||
|
@ -60,17 +65,17 @@
|
|||
editor.session.setMode("ace/mode/perl");
|
||||
|
||||
editor.setReadOnly(true);
|
||||
|
||||
function resizeAce() {
|
||||
editor.setOptions({maxLines: Infinity, fontFamily: ['FiraCode']});
|
||||
/*function resizeAce() {
|
||||
var h = window.innerHeight;
|
||||
var ch = h - 400;
|
||||
var m = ch > 360 ? ch : 360;
|
||||
$('#editor').css('height', m.toString() + 'px');
|
||||
// $('#editor').css('height', m.toString() + 'px');
|
||||
};
|
||||
$(window).on('resize', function () {
|
||||
resizeAce();
|
||||
});
|
||||
resizeAce();
|
||||
resizeAce();*/
|
||||
|
||||
$("#submit").on('click', function () {
|
||||
$("#paste").text(editor.getValue()); // copy to the textarea
|
||||
|
|
Loading…
Add table
Reference in a new issue