summaryrefslogtreecommitdiff
path: root/template.ur
blob: f731d1055258f0f3165317d9f94dc5fbcfae46bf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
(* Template -- site templates
Copyright (C) 2013  Benjamin Barenblat <bbaren@mit.edu>

This file is a part of 6.947.

6.947 is 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 should have received a copy of the GNU Affero General Public License along
with 6.947.  If not, see <http://www.gnu.org/licenses/>. *)

open Styles

fun pageTitleTag nameOpt =
    let val titleString =
	    case nameOpt of
		| None => "6.947 – Functional Programming Project Laboratory"
		| Some s => "6.947 – " ^ s
    in
	<xml>
	  <title>{[titleString]}</title>
	</xml>
    end

fun generic (pageName : option string) (content : xbody) : xhtml [] [] =
    <xml>
      <head>
	{pageTitleTag pageName}
	<link rel="stylesheet" type="text/css" href="//bbaren.scripts.mit.edu/urweb/6.947-static/site.css"/>
	<link rel="stylesheet" type="text/css" href="//bbaren.scripts.mit.edu/urweb/6.947-static/forum/forum.css"/>
      </head>
      <body>
	{content}
	<div class={footer}>
	  <p>
	    6.947 is free software: you can redistribute it and/or modify it under the terms of the <a href="//gnu.org/licenses/agpl"><span class={smallCaps}>gnu</span> Affero General Public License</a> as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
	  </p>

	  <p>
	    6.947 is distributed in the hope that it will be useful, but <span class={smallCaps}>without any warranty</span>; without even the implied warranty of <span class={smallCaps}>merchantability</span> or <span class={smallCaps}>fitness for a particular purpose</span>.
	    See the <span class={smallCaps}>gnu</span> Affero General Public License for more details.
	  </p>

	  <p>
	    You can get the 6.947 source code <a href="//benjamin.barenblat.name/hg/6.947/">via Mercurial</a>.
	  </p>
	</div>
      </body>
    </xml>