Compare View

switch
from
...
to
 
Commits (4)
web/frameworks/adminlte4/sidebar.anubis
... ... @@ -45,7 +45,7 @@ define List(HTML)
45 45 event(onclick, load_content(_target_id, _action, _extra, _replace, _overlay))],text(_T(_text)))),
46 46  
47 47 title(_title_id, subtitle, _classes, _text) then
48   - p([class(if subtitle then "menu_subtitle" else "menu_title"), class((if _title_id=selected then " active" else "")+ " "+join(" ", _classes))], text([],_T(_text)))
  48 + li([class(if subtitle then "menu_subtitle" else "nav-header"), class((if _title_id=selected then " active" else "")+ " "+join(" ", _classes))], text([],_T(_text)))
49 49 // p([class("menu_title"), class("item "+_title_id+"_icon"+if _title_id=selected then " selected" else ""+ " "+join(" ", _classes))], text([],_T(_text)))
50 50 },
51 51 make_sidebar(_T, t, selected, [ entry . so_far])
... ...
web/making_a_web_site.anubis
... ... @@ -1195,6 +1195,7 @@ public define CoreAttrs action(WEB_Action_Name action, List((String,String)) ext
1195 1195 public define CoreAttrs formmethod(String value) = attr("formmethod", value).
1196 1196 public define CoreAttrs form(String value) = attr("form", value).
1197 1197 public define CoreAttrs for(String value) = attr("for", value).
  1198 +public define CoreAttrs role(String value) = attr("role", value).
1198 1199  
1199 1200 /**********/
1200 1201 public define HTML format_label(HTML_Label _label, HTML_Id _id).
... ... @@ -1409,17 +1410,23 @@ public define HTML h1(List(CoreAttrs) attrs, HTML content) = html_tag("h1
1409 1410 public define HTML h1(CoreAttrs attr, HTML content) = html_tag("h1", [attr], [content]).
1410 1411 public define HTML h1(List(HTML) content) = html_tag("h1", content).
1411 1412 public define HTML h1(HTML content) = html_tag("h1", [content]).
  1413 +
1412 1414 // <h2>
1413 1415 public define HTML h2(List(CoreAttrs) attrs, List(HTML) content) = html_tag("h2", attrs, content).
  1416 +public define HTML h2(CoreAttrs attr, List(HTML) content) = html_tag("h2", [attr], content).
1414 1417 public define HTML h2(List(CoreAttrs) attrs, HTML content) = html_tag("h2", attrs, [content]).
  1418 +public define HTML h2(CoreAttrs attr, HTML content) = html_tag("h2", [attr], [content]).
1415 1419 public define HTML h2(List(HTML) content) = html_tag("h2", content).
1416 1420 public define HTML h2(HTML content) = html_tag("h2", [content]).
  1421 +
1417 1422 // <h3>
1418 1423 public define HTML h3(List(CoreAttrs) attrs, List(HTML) content) = html_tag("h3", attrs, content).
  1424 +public define HTML h3(CoreAttrs attr, List(HTML) content) = html_tag("h3", [attr], content).
1419 1425 public define HTML h3(List(CoreAttrs) attrs, HTML content) = html_tag("h3", attrs, [content]).
1420   -public define HTML h3(List(HTML) content) = html_tag("h3", content).
1421   -public define HTML h3(HTML content) = html_tag("h3", [content]).
1422   -public define HTML h3(String content) = html_tag("h3", [text(content)]).
  1426 +public define HTML h3(CoreAttrs attr, HTML content) = html_tag("h3", [attr], [content]).
  1427 +public define HTML h3(List(HTML) content) = html_tag("h3", [], content).
  1428 +public define HTML h3(HTML content) = html_tag("h3", [], [content]).
  1429 +public define HTML h3(String content) = html_tag("h3", [text(content)]).
1423 1430  
1424 1431 // <h4>
1425 1432 public define HTML h4(List(CoreAttrs) attrs, List(HTML) content) = html_tag("h4", attrs, content).
... ... @@ -1446,14 +1453,15 @@ public define HTML hr(CoreAttrs attr) = htm
1446 1453 // <i>
1447 1454 public define HTML i(List(CoreAttrs) attrs, List(HTML) content) = html_tag("i", attrs, content).
1448 1455 public define HTML i(List(CoreAttrs) attrs, HTML content) = html_tag("i", attrs, [content]).
1449   -public define HTML i(List(CoreAttrs) attrs) = html_tag("i", attrs).
  1456 +public define HTML i(List(CoreAttrs) attrs) = html_tag("i", attrs, []).
  1457 +public define HTML i(CoreAttrs attr) = html_tag("i", [attr], []).
1450 1458 public define HTML i(CoreAttrs attr, List(HTML) content) = html_tag("i", [attr], content).
1451 1459 public define HTML i(CoreAttrs attr, HTML content) = html_tag("i", [attr], [content]).
1452   -public define HTML i(List(HTML) content) = html_tag("i", content).
1453   -public define HTML i(HTML content) = html_tag("i", [content]).
1454   -public define HTML i(String string) = html_tag("i", [text(string)]).
1455   -public define HTML i(CoreAttrs attr, String string) = html_tag("i", [attr], [text(string)]).
1456   -public define HTML i(List(CoreAttrs) attrs, String string) = html_tag("i", attrs, [text(string)]).
  1460 +public define HTML i(List(HTML) content) = html_tag("i", [], content).
  1461 +public define HTML i(HTML content) = html_tag("i", [], [content]).
  1462 +public define HTML i(String string) = html_tag("i", [], [text(string)]).
  1463 +public define HTML i(CoreAttrs attr, String string) = html_tag("i", [attr], [text(string)]).
  1464 +public define HTML i(List(CoreAttrs) attrs, String string) = html_tag("i", attrs, [text(string)]).
1457 1465  
1458 1466 // <iframe>
1459 1467 public define HTML iframe(CoreAttrs _attr, String src, Int width, Int height) =
... ... @@ -4608,11 +4616,11 @@ define Printable_tree
4608 4616 }
4609 4617 .
4610 4618  
4611   -define Printable_tree // c'est le nôtre et c'est meilleur
4612   - format
4613   - (
4614   - HTML_Meta m,
4615   - ) =
  4619 + define Printable_tree // c'est le nôtre et c'est meilleur
  4620 + format
  4621 + (
  4622 + HTML_Meta m,
  4623 + ) =
4616 4624 if m is
4617 4625 {
4618 4626 keywords(l) then ["<meta name=\"keywords\" content=\"",format_keywords(l),"\" />\n"],
... ... @@ -4662,6 +4670,8 @@ define Printable_tree
4662 4670 define Printable_tree
4663 4671 _format_html_head
4664 4672 (
  4673 + CommonInfo cinfo,
  4674 + Bool is_https,
4665 4675 List(HTML_Head_Tag) lwf,
4666 4676 Printable_tree so_far,
4667 4677 Dictionary(String, Word32) js_dict
... ... @@ -4675,35 +4685,35 @@ define Printable_tree
4675 4685 if h is
4676 4686 {
4677 4687 meta(meta) then
4678   - [format(meta) . _format_html_head(t, so_far, js_dict)],
  4688 + [format(cinfo, meta, is_https) . _format_html_head(cinfo, is_https, t, so_far, js_dict)],
4679 4689 title(title) then
4680   - ["<title>"+title+"</title>\n" . _format_html_head(t, so_far, js_dict)],
  4690 + ["<title>"+title+"</title>\n" . _format_html_head(cinfo, is_https, t, so_far, js_dict)],
4681 4691 js(jsf) then
4682 4692 since jsf is js_file(filename, _),
4683 4693 if js_dict.get(filename) is
4684 4694 {
4685 4695 failure then
4686 4696 forget(js_dict.insert(filename, 0));
4687   - [add_js_files([jsf]) . _format_html_head(t, so_far, js_dict)],
  4697 + [add_js_files([jsf]) . _format_html_head(cinfo, is_https, t, so_far, js_dict)],
4688 4698  
4689 4699 success(_) then
4690   - _format_html_head(t, so_far, js_dict),
  4700 + _format_html_head(cinfo, is_https, t, so_far, js_dict),
4691 4701 }
4692 4702 js_inline(jsi) then
4693 4703 if jsi is
4694 4704 {
4695 4705 script(type, _) then
4696   - ["<script type=\"" + type + "\">"+content(jsi)+"</script>\n" . _format_html_head(t, so_far, js_dict)],
  4706 + ["<script type=\"" + type + "\">"+content(jsi)+"</script>\n" . _format_html_head(cinfo, is_https, t, so_far, js_dict)],
4697 4707 }
4698 4708 css(cssf) then
4699 4709 since cssf is css_file(file_name, media),
4700   - ["<link rel=\"stylesheet\" type=\"text/css\" href=\""+file_name+"\" media=\""+to_String(media)+"\" />\n" . _format_html_head(t, so_far, js_dict)],
  4710 + ["<link rel=\"stylesheet\" type=\"text/css\" href=\""+file_name+"\" media=\""+to_String(media)+"\" />\n" . _format_html_head(cinfo, is_https, t, so_far, js_dict)],
4701 4711  
4702 4712 css_inline(cssi) then
4703   - ["<style>"+cssi+"</style>\n" . _format_html_head(t, so_far, js_dict)]
  4713 + ["<style>"+cssi+"</style>\n" . _format_html_head(cinfo, is_https, t, so_far, js_dict)]
4704 4714  
4705 4715 link(link_attrs) then
4706   - ["<link " + to_String(link_attrs) + " />\n" . _format_html_head(t, so_far, js_dict)]
  4716 + ["<link " + to_String(link_attrs) + " />\n" . _format_html_head(cinfo, is_https, t, so_far, js_dict)]
4707 4717 }
4708 4718 }
4709 4719 .
... ... @@ -4711,19 +4721,23 @@ define Printable_tree
4711 4721 public define Printable_tree
4712 4722 format_html_head
4713 4723 (
  4724 + CommonInfo cinfo,
  4725 + Bool is_https,
4714 4726 List(HTML_Head_Tag) lwf,
4715 4727 String charset
4716 4728 )
4717 4729 =
4718   - _format_html_head((List(HTML_Head_Tag))[ meta(http_equiv("content-type", "text/html; charset="+charset)) . lwf], [], make_dictionary((Word32)0, dictionaryComparerString)).
  4730 + _format_html_head(cinfo, is_https, (List(HTML_Head_Tag))[ meta(http_equiv("content-type", "text/html; charset="+charset)) . lwf], [], make_dictionary((Word32)0, dictionaryComparerString)).
4719 4731  
4720 4732 public define Printable_tree
4721 4733 format_html_head
4722 4734 (
  4735 + CommonInfo cinfo,
  4736 + Bool is_https,
4723 4737 List(HTML_Head_Tag) lwf
4724 4738 )
4725 4739 =
4726   - _format_html_head(lwf, [], make_dictionary((Word32)0, dictionaryComparerString)).
  4740 + _format_html_head(cinfo, is_https, lwf, [], make_dictionary((Word32)0, dictionaryComparerString)).
4727 4741  
4728 4742  
4729 4743 public type HTML_ajax_content:
... ... @@ -4846,7 +4860,7 @@ public define AWP_Handler_Answer //Printable_tree
4846 4860 [doctype_w3c_header,
4847 4861 // html_header,
4848 4862  
4849   - "<head>\n", format_html_head(head_tags + *p_content_head_tags, charset),"</head>\n",
  4863 + "<head>\n", format_html_head(cinfo, is_https, head_tags + *p_content_head_tags, charset),"</head>\n",
4850 4864 ],
4851 4865 printable_tree([
4852 4866 "HTTP/1.1 " + status_string, crlf,
... ... @@ -4865,7 +4879,7 @@ public define AWP_Handler_Answer //Printable_tree
4865 4879 with
4866 4880 answer_body_body = (Printable_tree)
4867 4881 [ "<body ", format_attrs(options), ">", // format body options
4868   - format(cinfo,ic_v,element,is_https, var(0), p_content_head_tags),
  4882 + format(cinfo, ic_v, element, is_https, var(0), p_content_head_tags),
4869 4883 "</body>\n",
4870 4884 "</html>"
4871 4885 ],
... ... @@ -4878,20 +4892,8 @@ public define AWP_Handler_Answer //Printable_tree
4878 4892 add_js_files(js_files),
4879 4893 add_script(script),
4880 4894 "<link rel=\"shortcut icon\" href=\"favicon.ico\" />\n",
4881   - "<script type = \"text/javascript\" language=\"JavaScript\">",
4882   - " function show_local_popup(divname,stvname) {",
4883   - " if (document.layers) { var d = eval(document.divname); } else\n",
4884   - " if (document.getElementById) { var d = eval(\"document.getElementById(divname)\"); } else\n",
4885   - " if (document.all) { var d = eval(document.all.divname.style)};\n",
4886   - // " alert(typeof(eval(stvname))); ",
4887   - " var s = eval(stvname); ",
4888   - " if (s[0]==0) ",
4889   - " { s[0]=1; d.style.visibility = 'visible'; d.zIndex = 100; } else\n",
4890   - " { s[0]=0; d.style.visibility = 'hidden'; }; }",
4891   - "</script>\n",
4892 4895 "<title>",title,"</title>\n", // put title
4893   - //format(cinfo,metas,is_https,charset), // format the metas
4894   - format_html_head(head_tags + *p_content_head_tags, charset),
  4896 + format_html_head(cinfo, is_https, head_tags + *p_content_head_tags, charset),
4895 4897 "</head>\n"
4896 4898 ],
4897 4899 printable_tree([
... ...