<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Codestats for {{ title }}</title>
</head>
<body>
<h1>Codestats for {{ title }}</h1>
<details open>
<summary>
<h2>Summary</h2>
</summary>
<ul>
<li>Files: {{ summary.total_files | fmt_number(ctx) }}</li>
<li>Lines: {{ summary.total_lines | fmt_number(ctx) }}</li>
<li>Size: {{ summary.total_size_human }}</li>
{% if !totals.is_empty() %}<li>Totals: {{ totals }}</li>{% endif %}
</ul>
</details>
<details>
<summary>
<h2>Languages</h2>
</summary>
{% if languages.is_empty() %}
<p>No recognized programming languages found.</p>
{% else %}
<table>
<tr>
<th>Language</th>
<th>Files</th>
<th>Lines</th>
<th>Average Lines per File</th>
<th>Code %</th>
<th>Comment %</th>
<th>Blank %</th>
<th>Shebang %</th>
<th>Size</th>
</tr>
{% for lang in languages %}
<tr>
<td>{{ lang.name }}</td>
<td>{{ lang.files | fmt_number(ctx) }}</td>
<td>{{ lang.lines | fmt_number(ctx) }}</td>
<td>{{ lang.avg_lines_per_file | fmt_float(1) }}</td>
<td>{{ lang.code_percentage | fmt_percent(ctx) }}%</td>
<td>{{ lang.comment_percentage | fmt_percent(ctx) }}%</td>
<td>{{ lang.blank_percentage | fmt_percent(ctx) }}%</td>
<td>{{ lang.shebang_percentage | fmt_percent(ctx) }}%</td>
<td>{{ lang.size_human }}</td>
</tr>
{% endfor %}
</table>
{% endif %}
</details>
{% if show_files %}
<details>
<summary>
<h2>Files</h2>
</summary>
{% for lang in languages %}
{% if let Some(files) = lang.files_detail %}
<h3>{{ lang.name }}</h3>
<table>
<tr>
<th>Path</th>
<th>Lines</th>
<th>Code</th>
<th>Comments</th>
<th>Blanks</th>
<th>Shebangs</th>
<th>Size</th>
</tr>
{% for file in files %}
<tr>
<td>{{ file.path }}</td>
<td>{{ file.total_lines | fmt_number(ctx) }}</td>
<td>{{ file.code_lines | fmt_number(ctx) }}</td>
<td>{{ file.comment_lines | fmt_number(ctx) }}</td>
<td>{{ file.blank_lines | fmt_number(ctx) }}</td>
<td>{{ file.shebang_lines | fmt_number(ctx) }}</td>
<td>{{ file.size_human }}</td>
</tr>
{% endfor %}
</table>
{% endif %}
{% endfor %}
</details>
{% endif %}
</body>
</html>