Commit dd28e880 authored by Jan Koester's avatar Jan Koester
Browse files

test

parent de0f3bc1
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -669,7 +669,7 @@ extern "C" {

                // --- Wrapper ---
                libhtmlpp::HtmlElement wrapper("div");
                wrapper.setAttribute("class", (rc + "-acc").c_str());
                wrapper.setAttribute("class", (rc + " " + rc + "-acc").c_str());
                std::string customCssId = sanitizeCssId(cssId);
                wrapper.setAttribute("id", (customCssId.empty() ? rc : customCssId).c_str());

@@ -714,6 +714,7 @@ extern "C" {

                // Label span
                libhtmlpp::HtmlElement labelSpan("span");
                labelSpan.setAttribute("data-we-textprop", "header_label");
                labelSpan.appendChild(libhtmlpp::TextElement(headerLabel.c_str()));

                // Icon span (chevron ▾)
+1 −0
Original line number Diff line number Diff line
@@ -1045,6 +1045,7 @@ extern "C" {

                // Unique CSS class for responsive targeting
                std::string responsiveClass = std::string("we-") + getInstanceId().c_str();
                wrapper.setAttribute("class", responsiveClass.c_str());

                auto gradientCss = [](const std::string &type, const std::string &angle, const std::string &c1, const std::string &c2) -> std::string {
                    if (type == "linear") {
+2 −1
Original line number Diff line number Diff line
@@ -691,7 +691,7 @@ extern "C" {

                // Outer container
                libhtmlpp::HtmlElement outer("div");
                outer.setAttribute("class", (rc + "-faq").c_str());
                outer.setAttribute("class", (rc + " " + rc + "-faq").c_str());
                std::string customCssId = sanitizeCssId(cssId);
                outer.setAttribute("id", (customCssId.empty() ? rc : customCssId).c_str());
                outer.setAttribute("itemscope", "");
@@ -708,6 +708,7 @@ extern "C" {
                if (!title.empty()) {
                    libhtmlpp::HtmlElement h("h2");
                    h.setAttribute("class", (rc + "-faq-title").c_str());
                    h.setAttribute("data-we-textprop", "title");
                    std::string hStyle;
                    if (validCss(titleFontSize)) hStyle += "font-size: " + titleFontSize + ";";
                    if (validCss(titleColor))    hStyle += " color: " + titleColor + ";";
+1 −0
Original line number Diff line number Diff line
@@ -675,6 +675,7 @@ extern "C" {

                // Unique CSS class for responsive targeting
                std::string responsiveClass = std::string("we-") + getInstanceId().c_str();
                wrapper.setAttribute("class", responsiveClass.c_str());

                bool hasHoverZoom = (hoverZoom == "in" || hoverZoom == "out");
                if (hasHoverZoom) {
+2 −1
Original line number Diff line number Diff line
@@ -704,10 +704,11 @@ extern "C" {
                btnStyle += " border: none; cursor: pointer;";
                if (hidden) btnStyle += " display: none;";
                btn.setAttribute("style", btnStyle.c_str());
                btn.setAttribute("class", (responsiveClass + "-btn").c_str());
                btn.setAttribute("class", (responsiveClass + " " + responsiveClass + "-btn").c_str());

                std::string openJs = "document.getElementById('" + overlayId + "').style.display='flex';";
                btn.setAttribute("onclick", openJs.c_str());
                btn.setAttribute("data-we-textprop", "button_label");
                btn.appendChild(libhtmlpp::TextElement(buttonLabel.c_str()));

                el.appendChild(btn);
Loading