Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

36 lines (30 sloc) 0.901 kb
%% -*- mode: nitrogen -*-
-module (index).
-compile(export_all).
-include_lib("nitrogen/include/wf.hrl").
main() -> #template { file="./site/templates/bare.html" }.
title() -> "Welcome to Nitrogen".
body() ->
#container_12 { body=[
#grid_8 { alpha=true, prefix=2, suffix=2, omega=true, body=inner_body() }
]}.
inner_body() ->
[
#h1 { text="Welcome to Nitrogen" },
#p{},
"
If you can see this page, then your Nitrogen server is up and
running. Click the button below to test postbacks.
",
#p{},
#button { id=button, text="Click me!", postback=click },
#p{},
"
Run <b>./bin/dev help</b> to see some useful developer commands.
"
].
event(click) ->
wf:replace(button, #panel {
body="You clicked the button!",
actions=#effect { effect=highlight }
}).
Jump to Line
Something went wrong with that request. Please try again.