diff options
author | Benjamin Barenblat <bbaren@mit.edu> | 2013-04-27 18:04:33 -0400 |
---|---|---|
committer | Benjamin Barenblat <bbaren@mit.edu> | 2013-04-27 18:04:33 -0400 |
commit | e2e9fc3d1885f882df487aec0e01ee543fae3bf6 (patch) | |
tree | 1728c377ef229a0b2a8955936820b505ed04c1af /forum/forum.ur | |
parent | 5d3a14ec537289416c77cff6b8610991ec463f60 (diff) |
Forum: More layout tweaking
Diffstat (limited to 'forum/forum.ur')
-rw-r--r-- | forum/forum.ur | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/forum/forum.ur b/forum/forum.ur index d017900..6e62b83 100644 --- a/forum/forum.ur +++ b/forum/forum.ur @@ -25,6 +25,8 @@ open Asker style questionList style questionMetadata +style questionEntryTitle +style questionEntryBody table question : { Id : int, Title : string, @@ -47,19 +49,22 @@ fun prettyPrintQuestion row : xbody = </xml> fun main () : transaction page = - newestQuestions <- queryX (SELECT * FROM question) prettyPrintQuestion; + newestQuestions <- queryX (SELECT * FROM question + ORDER BY Question.Id DESC + LIMIT 5) + prettyPrintQuestion; askerOpt <- getName; return ( Template.generic (Some "Forum") <xml> <div class={content}> - <p>All questions:</p> + <h2>Latest questions</h2> <ul class={questionList}> {newestQuestions} </ul> - <p>Ask a new question:</p> + <h2>Ask a new question</h2> <form> - <textbox {#Title} size=80 /><br /> - <textarea {#Body} rows=12 cols=80 /><br /> + <textbox {#Title} placeholder="Title" class={questionEntryTitle} /><br /> + <textarea {#Body} class={questionEntryBody} /><br /> Asking as: <select {#Asker}> {case askerOpt of |