1
0
Fork 0
mirror of https://github.com/perlbot/perlbuut-pastebin synced 2025-06-07 22:26:01 -04:00

Some ux changes.

This commit is contained in:
Ryan Voots 2017-03-28 00:59:11 -04:00
parent 7ec3cab742
commit 3a00e9921d
6 changed files with 32 additions and 4 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -15,6 +15,10 @@
html, body, #content { html, body, #content {
width: 100%; width: 100%;
} }
@font-face {
font-family: "FiraCode";
src: url("/static/fonts/FiraCode-Regular.woff2") format('woff2');
}
</style> </style>
<script> <script>
$(function() { $(function() {
@ -144,6 +148,25 @@
//editor.setTheme("ace/theme/twilight"); //editor.setTheme("ace/theme/twilight");
editor.session.setMode("ace/mode/perl"); 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() { function setup_columns() {
if (showingeval && showingmodules) { if (showingeval && showingmodules) {
$("#editors").removeClass().addClass('col-md-6'); $("#editors").removeClass().addClass('col-md-6');

View file

@ -9,6 +9,11 @@
html, body, #content { html, body, #content {
width: 100%; width: 100%;
} }
@font-face {
font-family: "FiraCode";
src: url("/static/fonts/FiraCode-Regular.woff2") format('woff2');
}
</style> </style>
[% END %] [% END %]
@ -60,17 +65,17 @@
editor.session.setMode("ace/mode/perl"); editor.session.setMode("ace/mode/perl");
editor.setReadOnly(true); editor.setReadOnly(true);
editor.setOptions({maxLines: Infinity, fontFamily: ['FiraCode']});
function resizeAce() { /*function resizeAce() {
var h = window.innerHeight; var h = window.innerHeight;
var ch = h - 400; var ch = h - 400;
var m = ch > 360 ? ch : 360; var m = ch > 360 ? ch : 360;
$('#editor').css('height', m.toString() + 'px'); // $('#editor').css('height', m.toString() + 'px');
}; };
$(window).on('resize', function () { $(window).on('resize', function () {
resizeAce(); resizeAce();
}); });
resizeAce(); resizeAce();*/
$("#submit").on('click', function () { $("#submit").on('click', function () {
$("#paste").text(editor.getValue()); // copy to the textarea $("#paste").text(editor.getValue()); // copy to the textarea