summaryrefslogtreecommitdiff
path: root/lupin/artikkel.lua
diff options
context:
space:
mode:
authorbie <bie@pha.hk>2014-04-14 19:52:40 +0200
committerbie <bie@pha.hk>2014-04-14 19:52:40 +0200
commite5a20e6113a0a1e303cffa54945d120de3ce31b2 (patch)
treeac3dbff93f9073b14f387fc6f6b488130938375a /lupin/artikkel.lua
downloadtears-e5a20e6113a0a1e303cffa54945d120de3ce31b2.tar.xz
dette er kode...?
Diffstat (limited to 'lupin/artikkel.lua')
-rw-r--r--lupin/artikkel.lua18
1 files changed, 18 insertions, 0 deletions
diff --git a/lupin/artikkel.lua b/lupin/artikkel.lua
new file mode 100644
index 0000000..3ad2f4d
--- /dev/null
+++ b/lupin/artikkel.lua
@@ -0,0 +1,18 @@
+local artikkel = blueprint("default")
+
+function artikkel.env(data)
+ data.bilde = os.getenv("POST_bilde")
+ data.publisert = os.getenv("POST_publisert")
+end
+
+function artikkel.form(body, data)
+ html.p()
+ html.label("Overskrift:")
+ html.text('title', data.title, 32)
+ html.orz('bilde', data.bilde or '')
+ html.p()
+ html.textarea('tekst', body)
+end
+
+return artikkel
+