Advertisement
Guest User

Untitled

a guest
Aug 20th, 2014
1,167
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
D 0.54 KB | None | 0 0
  1. auto buildPage() {
  2.     auto doc = new Html();
  3.  
  4.     with (doc) {
  5.         with (head) {
  6.             title("das title");
  7.             link[$.rel = "foobar", $.type = "text/css"];
  8.         }
  9.         with (body_)
  10.             with(div[$.class_ = "mainDiv"])
  11.                 with (ul)
  12.                     foreach(i; 0 .. 5)
  13.                         with (li[$.id = i, $.class_ = "listItem"]) {
  14.                             text("I am bulletpoint #");
  15.                             text(i);
  16.                         }
  17.     }
  18.  
  19.     return doc.render();
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement