annotate tests/dynClass.ur @ 2089:5f15f4ce8f3b

Return to working version mode
author Adam Chlipala <adam@chlipala.net>
date Sat, 06 Dec 2014 15:45:41 -0500
parents 2b2d07946e65
children
rev   line source
adam@1751 1 style date
adam@1751 2 style topic
adam@1643 3
adam@1643 4 fun main () : transaction page =
adam@1643 5 toggle <- source False;
adam@1643 6 return <xml>
adam@1643 7 <head>
adam@1751 8 <link rel="stylesheet" type="text/css" href="http://adam.chlipala.net/style.css"/>
adam@1643 9 </head>
adam@1643 10 <body>
adam@1751 11 <button dynClass={b <- signal toggle;
adam@1751 12 return (if b then date else topic)}
adam@1751 13 dynStyle={b <- signal toggle;
adam@1751 14 return (if b then
adam@1751 15 STYLE "width: 500px"
adam@1751 16 else
adam@1751 17 STYLE "width: 200px")}
adam@2012 18 onclick={fn _ => b <- get toggle; set toggle (not b)}/>
adam@1643 19
adam@1751 20 <button dynStyle={b <- signal toggle;
adam@1751 21 return (if b then
adam@1751 22 STYLE "width: 200px"
adam@1751 23 else
adam@1751 24 STYLE "width: 100px")}/>
adam@1751 25 <button dynClass={b <- signal toggle;
adam@1751 26 return (if b then
adam@1751 27 topic
adam@1751 28 else
adam@1751 29 date)}/>
adam@1643 30 </body>
adam@1643 31 </xml>