This commit is contained in:
Jorijn van der Graaf 2025-11-12 21:24:23 +01:00
commit 02c07ceaa2
6 changed files with 575 additions and 31 deletions

View file

@ -14,9 +14,17 @@ namespace Catcrafts {
std::string RenderBlog() {
std::string html = "";
for(const BlogPost& post : *posts) {
html += std::format("{}<br>{}<br><br>{}", post.name, post.date, post.content);
html += std::format(R"(
<div class="post fade-in">
<div class="post-header">
<h2 class="post-title">{}</h2>
<span class="post-date">{}</span>
</div>
<div class="post-content">
{}
</div>
</div>)", post.name, post.date, post.content);
}
return html;
}
}
}