.set("class", "switch_label");
}
void write_title(std::ostream& ost,
const startgit::repository& repo,
const std::string& branch_name)
{
using namespace hemplate; // NOLINT
ost << html::h1(repo.get_name());
ost << html::h2(repo.get_description());
ost << html::label("Branch: ").set("for", "branch");
ost << html::select(
{{"id", "branch"}, {"onChange", "switchPage(this.value)"}});
for (const auto& branch : repo.get_branches()) {
auto option = html::option(branch.get_name());
option.set("value", branch.get_name());
if (branch.get_name() == branch_name) {
option.set("selected", "true");
}
ost << option;
}
ost << html::select();
}
void write_commit_table(std::ostream& ost, git2wrap::revwalk& rwalk)
{
using namespace hemplate; // NOLINT