Skip to content
Browse files

add title configuration option

  • Loading branch information...
1 parent e865cad commit 7321424c6a482190205f211c63b5e388310a565e Austin Seipp committed Jun 12, 2011
Showing with 6 additions and 5 deletions.
  1. +1 −0 config.opa
  2. +2 −3 src/layout.opa
  3. +3 −2 src/main.opa
View
1 config.opa
@@ -4,6 +4,7 @@ Config = {{
author = "John Doe"
email = "joe@blog.me"
blurb = "Super radical dude"
+ title = "John Doe's epic blog"
links = [ ("http://google.com", "google.com")
, ("http://opalang.org", "opalang.org") ]
}}
View
5 src/layout.opa
@@ -6,14 +6,13 @@ import opaque.config
Layout = {{
@private styles = [ "res/style.css"
- , "res/sh_nedit.min.css"
- ]
+ , "res/sh_nedit.min.css" ]
styled_page(t, p) = Resource.styled_page(t, styles, default_layout(p))
post_layout(p) =
<div id=#post>{Post.to_xhtml(p)}</div>
- default_layout(content) =
+ @server default_layout(content) =
mem = get_mem_usage()
sysname = get_sys_sysname()
nodename = get_sys_nodename()
View
5 src/main.opa
@@ -1,6 +1,7 @@
package opaque.main
import opaque.admin
import opaque.layout
+import opaque.config
// plugins
import opaque.bsl.native
@@ -15,12 +16,12 @@ room = Network.cloud("room"): Network.network(xhtml)
do MathJax.reload(#output)
SHJS.highlight()
-update() =
+@publish update() =
v = Upskirt.render_to_xhtml(Dom.get_value(#entry))
do Network.broadcast(v, room)
Dom.clear_value(#entry)
-mainpage() = Layout.styled_page("Blog - main page",
+mainpage() = Layout.styled_page(Config.title,
<p>Result:</p><br/><div id=#output onready={_ -> Network.add_callback(broadcast, room)}></div>
<br/>
<div id=#inputarea>

0 comments on commit 7321424

Please sign in to comment.
Something went wrong with that request. Please try again.