update
This commit is contained in:
parent
84dc769e88
commit
02c07ceaa2
6 changed files with 575 additions and 31 deletions
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue