From 272e47b262435cb4b6080c7cdf924e56ea62aa67 Mon Sep 17 00:00:00 2001 From: totoro Date: Sun, 12 Dec 2021 00:59:17 +0100 Subject: [PATCH] remove some alternative from HTML_Off_Form to move it as html_tag or some are completely removed due to their useless preformated move to html_tag pre progress move to html_tag progress center removed mail_to removed scroller removed fixed_size removed fixed_size_2 removed --- web/controllers_web_site.anubis | 6 +++--- web/making_a_web_site.anubis | 87 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------------------------- web/types/making_a_web_site.anubis | 18 +++++++++--------- 3 files changed, 68 insertions(+), 43 deletions(-) diff --git a/web/controllers_web_site.anubis b/web/controllers_web_site.anubis index f1de826..eff966e 100644 --- a/web/controllers_web_site.anubis +++ b/web/controllers_web_site.anubis @@ -151,9 +151,9 @@ define HTTP_Answer // content of page sequence([ - preformated([size(14)],"Anubis Web Server - Standard Lib v1.19.0.0 - Anubis language v1.19"), - preformated([size(12)],"Error "+to_String(http_status)), - preformated([size(12)],"Internal message :"+message), + pre("Anubis Web Server - Standard Lib v1.19.0.0 - Anubis language v1.19"), + pre("Error "+to_String(http_status)), + pre("Internal message :"+message), br, in_form(html_Id(""),text_area(wan(""), init(dump(_session)), 120, 60)) ]) diff --git a/web/making_a_web_site.anubis b/web/making_a_web_site.anubis index a261611..e4803b7 100644 --- a/web/making_a_web_site.anubis +++ b/web/making_a_web_site.anubis @@ -680,6 +680,7 @@ public define Printable_tree [WebArgValue x . Printable_tree y] = str_pt(x.valu public define Printable_tree [InitialValue x . Printable_tree y] = str_pt(x.value, y). public define CoreAttrs attr(String name, Bool value) = attr(name, if value then "true" else "false"). +public define CoreAttrs attr(String name, Int value) = attr(name, to_String(value)). public define InputAttrs attr(String name, Bool value) = attr(name, if value then "true" else "false"). @@ -1566,6 +1567,27 @@ public define HTML_Off_Form p(CoreAttrs attr, HTML_Off_Form content) public define HTML_Off_Form p(List(HTML_Off_Form) content) = html_tag("p", [], content). public define HTML_Off_Form p(HTML_Off_Form content) = html_tag("p", [], [content]). + //
  preformatted
+public define HTML_Off_Form pre(List(CoreAttrs) attrs, List(HTML_Off_Form) content)         = html_tag("pre", attrs, content).
+public define HTML_Off_Form pre(List(CoreAttrs) attrs, HTML_Off_Form content)               = html_tag("pre", attrs, [content]).
+public define HTML_Off_Form pre(CoreAttrs attr, List(HTML_Off_Form) content)                = html_tag("pre", [attr], content).
+public define HTML_Off_Form pre(CoreAttrs attr, HTML_Off_Form content)                      = html_tag("pre", [attr], [content]).
+public define HTML_Off_Form pre(List(HTML_Off_Form) content)                                = html_tag("pre", [],    content).
+public define HTML_Off_Form pre(HTML_Off_Form content)                                      = html_tag("pre", [],    [content]).
+public define HTML_Off_Form pre(String string)                                              = html_tag("pre", [],     [text(string)]).
+public define HTML_Off_Form pre(CoreAttrs attr, String string)                              = html_tag("pre", [attr], [text(string)]).
+public define HTML_Off_Form pre(List(CoreAttrs) attrs, String string)                       = html_tag("pre", attrs,  [text(string)]).
+
+  // 
+public define HTML_Off_Form progress(List(CoreAttrs) attrs, Int value, Int max, List(HTML_Off_Form) content)  = html_tag("progress", [attr("value", value), attr("max", max) . attrs],  content).
+public define HTML_Off_Form progress(List(CoreAttrs) attrs, Int value, Int max, HTML_Off_Form content)        = html_tag("progress", [attr("value", value), attr("max", max) . attrs],  [content]).
+public define HTML_Off_Form progress(CoreAttrs _attr, Int value, Int max, HTML_Off_Form content)               = html_tag("progress", [attr("value", value), attr("max", max) , _attr],   [content]).
+public define HTML_Off_Form progress(Int value, Int max, HTML_Off_Form content)                               = html_tag("progress", [attr("value", value), attr("max", max)], [content]).
+public define HTML_Off_Form progress(List(CoreAttrs) attrs, Int value, Int max, String content)               = html_tag("progress", [attr("value", value), attr("max", max) . attrs], [text(content)]).
+public define HTML_Off_Form progress(CoreAttrs _attr, Int value, Int max, String content)                      = html_tag("progress", [attr("value", value), attr("max", max), _attr], [text(content)]).
+public define HTML_Off_Form progress(Int value, Int max, String content)                                      = html_tag("progress", [attr("value", value), attr("max", max)], [text(content)]).
+
+
   // 
