Commit 88fedcbaf98231745924d114fcd5d07ca61c7638
1 parent
245d2efe
[+] add html tag helper "iframe"
[-] fix the html img tag helper size by adding px after the number. previous width="100" now width="100px"
Showing
1 changed file
with
10 additions
and
3 deletions
Show diff stats
web/CXM_making_a_web_site.anubis
| ... | ... | @@ -1473,6 +1473,13 @@ public define HTML_Off_Form h6(HTML_Off_Form content) |
| 1473 | 1473 | public define HTML_Off_Form hr = html_void_tag("hr", []). |
| 1474 | 1474 | public define HTML_Off_Form hr(List(CoreAttrs) attrs) = html_void_tag("hr", attrs). |
| 1475 | 1475 | |
| 1476 | + // <iframe> | |
| 1477 | +public define HTML_Off_Form iframe(CoreAttrs _attr, String src, Int width, Int height) = | |
| 1478 | + html_tag("iframe", [_attr, attr("src",src), attr("width",to_String(width)+"px"), attr("height",to_String(height)+"px")], []). | |
| 1479 | +public define HTML_Off_Form iframe(String src, Int width, Int height) = | |
| 1480 | + html_tag("iframe", [attr("src",src), attr("width",to_String(width)+"px"), attr("height",to_String(height)+"px")], []). | |
| 1481 | +public define HTML_Off_Form iframe(String src) = html_tag("iframe", [attr("src",src)], []). | |
| 1482 | + | |
| 1476 | 1483 | // <input> |
| 1477 | 1484 | public define HTML_Off_Form input(List(CoreAttrs) attrs) = html_void_tag("input", attrs). |
| 1478 | 1485 | public define HTML_Off_Form input(CoreAttrs attr) = html_void_tag("input", [attr]). |
| ... | ... | @@ -1484,11 +1491,11 @@ public define HTML_Off_Form img(String src) |
| 1484 | 1491 | public define HTML_Off_Form img(String src, String alt) = img([], src, alt). |
| 1485 | 1492 | public define HTML_Off_Form img(List(CoreAttrs) attrs, String src) = img(attrs, src, ""). |
| 1486 | 1493 | public define HTML_Off_Form img(CoreAttrs attr, String src) = img([attr], src, ""). |
| 1487 | -public define HTML_Off_Form img(String src, Int width, Int height) = img([attr("witdh",to_String(width)), attr("height",to_String(height))], src, src). | |
| 1494 | +public define HTML_Off_Form img(String src, Int width, Int height) = img([attr("width",to_String(width)+"px"), attr("height",to_String(height)+"px")], src, src). | |
| 1488 | 1495 | public define HTML_Off_Form img(List(CoreAttrs) attrs, String src, String alt, Int width, Int height) = |
| 1489 | - html_void_tag("img", attrs + [attr("src",src), attr("alt",alt), attr("witdh",to_String(width)), attr("height",to_String(height))]). | |
| 1496 | + html_void_tag("img", attrs + [attr("src",src), attr("alt",alt), attr("width",to_String(width)+"px"), attr("height",to_String(height)+"px")]). | |
| 1490 | 1497 | public define HTML_Off_Form img(CoreAttrs _attr, String src, String alt, Int width, Int height) = |
| 1491 | - html_void_tag("img", [_attr, attr("src",src), attr("alt",alt), attr("witdh",to_String(width)), attr("height",to_String(height))]). | |
| 1498 | + html_void_tag("img", [_attr, attr("src",src), attr("alt",alt), attr("width",to_String(width)+"px"), attr("height",to_String(height)+"px")]). | |
| 1492 | 1499 | |
| 1493 | 1500 | // <li> |
| 1494 | 1501 | public define HTML_Off_Form li(List(CoreAttrs) attrs, List(HTML_Off_Form) content) = html_tag("li", attrs, content). | ... | ... |