css: change placeholder and made the UI generally tighter
Also I have encouraged the user to change their monospace font accordingly for the best personal satisfaction. Signed-off-by: Gunwant Jain <mail@wantguns.dev>
This commit is contained in:
@@ -12,22 +12,17 @@
|
|||||||
|
|
||||||
<style>
|
<style>
|
||||||
|
|
||||||
@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@460&display=swap');
|
|
||||||
|
|
||||||
/* fill entire page */
|
/* fill entire page */
|
||||||
code {
|
code {
|
||||||
padding: 0px;
|
|
||||||
background: transparent !important;
|
background: transparent !important;
|
||||||
font-family: 'Fira Code', monospace;
|
font-family: monospace;
|
||||||
}
|
}
|
||||||
|
|
||||||
body {
|
body {
|
||||||
/* Change background color to that of your theme's */
|
/* Change background color to that of your theme's */
|
||||||
background: #191f26;
|
background: #191f26;
|
||||||
padding: 20px 50px;
|
padding: 10px;
|
||||||
margin: 0px;
|
|
||||||
color: #E6E1CF;
|
color: #E6E1CF;
|
||||||
/* color: #5c6773; */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
::selection {
|
::selection {
|
||||||
|
|||||||
@@ -9,7 +9,6 @@ overflow-y:hidden;
|
|||||||
body {
|
body {
|
||||||
height: 100vh;
|
height: 100vh;
|
||||||
font-family: monospace;
|
font-family: monospace;
|
||||||
padding: 3rem;
|
|
||||||
|
|
||||||
display: flex;
|
display: flex;
|
||||||
}
|
}
|
||||||
@@ -23,13 +22,11 @@ width: 100%;
|
|||||||
background: none;
|
background: none;
|
||||||
border: none;
|
border: none;
|
||||||
|
|
||||||
padding-left: 10px
|
|
||||||
|
|
||||||
resize: none;
|
resize: none;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
|
|
||||||
color: inherit;
|
color: inherit;
|
||||||
font-family: 'Fira Code', monospace;
|
font-family: monospace;
|
||||||
line-height: inherit;
|
line-height: inherit;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -49,53 +46,40 @@ font-size: 0rem;
|
|||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
textarea:focus, input:focus {
|
|
||||||
outline: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
*:focus {
|
*:focus {
|
||||||
outline: none;
|
outline: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
button[type="submit"].hidden { display: none; }
|
button[type="submit"].hidden { display: none; }
|
||||||
|
|
||||||
#drop_zone {
|
|
||||||
border: 1px dashed grey;
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
}
|
|
||||||
{% endblock styles %}
|
{% endblock styles %}
|
||||||
|
|
||||||
{% block body %}
|
{% block body %}
|
||||||
<form action="/submit" method="post">
|
<form action="/submit" method="post">
|
||||||
<textarea style="resize: none" ondrop="dropHandler(event);" ondragover="dragOverHandler(event);" placeholder="
|
<textarea name="val" style="resize: none" ondrop="dropHandler(event);" ondragover="dragOverHandler(event);" placeholder="
|
||||||
|
|
||||||
========
|
bin(3) Bin Manual bin(3)
|
||||||
|
|
||||||
|
NAME
|
||||||
|
bin - A highly opinionated and minamalistic Pastebin
|
||||||
|
|
||||||
WEB USAGE
|
WEB USAGE
|
||||||
---------
|
Drag a file and drop it here, or
|
||||||
|
After typing, press the big yellow button to paste, or
|
||||||
Drag a file and drop it here.
|
|
||||||
|
|
||||||
or
|
|
||||||
|
|
||||||
After typing, press the big yellow button to paste.
|
|
||||||
|
|
||||||
or
|
|
||||||
|
|
||||||
Just press Ctrl + Enter once done.
|
Just press Ctrl + Enter once done.
|
||||||
|
|
||||||
|
|
||||||
CLI USAGE
|
CLI USAGE
|
||||||
---------
|
|
||||||
|
|
||||||
curl -Ls -o /dev/null -w %{url_effective} --data-binary @file.txt https://bin.wantguns.dev
|
curl -Ls -o /dev/null -w %{url_effective} --data-binary @file.txt https://bin.wantguns.dev
|
||||||
|
|
||||||
Better use-cases of CLI mentioned at Github.
|
Better use cases of CLI mentioned at Github
|
||||||
|
|
||||||
========
|
SEE ALSO
|
||||||
|
github.com/wantguns/bin
|
||||||
|
|
||||||
open-sourced at: github.com/wantguns/bin" autofocus autocomplete="off" autocorrect="off" autocapitalize="off"
|
AUTHOR
|
||||||
|
Gunwant Jain
|
||||||
|
|
||||||
|
2021-06-19 bin(3)
|
||||||
|
" autofocus autocomplete="off" autocorrect="off" autocapitalize="off"
|
||||||
spellcheck="false"></textarea>
|
spellcheck="false"></textarea>
|
||||||
|
|
||||||
<button type="submit" title="Paste">⎘</button>
|
<button type="submit" title="Paste">⎘</button>
|
||||||
@@ -106,6 +90,16 @@ open-sourced at: github.com/wantguns/bin" autofocus autocomplete="off" autoco
|
|||||||
const input = document.querySelector('textarea');
|
const input = document.querySelector('textarea');
|
||||||
const button = document.querySelector('button[type="submit"]');
|
const button = document.querySelector('button[type="submit"]');
|
||||||
|
|
||||||
|
const onInput = () => button.classList.toggle('hidden', !input.value);
|
||||||
|
input.addEventListener('input', onInput);
|
||||||
|
onInput();
|
||||||
|
|
||||||
|
document.body.addEventListener('keydown', (e) => {
|
||||||
|
if (e.key === 'Enter' && e.ctrlKey) {
|
||||||
|
form.submit();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
async function postData(url = '', data) {
|
async function postData(url = '', data) {
|
||||||
const response = await fetch(url, {
|
const response = await fetch(url, {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
@@ -117,16 +111,6 @@ open-sourced at: github.com/wantguns/bin" autofocus autocomplete="off" autoco
|
|||||||
return response;
|
return response;
|
||||||
}
|
}
|
||||||
|
|
||||||
const onInput = () => button.classList.toggle('hidden', !input.value);
|
|
||||||
input.addEventListener('input', onInput);
|
|
||||||
onInput();
|
|
||||||
|
|
||||||
document.body.addEventListener('keydown', (e) => {
|
|
||||||
if (e.key === 'Enter' && e.ctrlKey) {
|
|
||||||
form.submit();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
function dropHandler(ev) {
|
function dropHandler(ev) {
|
||||||
console.log('File(s) dropped');
|
console.log('File(s) dropped');
|
||||||
|
|
||||||
@@ -155,5 +139,12 @@ open-sourced at: github.com/wantguns/bin" autofocus autocomplete="off" autoco
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function dragOverHandler(ev) {
|
||||||
|
console.log('File(s) in drop zone');
|
||||||
|
|
||||||
|
ev.preventDefault();
|
||||||
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
{% endblock body %}
|
{% endblock body %}
|
||||||
Reference in New Issue
Block a user