public define HTML_Off_Form section(List(CoreAttrs) attrs, List(HTML_Off_Form) content) = html_tag("section", attrs, content). public define HTML_Off_Form section(List(CoreAttrs) attrs, HTML_Off_Form content) = html_tag("section", attrs, [content]). @@ -1643,23 +1665,26 @@ public define HTML_Off_Form th(CoreAttrs attr, String string) public define HTML_Off_Form th(List(CoreAttrs) attrs, String string) = html_tag("th", attrs, [text(string)]). // -public define HTML_Off_Form td(List(CoreAttrs) attrs, List(HTML_Off_Form) content) = html_tag("td", attrs, content). -public define HTML_Off_Form td(List(CoreAttrs) attrs, HTML_Off_Form content) = html_tag("td", attrs, [content]). -public define HTML_Off_Form td(CoreAttrs attr, List(HTML_Off_Form) content) = html_tag("td", [attr], content). -public define HTML_Off_Form td(CoreAttrs attr, HTML_Off_Form content) = html_tag("td", [attr], [content]). -public define HTML_Off_Form td(List(HTML_Off_Form) content) = html_tag("td", [], content). -public define HTML_Off_Form td(HTML_Off_Form content) = html_tag("td", [], [content]). -public define HTML_Off_Form td(String string) = html_tag("td", [], [text(string)]). -public define HTML_Off_Form td(CoreAttrs attr, String string) = html_tag("td", [attr], [text(string)]). -public define HTML_Off_Form td(List(CoreAttrs) attrs, String string) = html_tag("td", attrs, [text(string)]). +public define HTML_Off_Form td(List(CoreAttrs) attrs, List(HTML_Off_Form) content) = html_tag("td", attrs, content). +public define HTML_Off_Form td(List(CoreAttrs) attrs, HTML_Off_Form content) = html_tag("td", attrs, [content]). +public define HTML_Off_Form td(CoreAttrs attr, List(HTML_Off_Form) content) = html_tag("td", [attr], content). +public define HTML_Off_Form td(CoreAttrs attr, HTML_Off_Form content) = html_tag("td", [attr], [content]). +public define HTML_Off_Form td(List(HTML_Off_Form) content) = html_tag("td", [], content). +public define HTML_Off_Form td(HTML_Off_Form content) = html_tag("td", [], [content]). +public define HTML_Off_Form td(List(CoreAttrs) attrs, String string) = html_tag("td", attrs, [text(string)]). +public define HTML_Off_Form td(CoreAttrs attr, String string) = html_tag("td", [attr], [text(string)]). +public define HTML_Off_Form td(String string) = html_tag("td", [], [text(string)]). +public define HTML_Off_Form td(List(CoreAttrs) attrs, Int i) = html_tag("td", attrs, [text(to_decimal(i))]). +public define HTML_Off_Form td(CoreAttrs attr, Int i) = html_tag("td", [attr], [text(to_decimal(i))]). +public define HTML_Off_Form td(Int i) = html_tag("td", [], [text(to_decimal(i))]). // -public define HTML_Off_Form tr(List(CoreAttrs) attrs, List(HTML_Off_Form) content) = html_tag("tr", attrs, content). -public define HTML_Off_Form tr(List(CoreAttrs) attrs, HTML_Off_Form content) = html_tag("tr", attrs, [content]). -public define HTML_Off_Form tr(CoreAttrs attr, List(HTML_Off_Form) content) = html_tag("tr", [attr], content). -public define HTML_Off_Form tr(CoreAttrs attr, HTML_Off_Form content) = html_tag("tr", [attr], [content]). -public define HTML_Off_Form tr(List(HTML_Off_Form) content) = html_tag("tr", [], content). -public define HTML_Off_Form tr(HTML_Off_Form content) = html_tag("tr", [], [content]). +public define HTML_Off_Form tr(List(CoreAttrs) attrs, List(HTML_Off_Form) content) = html_tag("tr", attrs, content). +public define HTML_Off_Form tr(List(CoreAttrs) attrs, HTML_Off_Form content) = html_tag("tr", attrs, [content]). +public define HTML_Off_Form tr(CoreAttrs attr, List(HTML_Off_Form) content) = html_tag("tr", [attr], content). +public define HTML_Off_Form tr(CoreAttrs attr, HTML_Off_Form content) = html_tag("tr", [attr], [content]). +public define HTML_Off_Form tr(List(HTML_Off_Form) content) = html_tag("tr", [], content). +public define HTML_Off_Form tr(HTML_Off_Form content) = html_tag("tr", [], [content]). //