diff -r f58fd8461e10 -r de22ded6d50a src/html.cpp
--- a/src/html.cpp Tue Feb 25 18:22:55 2025 +0100
+++ b/src/html.cpp Tue Feb 25 18:46:17 2025 +0100
@@ -134,17 +134,19 @@
}
}
-void html::h1(const std::string& heading) {
+void html::heading_repo(const std::string& repo) {
indent();
- printf("
%s
\n", encode(heading).c_str());
+ printf("%s
\n", encode(repo).c_str());
}
-void html::h2(const std::string& heading) {
+void html::heading_author(const std::string& author, unsigned int total_commits) {
indent();
- printf("%s
\n", encode(heading).c_str());
+ printf("%s
\n",
+ total_commits,
+ encode(author).c_str());
}
-void html::table_begin(year y) {
+void html::table_begin(year y, const std::array &commits_per_month) {
static constexpr const char* months[] = {"Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"};
// compute the column spans, first
unsigned colspans[12] = {};
@@ -169,7 +171,8 @@
puts(" | ");
for (unsigned i = 0 ; i < 12 ; i++) {
indent();
- printf("%s | \n", colspans[i], months[i]);
+ printf("%s | \n",
+ commits_per_month[i], colspans[i], months[i]);
}
indent(-1);
puts("");