mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-11-28 19:55:53 +03:00
pastie
This commit is contained in:
parent
baf277bbad
commit
104ed8b280
@ -1,11 +1,20 @@
|
||||
/= all /; flop /^ (list (pair time ,*)) /: /%%/ /& /mime/
|
||||
;div
|
||||
;link(rel "stylesheet", href "/home/lib/base.css");
|
||||
;link(rel "stylesheet", href "/home/pub/paste/main.css");
|
||||
;script@"//code.jquery.com/jquery-2.1.4.min.js";
|
||||
;script@"/~/at/home/lib/urb.js";
|
||||
;script:'''
|
||||
document.title = 'pastebin - urbit'
|
||||
urb.appl = 'write'
|
||||
urb.send.mark = 'write-paste'
|
||||
submit = function(){
|
||||
if($("select :selected").attr('value')===undefined) {
|
||||
$("select").addClass('err')
|
||||
return false
|
||||
}
|
||||
$("select").removeClass('err')
|
||||
$("textarea,button").attr('disabled', true)
|
||||
urb.send({
|
||||
txt:$("textarea").val(),
|
||||
typ:$("select :selected").val()
|
||||
@ -17,14 +26,16 @@
|
||||
}
|
||||
'''
|
||||
::
|
||||
;h1: New
|
||||
;p:textarea;
|
||||
;button(onclick "submit()"):"Submit"
|
||||
;select
|
||||
;option(): Type
|
||||
;option(value "md"): Markdown
|
||||
;option(value "txt"): Text
|
||||
;option(value "hoon"): Hoon
|
||||
==
|
||||
;button(onclick "submit()"):"Submit"
|
||||
;hr;
|
||||
; recent:
|
||||
;h1: Recent
|
||||
;* (turn all |=([a=time *] ;p:a/"paste/{<a>}":"{<a>}"))
|
||||
==
|
||||
|
42
pub/paste/main.css
Normal file
42
pub/paste/main.css
Normal file
@ -0,0 +1,42 @@
|
||||
body {
|
||||
font-family: 'bau';
|
||||
margin: 4rem;
|
||||
width: 48rem;
|
||||
}
|
||||
|
||||
hr {
|
||||
width: 8rem;
|
||||
height: .2rem;
|
||||
background-color: #ccc;
|
||||
margin: 3rem 0;
|
||||
border: 0;
|
||||
}
|
||||
|
||||
button,
|
||||
textarea {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
button {
|
||||
margin-left: 1rem;
|
||||
}
|
||||
|
||||
textarea {
|
||||
width: 100%;
|
||||
min-height: 12rem;
|
||||
border: 0;
|
||||
background-color: #eaeaea;
|
||||
}
|
||||
|
||||
select {
|
||||
border: 3px solid transparent;
|
||||
}
|
||||
|
||||
.err {
|
||||
border: 3px solid red;
|
||||
}
|
||||
|
||||
a {
|
||||
font-family: 'scp';
|
||||
color: inherit;
|
||||
}
|
Loading…
Reference in New Issue
Block a user