Pastebin and source web app updates

release
Slava Pestov 2007-12-08 15:14:24 -05:00
parent cce5b733a6
commit 88f06748f6
3 changed files with 7 additions and 8 deletions

View File

@ -1,7 +1,7 @@
<% USING: furnace namespaces ; %>
<%
"new paste" "title" set
"New paste" "title" set
"header" render-template
%>

View File

@ -79,9 +79,10 @@ SYMBOL: store
pastebin-pastes 2dup length swap set-paste-n push ;
: submit-paste ( summary author channel mode contents -- )
<paste>
\ pastebin get-global add-paste
save-pastebin-store ;
<paste> [
\ pastebin get-global add-paste
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

View File

@ -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