132 } else { |
132 } else { |
133 puts(" </div>\n </body>\n</html>"); |
133 puts(" </div>\n </body>\n</html>"); |
134 } |
134 } |
135 } |
135 } |
136 |
136 |
|
137 void html::chart_begin(const std::string& repo, const std::string& author) { |
|
138 indent(); |
|
139 printf("<div class=\"chart\" data-repo=\"%s\" data-author=\"%s\">\n", |
|
140 encode(repo).c_str(), encode(author).c_str()); |
|
141 indentation++; |
|
142 } |
|
143 |
|
144 void html::chart_end() { |
|
145 indent(-1); |
|
146 puts("</div>"); |
|
147 } |
|
148 |
137 void html::heading_repo(const std::string& repo) { |
149 void html::heading_repo(const std::string& repo) { |
138 indent(); |
150 indent(); |
139 printf("<h1>%s</h1>\n", encode(repo).c_str()); |
151 printf("<h1 data-repo=\"%s\">%1$s</h1>\n", encode(repo).c_str()); |
140 } |
152 } |
141 |
153 |
142 void html::heading_author(const std::string& author, unsigned int total_commits) { |
154 void html::heading_author(const std::string& author, unsigned int total_commits) { |
143 indent(); |
155 indent(); |
144 printf("<h2 title=\"Total commits: %u\">%s</h2>\n", |
156 printf("<h2 title=\"Total commits: %u\">%s</h2>\n", |