mirror of
https://github.com/Relintai/rcpp_framework.git
synced 2024-11-14 04:57:21 +01:00
Even more helpers.
This commit is contained in:
parent
7e4c5eeb3e
commit
b8b2d5a3a6
@ -1524,6 +1524,28 @@ HTMLBuilder *HTMLBuilder::fa(const String &href, const String &body, const Strin
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
HTMLTag *HTMLBuilder::div(const String &cls, const String &id) {
|
||||||
|
HTMLTag *t = div();
|
||||||
|
|
||||||
|
if (cls != "") {
|
||||||
|
t->cls(cls);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (id != "") {
|
||||||
|
t->id(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
return t;
|
||||||
|
}
|
||||||
|
|
||||||
|
HTMLBuilder *HTMLBuilder::fdiv(const String &body, const String &cls, const String &id) {
|
||||||
|
div(cls, id);
|
||||||
|
w(body);
|
||||||
|
cdiv();
|
||||||
|
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
//Closing tags
|
//Closing tags
|
||||||
|
|
||||||
HTMLBuilder *HTMLBuilder::ca() {
|
HTMLBuilder *HTMLBuilder::ca() {
|
||||||
|
@ -307,6 +307,9 @@ public:
|
|||||||
HTMLTag *a(const String& href, const String& cls = "", const String& id = "");
|
HTMLTag *a(const String& href, const String& cls = "", const String& id = "");
|
||||||
HTMLBuilder *fa(const String& href, const String& body, const String& cls = "", const String& id = "");
|
HTMLBuilder *fa(const String& href, const String& body, const String& cls = "", const String& id = "");
|
||||||
|
|
||||||
|
HTMLTag *div(const String& cls, const String& id = "");
|
||||||
|
HTMLBuilder *fdiv(const String& body, const String& cls = "", const String& id = "");
|
||||||
|
|
||||||
//closing tags c prefix means close
|
//closing tags c prefix means close
|
||||||
//Note simple tags should not have these like <br>
|
//Note simple tags should not have these like <br>
|
||||||
//Note that I might have a few that shouldn't be here, those will be removed as I find them
|
//Note that I might have a few that shouldn't be here, those will be removed as I find them
|
||||||
|
Loading…
Reference in New Issue
Block a user