Version 0 of Wibble examples

Updated 2010-11-06 17:40:43 by AMG

AMG: This page contains example pages and applications for the Wibble web server.

There may be some overlap with the Wibble zone handlers page. If all you have is a zone handler, put it in the zone handlers page. If you are explaining it in the context of a complete application, put it here. If you're showing off a useful modification of Wibble, maybe put that here too. And if you have a sample page or template, that's also welcome here.

Hello world

AMG: Put this in a file called index.html.tmpl and see what happens.

% dict set response header content-type text/html
<html><head><title>Hello from Wibble! - $uri</title></head><body>
% set rand [expr {rand()}]
% if {$rand > 0.5} {
random=[format %.3f $rand] &gt; 0.5<br/>
% } else {
random=[format %.3f $rand] &lt;= 0.5<br/>
% }
time/date=[clock format [clock seconds]]<br/>
milliseconds=[clock milliseconds]<br/>
clicks=[clock clicks]<br/>
% if {![dict exists $query noiframe]} {
<iframe src="/?noiframe" width="100%"/>
% }
</body></html>