diff --git a/web/CXM_making_a_web_site.anubis b/web/CXM_making_a_web_site.anubis index 1670309..a4ed6b8 100644 --- a/web/CXM_making_a_web_site.anubis +++ b/web/CXM_making_a_web_site.anubis @@ -1733,11 +1733,40 @@ public type HTML_Off_Form: button (List(CoreAttrs), List(HTML_Off_Form) content), i (List(CoreAttrs), String text), span (List(CoreAttrs), String text), - hr (List(CoreAttrs)) + hr (List(CoreAttrs)), + h1 (List(CoreAttrs), List(HTML_Off_Form) content), + h2 (List(CoreAttrs), List(HTML_Off_Form) content), + h3 (List(CoreAttrs), List(HTML_Off_Form) content), + h4 (List(CoreAttrs), List(HTML_Off_Form) content), + h5 (List(CoreAttrs), List(HTML_Off_Form) content), + h6 (List(CoreAttrs), List(HTML_Off_Form) content) . 'HTML_Off_Form' defines all the elements you may put outside any form. +public define HTML_Off_Form h1(HTML_Off_Form content) = h1([], [content]). +public define HTML_Off_Form h1(List(HTML_Off_Form) content) = h1([], content). +public define HTML_Off_Form h1(List(CoreAttrs) attrs, HTML_Off_Form content) = h1(attrs, [content]). + +public define HTML_Off_Form h2(HTML_Off_Form content) = h2([], [content]). +public define HTML_Off_Form h2(List(HTML_Off_Form) content) = h2([], content). +public define HTML_Off_Form h2(List(CoreAttrs) attrs, HTML_Off_Form content) = h2(attrs, [content]). + +public define HTML_Off_Form h3(HTML_Off_Form content) = h3([], [content]). +public define HTML_Off_Form h3(List(HTML_Off_Form) content) = h3([], content). +public define HTML_Off_Form h3(List(CoreAttrs) attrs, HTML_Off_Form content) = h3(attrs, [content]). + +public define HTML_Off_Form h4(HTML_Off_Form content) = h4([], [content]). +public define HTML_Off_Form h4(List(HTML_Off_Form) content) = h4([], content). +public define HTML_Off_Form h4(List(CoreAttrs) attrs, HTML_Off_Form content) = h4(attrs, [content]). + +public define HTML_Off_Form h5(HTML_Off_Form content) = h5([], [content]). +public define HTML_Off_Form h5(List(HTML_Off_Form) content) = h5([], content). +public define HTML_Off_Form h5(List(CoreAttrs) attrs, HTML_Off_Form content) = h5(attrs, [content]). + +public define HTML_Off_Form h6(HTML_Off_Form content) = h6([], [content]). +public define HTML_Off_Form h6(List(HTML_Off_Form) content) = h6([], content). +public define HTML_Off_Form h6(List(CoreAttrs) attrs, HTML_Off_Form content) = h6(attrs, [content]). public define HTML_Off_Form image(String url) = image([], url, url). public define HTML_Off_Form image(List(CoreAttrs) attrs, String url) = image(attrs, url, url). @@ -3934,16 +3963,17 @@ public define String ). public define String - format_extra_operands - ( - List((String,String)) l - ) = - if l is - { - [ ] then "", - [h . t] then if h is (n,v) then - "&"+n+"="+v+format_extra_operands(t) - }. + format_extra_operands + ( + List((String,String)) l + ) = + if l is + { + [ ] then "", + [h . t] then if h is (n,v) then + "&"+n+"="+v+format_extra_operands(t) + } +. It seams that the standard requires "&" instead of "&" ! @@ -3951,21 +3981,22 @@ public define String In case the target is another window, we need to format the options for this window. define String - format - ( - List(Other_Window_Option) l - ) = - if l is - { - [ ] then "", - [h . t] then if h is - { - resizable then "resizable", - scrollbars then "scrollbars", - width(w) then "width="+w, - height(h2) then "height="+h2 - } + if t is [ ] then "" else (","+format(t)) - }. + format + ( + List(Other_Window_Option) l + ) = + if l is + { + [ ] then "", + [h . t] then if h is + { + resizable then "resizable", + scrollbars then "scrollbars", + width(w) then "width="+w, + height(h2) then "height="+h2 + } + if t is [ ] then "" else (","+format(t)) + } +. @@ -3991,7 +4022,7 @@ public define Printable_tree ) = if l is { - [ ] then [ ], + [ ] then [ ], [h . t] then if h = selected.value then ["\n" . format_choices(t)] else ["\n" . format_choices(t,selected)] @@ -4251,10 +4282,10 @@ define List(CoreAttrs) . define Printable_tree - format - ( - List(Actioner_Local_Action) l - ) = + format + ( + List(Actioner_Local_Action) l + ) = if l is { [ ] then [ ], @@ -5782,12 +5813,14 @@ define Printable_tree format(cinfo,ic_v,any_span(opts,t),format_element,is_https, action_count, head_tags), hr(opts) then format(cinfo,ic_v,any_hr(opts),format_element,is_https, action_count, head_tags), - - }. - - - - + h1(opts, l) then ["