mason/autohandler, mason/sheet: Don't wrap HTML around dealing sheet.
authorMark Wooding <mdw@distorted.org.uk>
Tue, 15 Jul 2014 17:52:10 +0000 (18:52 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Tue, 15 Jul 2014 17:52:10 +0000 (18:52 +0100)
Move the HTML into a method, so (a) it's still provided automatically to
individual components that want it, but (b) the plain text dealing sheet
can turn it off.

mason/autohandler
mason/sheet

index 4673c61..85058e5 100644 (file)
@@ -1,3 +1,9 @@
+%# -*-html-*-
+<&| SELF:wrapper &>\
+% $m->call_next;
+</&>\
+%#
+<%method wrapper>
 <!-- -*-html-*-
   -
   - Dealing sheet common HTML header
@@ -17,7 +23,7 @@
 </head>
 <body>
 
-% $m->call_next;
+<% $m->content %>
 
 <div class=footer>
 Written by Mark Wooding.<br>
@@ -25,6 +31,7 @@ Part of a small <a href="/~mdw/deal/">collection of bridge tools</a>.
 </div>
 </body>
 </html>
+</%method>
 %#
 <%method title>(Untitled page)</%method>
 <%method header></%method>
index 2c867a2..3b85d7e 100755 (executable)
@@ -18,3 +18,5 @@ use Deal;
 $n => 50
 $nbox => 4
 </%args>
+%#
+<%method wrapper><% $m->content %></%method>