Test vibe.d initial commit.

- Now ready for tutorial section: "Incremental updates"
This commit is contained in:
Jonathan Harker 2016-02-05 16:06:23 +13:00
commit 04d90b7c7a
7 changed files with 135 additions and 0 deletions

6
views/hello.dt Normal file
View file

@ -0,0 +1,6 @@
doctype html
html
head
title HELLO
body
h1 HELLO

15
views/index.dt Normal file
View file

@ -0,0 +1,15 @@
doctype html
html
head
title Welcome to Webchat
body
h1 Welcome to Webchat
p Choose a chatroom:
form(action="/room", method="GET")
p
label(for="room") Chat room:
input#room(name="room", type="text", autofocus="true")
p
label(for="nick") Your Name:
input#nick(name="nick", type="text")
button(type="submit") Go

18
views/room.dt Normal file
View file

@ -0,0 +1,18 @@
doctype html
html
head
title #{room} - Webchat
style.
textarea, input { width: 100%; }
textarea { resize: vertical; }
body
h1 Room '#{room}'
textarea#history(rows=20, readonly=true)
- foreach (m; messages)
|= m
form(action="room", method="POST")
input(type="hidden", name="room", value=room)
input(type="hidden", name="nick", value=nick)
input#inputLine(type="text", name="message", autofocus=true)