summaryrefslogtreecommitdiff
path: root/main.ur
blob: fa8cf7ea7db8dc2af2cf8ad9c60c6495fbd59df0 (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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
(* Copyright 2015 Google Inc.
Copyright 2016 Benjamin Barenblat

Licensed under the Apache License, Version 2.0 (the “License”); you may not use
this file except in compliance with the License.  You may obtain a copy of the
License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed
under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR
CONDITIONS OF ANY KIND, either express or implied.  See the License for the
specific language governing permissions and limitations under the License. *)

open Mdl

type nextAction = string

val actionsForTesting =
  Cons ("Print cover for TPS report",
  Cons ("Collect information for TPS report",
  Cons ("Generate charts for TPS report",
  Cons ("Lorem ipsum dolor sit amet",
  Nil))))

(* Forces JavaScript to be enabled on the given page, so as to pull in external
scripts specified in the .urp file. *)
val forceJavaScript = <xml><script code={return ()} /></xml>

fun renderNextAction action =
  <xml>
    <li class="mdl-list__item">
      <span class="mdl-list__item-primary-content">
        {[action]}
      </span>
    </li>
  </xml>


val main =
  setHeader (blessResponseHeader "X-UA-Compatible") "IE=edge";
  return <xml>
    <head>
      (* TODO(bbaren): Write a meta-description tag. *)
      <meta name="viewport" content="width=device-width, initial-scale=1.0" />
      <title>Next actions</title>

      (* Disable tap highlight on IE. *)
      <meta name="msapplication-tap-highlight" content="no" />

      (* TODO(bbaren): Support homescreen tiles for Chrome on Android, Safari on
      iOS, and Windows 8. *)

      (* Color the status bar on mobile devices. *)
      <meta name="theme-color" content="#9c27b0" />

      (* Material Design Lite *)
      <link rel="stylesheet" href="https://code.getmdl.io/1.1.3/material.purple-orange.min.css" />
      <link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons" />
      {forceJavaScript}
    </head>
    <body>
      <div class="mdl-layout mdl-js-layout mdl-layout--fixed-header">
        <div class="mdl-layout__header mdl-layout__header--waterfall mdl-layout__header--waterfall-hide-top">
          <div class="mdl-layout__header-row">
            <span class="mdl-layout-title">Next actions</span>
          </div>
        </div>
        <div class="mdl-layout__content">
          <ul class="mdl-list">
            {List.mapX renderNextAction actionsForTesting}
          </ul>
        </div>
      </div>
    </body>
  </xml>