Commit 0757408970f296e49cb58b528d4ace4390dc2b04

Authored by David RENÉ
1 parent e9a18d8a

[+] add more helper for <h2>, <h3> and <i> tags

Showing 1 changed file with 16 additions and 9 deletions   Show diff stats
web/making_a_web_site.anubis
... ... @@ -1410,17 +1410,23 @@ public define HTML h1(List(CoreAttrs) attrs, HTML content) = html_tag(&quot;h1
1410 1410 public define HTML h1(CoreAttrs attr, HTML content) = html_tag("h1", [attr], [content]).
1411 1411 public define HTML h1(List(HTML) content) = html_tag("h1", content).
1412 1412 public define HTML h1(HTML content) = html_tag("h1", [content]).
  1413 +
1413 1414 // <h2>
1414 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).
1415 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]).
1416 1419 public define HTML h2(List(HTML) content) = html_tag("h2", content).
1417 1420 public define HTML h2(HTML content) = html_tag("h2", [content]).
  1421 +
1418 1422 // <h3>
1419 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).
1420 1425 public define HTML h3(List(CoreAttrs) attrs, HTML content) = html_tag("h3", attrs, [content]).
1421   -public define HTML h3(List(HTML) content) = html_tag("h3", content).
1422   -public define HTML h3(HTML content) = html_tag("h3", [content]).
1423   -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)]).
1424 1430  
1425 1431 // <h4>
1426 1432 public define HTML h4(List(CoreAttrs) attrs, List(HTML) content) = html_tag("h4", attrs, content).
... ... @@ -1447,14 +1453,15 @@ public define HTML hr(CoreAttrs attr) = htm
1447 1453 // <i>
1448 1454 public define HTML i(List(CoreAttrs) attrs, List(HTML) content) = html_tag("i", attrs, content).
1449 1455 public define HTML i(List(CoreAttrs) attrs, HTML content) = html_tag("i", attrs, [content]).
1450   -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], []).
1451 1458 public define HTML i(CoreAttrs attr, List(HTML) content) = html_tag("i", [attr], content).
1452 1459 public define HTML i(CoreAttrs attr, HTML content) = html_tag("i", [attr], [content]).
1453   -public define HTML i(List(HTML) content) = html_tag("i", content).
1454   -public define HTML i(HTML content) = html_tag("i", [content]).
1455   -public define HTML i(String string) = html_tag("i", [text(string)]).
1456   -public define HTML i(CoreAttrs attr, String string) = html_tag("i", [attr], [text(string)]).
1457   -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)]).
1458 1465  
1459 1466 // <iframe>
1460 1467 public define HTML iframe(CoreAttrs _attr, String src, Int width, Int height) =
... ...