Posted By

lalzy on 08/22/14


Tagged

LISP webdevelopment Restas sexml


Versions (?)

Restas page


 / Published in: Lisp
 

Quick test-page with restas

  1. (defun home-page ()
  2. (<:a :href (restas:genurl 'login) "Login"))
  3.  
  4. (defun login-page (usr pass btn)
  5. (<:html
  6. (<:body
  7. (<:form
  8. usr ": " (<:input :type "text" :name "username" ) (<:br)
  9. pass ": " (<:input :type "password" :name "password" ) (<:br)
  10. (<:input :type "submit" :value btn)))))
  11.  
  12.  
  13. (restas:define-route main ("")
  14. (home-page))
  15.  
  16. (restas:define-route login ("login")
  17. (login-page "Username" "Password" "Login"))

Report this snippet  

You need to login to post a comment.