anchor.diff:            (<:submit :value "Submit")))
   
   ;;; /newchar
  -(defpage templ::newchar () ()
  +(defpage newchar () ()
       "Create a character"
  -  (templ::error-messages)
  -  (templ::character-creation-component))
  -
  -(defun templ::character-creation-component ()
  +  (error-messages)
  +  (character-creation-component))
  +
  +(defun character-creation-component ()
     (<:form :name "create-character" :action "/newchar" :method "post"
             (<:label (<:ah "Create a character."))
             (<:br)
  
positive.code:                  (<:input :type "textarea" :id "ooc-input")
                   (<:submit :value "Send"))))
  
  (defun templ::user-input-area ()
    ;; TODO - Maybe let client.js install send_input()?
    (<:form :id "user-input-area" :name "user-input-area" :action "javascript:sykosomatic.send_input()"
            (<:input :type "textarea" :id "user-input")
            (<:submit :value "Send")))
  
  (defun templ::scene-recording ()
    ;; TODO - let client.js install these?
    (<:submit :class "btn" :id "start-recording" :value "Start Recording")
    (<:submit :class "btn" :id "stop-recording" :value "Stop Recording"))
  
  (defun templ::scene-list-link ()
    (<:a :class "btn"
         :href "/scenes" "My Scenes"))
  
  ;;; /role
  (defpage templ::role (characters) ()
      "What role shall you play?"
    (templ::error-messages)
    (templ::character-list characters)
    (<:href "/newchar" "Create a new character.")
    (templ::logout-button))
  
  (defun templ::character-list (characters)
    (<:ul
     (mapc (lambda (char) (<:li (templ::character-link char)))
           characters)))
  
  (defun templ::character-link (char)
    ;; TODO - This ~A smells really bad.
    (<:href (format nil "/stage?char=~A" (string-downcase char))
            (<:ah char)))
  
  ;;; /scenes
  (defpage templ::scenes (scenes) ()
      "My scenes"
    (<:ul :class "scene-list"
          (mapc (lambda (scene)
  
negative.code:       (<:meta :http-equiv "Content-type"
                :content "text/html;charset=UTF-8")
        (<:link :rel "stylesheet" :type "text/css" :href "res/styles.css")
        (jquery-libs)
        (when head-fun (funcall head-fun)))
       (<:body
        (funcall body-fun)))))
  
  (defmacro defpage (name lambda-list (&rest head) title &body body)
    `(defun ,name ,lambda-list
       (page ,title
                    (lambda ()
                      ,@body)
                    ,@(when head
                       `((lambda () ,@head))))))
  
  (defun jquery-libs ()
    (<:link :rel "stylesheet" :type "text/css" :href "res/css/smoothness/jquery-ui-1.8.14.custom.css")
    (<:script :type "text/javascript" :src "res/js/jquery-1.5.1.min.js")
    (<:script :type "text/javascript" :src "res/js/jquery-ui-1.8.14.custom.min.js"))
  
  (defun login-component ()
    (<:form :name "login" :action "/login" :method "post"
            (<:label (<:ah "Log in"))
            (<:label :for "account-name" (<:ah "Email"))
            (<:text :name "account-name"
                    :id "account-name")
            (<:label :for "password" (<:ah "Password"))
            (<:input :type "password" :name "password" :id "password")
            (<:submit :value "Submit")))
  
  (defun logout-button ()
    (<:form :class "logout-button" :action "/logout" :method "post"
            (<:submit :class "btn" :value "Log Out")))
  
  (defun error-messages ()
    ;; This one's a bit leaky. It's pretty special, anyway.
    (when-let ((errors (sykosomatic::session-value 'errors)))
      (<:ul :class "errors"
            (mapc (lambda (err) (<:li (<:ah err))) errors))
      (setf (sykosomatic::session-value 'errors) nil)))
  
  ;;; 404
  (defpage not-found () ()
      "404 Not Found"
    (<:p (<:ah "Sorry, that page does not exist.")))
  
  ;;; /
  (defpage home () ()
      "Sykosomatic.org Dev Site"
    (<:p (<:ah "Sykosomatic is a cooperative storytelling system, currently in development. ")
          (<:href "/login" (<:ah "Log in.")))
    (<:p (<:ah "Already logged in? What are you doing here?! Head to the ")
         (<:href "/stage" (<:ah "Stage!"))))
  
  ;;; /login
  (defpage login () ()
      "Log in"
    (error-messages)
    (login-component)
    (<:href "/signup" (<:ah "Create account.")))
  
  ;;; /stage
  (defpage stage () ((gameplay-js-libs))
      "All the World's a Stage"
    (chat-area)
    #+nil
    (scene-recording)
    #+nil
    (scene-list-link)
    #+nil
    (logout-button))
  
  (defun gameplay-js-libs ()
    ;; When you feel like figuring out why optional loading fails, take the following
    ;; two lines out...
    (<:script :type "text/javascript" :src "res/swfobject.js")
  