blob: 37f931a20875342c4963e12ef04fe3afbad171ff (
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
|
style date
style topic
fun main () : transaction page =
toggle <- source False;
return <xml>
<head>
<link rel="stylesheet" type="text/css" href="http://adam.chlipala.net/style.css"/>
</head>
<body>
<button dynClass={b <- signal toggle;
return (if b then date else topic)}
dynStyle={b <- signal toggle;
return (if b then
STYLE "width: 500px"
else
STYLE "width: 200px")}
onclick={b <- get toggle; set toggle (not b)}/>
<button dynStyle={b <- signal toggle;
return (if b then
STYLE "width: 200px"
else
STYLE "width: 100px")}/>
<button dynClass={b <- signal toggle;
return (if b then
topic
else
date)}/>
</body>
</xml>
|