Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

add title configuration option

  • Loading branch information...
commit 7321424c6a482190205f211c63b5e388310a565e 1 parent e865cad
Austin Seipp authored

Showing 3 changed files with 6 additions and 5 deletions. Show diff stats Hide diff stats

  1. +1 0  config.opa
  2. +2 3 src/layout.opa
  3. +3 2 src/main.opa
1  config.opa
@@ -4,6 +4,7 @@ Config = {{
4 4 author = "John Doe"
5 5 email = "joe@blog.me"
6 6 blurb = "Super radical dude"
  7 + title = "John Doe's epic blog"
7 8 links = [ ("http://google.com", "google.com")
8 9 , ("http://opalang.org", "opalang.org") ]
9 10 }}
5 src/layout.opa
@@ -6,14 +6,13 @@ import opaque.config
6 6 Layout = {{
7 7
8 8 @private styles = [ "res/style.css"
9   - , "res/sh_nedit.min.css"
10   - ]
  9 + , "res/sh_nedit.min.css" ]
11 10
12 11 styled_page(t, p) = Resource.styled_page(t, styles, default_layout(p))
13 12 post_layout(p) =
14 13 <div id=#post>{Post.to_xhtml(p)}</div>
15 14
16   - default_layout(content) =
  15 + @server default_layout(content) =
17 16 mem = get_mem_usage()
18 17 sysname = get_sys_sysname()
19 18 nodename = get_sys_nodename()
5 src/main.opa
... ... @@ -1,6 +1,7 @@
1 1 package opaque.main
2 2 import opaque.admin
3 3 import opaque.layout
  4 +import opaque.config
4 5
5 6 // plugins
6 7 import opaque.bsl.native
@@ -15,12 +16,12 @@ room = Network.cloud("room"): Network.network(xhtml)
15 16 do MathJax.reload(#output)
16 17 SHJS.highlight()
17 18
18   -update() =
  19 +@publish update() =
19 20 v = Upskirt.render_to_xhtml(Dom.get_value(#entry))
20 21 do Network.broadcast(v, room)
21 22 Dom.clear_value(#entry)
22 23
23   -mainpage() = Layout.styled_page("Blog - main page",
  24 +mainpage() = Layout.styled_page(Config.title,
24 25 <p>Result:</p><br/><div id=#output onready={_ -> Network.add_callback(broadcast, room)}></div>
25 26 <br/>
26 27 <div id=#inputarea>

0 comments on commit 7321424

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