From b3c1b6ccac740df5473c624352f3ae978290d0f0 Mon Sep 17 00:00:00 2001 From: Relintai Date: Sat, 30 Oct 2021 23:31:54 +0200 Subject: [PATCH] Added content quick tag. --- core/html/html_builder.cpp | 9 +++++++++ core/html/html_builder.h | 1 + 2 files changed, 10 insertions(+) diff --git a/core/html/html_builder.cpp b/core/html/html_builder.cpp index e29ca41..b0e9aaf 100644 --- a/core/html/html_builder.cpp +++ b/core/html/html_builder.cpp @@ -23,16 +23,25 @@ HTMLTag *HTMLTag::cls(const std::string &val) { return this; } + HTMLTag *HTMLTag::id(const std::string &val) { attrib("id", val); return this; } + HTMLTag *HTMLTag::name(const std::string &val) { attrib("name", val); return this; } + +HTMLTag *HTMLTag::content(const std::string &val) { + attrib("content", val); + + return this; +} + HTMLTag *HTMLTag::value(const std::string &val) { attrib("value", val); diff --git a/core/html/html_builder.h b/core/html/html_builder.h index 4692c9a..ddc9c0b 100644 --- a/core/html/html_builder.h +++ b/core/html/html_builder.h @@ -20,6 +20,7 @@ public: HTMLTag *cls(const std::string &val); HTMLTag *id(const std::string &val); HTMLTag *name(const std::string &val); + HTMLTag *content(const std::string &val); HTMLTag *value(const std::string &val); HTMLTag *method(const std::string &val); HTMLTag *type(const std::string &val);