From 5b8b76078ca1eb04ad787b1884b1c1e79b2273c8 Mon Sep 17 00:00:00 2001 From: Benjamin Barenblat Date: Sat, 16 Mar 2013 16:25:45 -0400 Subject: Decouple a bunch of stuff into Config and Template --- main.ur | 43 +++---------------------------------------- 1 file changed, 3 insertions(+), 40 deletions(-) (limited to 'main.ur') diff --git a/main.ur b/main.ur index 1d3483b..7fe5845 100644 --- a/main.ur +++ b/main.ur @@ -18,45 +18,8 @@ with 6.947. If not, see . *) open Styles - -(********************************* Template **********************************) - -fun generic (pageName : option string) (content : xbody) : xhtml [] [] = - let val titleString : string = - case pageName of - | None => "6.947 – Functional Programming Project Laboratory" - | Some s => "6.947 – " ^ s - in - - - {[titleString]} - - - - {content} -
-

- 6.947 is free software: you can redistribute it and/or modify it under the terms of the gnu Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. -

- -

- 6.947 is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose. - See the gnu Affero General Public License for more details. -

- -

- You can get the 6.947 source code via AFS. -

-
- -
- end - - -(*********************************** Pages ***********************************) - -and main () = - return (generic None +fun main () = + return (Template.generic None {Menu.header (make [#Main] ())}

@@ -69,7 +32,7 @@ and main () = and forum () = forumWorker Forum.main and forumWorker (f : unit -> xbody) = - return (generic (Some "Forum") + return (Template.generic (Some "Forum") {Menu.header (make [#Forum] ())} {f ()} ) -- cgit v1.2.3