Pastebin and source web app updates
parent
cce5b733a6
commit
88f06748f6
|
@ -1,7 +1,7 @@
|
|||
<% USING: furnace namespaces ; %>
|
||||
|
||||
<%
|
||||
"new paste" "title" set
|
||||
"New paste" "title" set
|
||||
"header" render-template
|
||||
%>
|
||||
|
||||
|
|
|
@ -79,9 +79,10 @@ SYMBOL: store
|
|||
pastebin-pastes 2dup length swap set-paste-n push ;
|
||||
|
||||
: submit-paste ( summary author channel mode contents -- )
|
||||
<paste>
|
||||
<paste> [
|
||||
\ pastebin get-global add-paste
|
||||
save-pastebin-store ;
|
||||
save-pastebin-store
|
||||
] keep paste-link permanent-redirect ;
|
||||
|
||||
\ submit-paste {
|
||||
{ "summary" v-required }
|
||||
|
@ -91,8 +92,6 @@ SYMBOL: store
|
|||
{ "contents" v-required }
|
||||
} define-action
|
||||
|
||||
\ submit-paste [ paste-list ] define-redirect
|
||||
|
||||
: annotate-paste ( n summary author mode contents -- )
|
||||
<annotation> swap get-paste
|
||||
paste-annotations push
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
! Copyright (C) 2007 Slava Pestov.
|
||||
! See http://factorcode.org/license.txt for BSD license.
|
||||
USING: io.files namespaces webapps.file http.server.responders
|
||||
xmode.code2html kernel ;
|
||||
xmode.code2html kernel html ;
|
||||
IN: webapps.source
|
||||
|
||||
global [
|
||||
|
@ -12,7 +12,7 @@ global [
|
|||
[
|
||||
drop
|
||||
serving-html
|
||||
swap htmlize-stream
|
||||
[ swap htmlize-stream ] with-html-stream
|
||||
] serve-file-hook set
|
||||
file-responder
|
||||
] with-scope
|
||||
|
|
Loading…
Reference in New Issue