From e2e9fc3d1885f882df487aec0e01ee543fae3bf6 Mon Sep 17 00:00:00 2001 From: Benjamin Barenblat Date: Sat, 27 Apr 2013 18:04:33 -0400 Subject: Forum: More layout tweaking --- forum/forum.css | 16 +++++++++++----- forum/forum.ur | 15 ++++++++++----- forum/lib.urp | 4 ++-- site.css | 10 ++++++++++ 4 files changed, 33 insertions(+), 12 deletions(-) diff --git a/forum/forum.css b/forum/forum.css index 1250be2..56b0763 100644 --- a/forum/forum.css +++ b/forum/forum.css @@ -18,6 +18,7 @@ .Forum_questionList { list-style-type: none; + margin-top: 0; padding-left: 0; } @@ -25,13 +26,18 @@ margin-bottom: 1em; } -.Forum_questionList h3 { - font-size: 1.15em; - margin: 0; -} - .Forum_questionMetadata { padding-left: 2em; font-style: italic; color: hsl(0, 0%, 65%); } + +.Forum_questionEntryTitle, .Forum_questionEntryBody { + font-family: sans-serif; + font-size: 0.8em; + width: 40em; +} + +.Forum_questionEntryBody { + height: 15em; +} 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 = 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")
-

All questions:

+

Latest questions

    {newestQuestions}
-

Ask a new question:

+

Ask a new question

-
-