Commit f5fc1817 authored by jan.koester's avatar jan.koester
Browse files

test

parent 7e4846f4
Loading
Loading
Loading
Loading
+8 −0
Changes for src/theme.cpp: 8 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -551,6 +551,14 @@ void blogi::Theme::printSite(const int tid,libhtmlpp::HtmlString &output,libhtml
                        } else if (!hasLoading) {
                            hel->setAttribute("loading", "lazy");
                        }
                    } else if (hel->getTagname() == "video") {
                        bool hasPreload = false;
                        for (auto *attr = hel->firstAttribute(); attr; attr = attr->nextAttribute()) {
                            if (attr->getKey() == "preload") hasPreload = true;
                        }
                        if (!hasPreload) {
                            hel->setAttribute("preload", "none");
                        }
                    }
                    for (auto *child = hel->firstChild(); child; child = child->nextElement())
                        optimizeContentImages(child);