Skip to content
This repository has been archived by the owner on Jan 1, 2025. It is now read-only.

Commit

Permalink
Update for windows
Browse files Browse the repository at this point in the history
  • Loading branch information
Avarel committed May 18, 2022
1 parent 48962d6 commit 679ddfa
Show file tree
Hide file tree
Showing 5 changed files with 276 additions and 13 deletions.
261 changes: 260 additions & 1 deletion out/buffer.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,263 @@ ewr

rf

fdfffffffffffffffffffffffffff
fdfffffffffffffffffffffffffff

sewerewwwerw

werw
e
rwer
we
r
ew
rw































werwe
































































































































































weewrwerew
r
werw
er
wer
ew
rew
rwe
rewekrjwuoteuoiwrh toi3tb34b gi3b y]b]q34g\
gqg r grohprghqgjweherkjewlkr le wjeqlkflqwk;gr
grew
gregjerjwgperwgerw
ger
gerw
g ergnowejgh ewkrllgerw
\ge
r gerwklg kewrjgle;wrjgk l;werg
werg
ewrgl ewrkgj ;werjg lk;ewrjgk ;ewrg
er
g we
gewrgklewrljkg ;ewkrljg kl;ewrjkg kl;ewrg


ewrg

w
r


e
eee e

qw

w
qw
e
wq
e
q

q



qw
e
qw
eqw


qw
eqw
ewq
e
qwe
1 change: 1 addition & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ fn window() -> wry::Result<()> {
.with_always_on_top(true)
.with_decorations(false)
.with_transparent(true)
.with_maximized(true)
.with_resizable(false)
.build(&event_loop)?;
let _webview = WebViewBuilder::new(window)?
Expand Down
8 changes: 3 additions & 5 deletions src/web/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,9 @@
<body>
<!-- partial:index.partial.html -->
<main class="code-box">
<section id="kaiper-box">
<div class="code">
<textarea></textarea>
</div>
</section>
<div class="code" id="ramble">
<textarea></textarea>
</div>
</main>
<!-- partial -->
<script src='https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js'></script>
Expand Down
12 changes: 7 additions & 5 deletions src/web/script.js
Original file line number Diff line number Diff line change
@@ -1,25 +1,27 @@
// https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.30.0/mode/coffeescript/coffeescript.js fork this

let textArea = $('#kaiper-box textarea').text(
let textArea = $('#ramble textarea').text(
`Loading the ramblathon...`
);

let editor = CodeMirror.fromTextArea(textArea[0], {
theme: "twilight",
lineNumbers: true,
lineWrapping: true,
indentUnit: 4,
electricChars: false,
smartIndent: false,
scrollbarStyle: "null"
});

editor.setOption("extraKeys", {
Backspace: function(cm) {},
Delete: function(cm) {}
Backspace: cm => {},
Delete: cm => {},
Enter: cm => cm.replaceSelection("\n"),
});

editor.on("cursorActivity", function(event) {
editor.execCommand("goDocEnd");
});

editor.doc.readOnly = true;

let batch = "";
Expand Down
7 changes: 5 additions & 2 deletions src/web/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
}

html, body {
width: 100%;
width: 100vw;
max-width: 100vw;
height: 100vh;
margin: 0;
padding: 0;
Expand Down Expand Up @@ -43,7 +44,9 @@ h2 {
.code {
flex: 1 0 auto;
background: linear-gradient(45deg, #1d1f20, #2f3031);
width: 100%;
width: 100vw;
max-width: 100vw;
overflow-x: hidden;
}

.CodeMirror {
Expand Down

0 comments on commit 679ddfa

Please sign in to comment.