-
Notifications
You must be signed in to change notification settings - Fork 0
/
edit.scm
executable file
·59 lines (56 loc) · 1.82 KB
/
edit.scm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#!/usr/local/bin/gosh
(use text.html-lite)
(use text.tree)
(use srfi-19)
(include "setting.scm")
(include "lib/utility.scm")
(define (main arg)
(define edit_title (string-append title " edit"))
(display content-type)
(write-tree (html-doctype))
(write-tree
(html:html :lang 'ja
(html:head
(html:meta :charset charset)
(html:title edit_title)
(html:link
:rel "stylesheet"
:type "text/css"
:href "css/style.css")
)
(html:body
(html:div :id "header"
(html:h3 edit_title)
" "
(html:a
:href home
"home")
)
(html:div :id "content"
(html:form
:method "POST"
:action "create.scm"
(html:input
:name "now"
:value
(string-append
"@(" (get-time c-date) ")"))
(html:textarea
:id "main"
:name "content"
(template)
)
(html:input
:name "date"
:type "hidden"
:value now)
(html:br)
(html:input
:type "submit"
:value "submit")
)
)
(html:div :id "footer"
(html:p "author: " author)
)
))))