added shadowrun database

This commit is contained in:
2025-06-01 21:19:54 +02:00
parent 71f771b428
commit 69f7f625f8
20 changed files with 738 additions and 103 deletions

View File

@@ -0,0 +1,26 @@
#include <format>
#include "HtmxShAttributeList.hpp"
#include "utils.hpp"
using namespace std;
HtmxShAttributeList::HtmxShAttributeList(const std::string& id, const vector<string>& itemList){
html += format("<h2>{}</h2>", id);
html += "<div class='grid'>";
for (auto& item : itemList){
string item_id = utils::to_id_format(id + "_" + item);
html += format("<label>{}:<input type='text' name='{}'></label>", item, item_id);
}
html += "</div>";
}
HtmxShAttributeList::HtmxShAttributeList(const std::string& id, const std::vector<std::pair<std::string, std::string>>& itemValueList){
html += format("<h2>{}</h2>", id);
html += "<div class='grid'>";
for (auto& item : itemValueList){
string item_id = utils::to_id_format(id + "_" + item.first);
html += format("<label>{}:<input type='text' name='{}' value='{}'></label>", item, item_id, item.second);
}
html += "</div>";
}