hoc/templates/overview.rs.html
Valentin Brandl 4ddaa84e5f Use new aliases for template functions
`page.rs.html` used to result in a function `templates::page`.
Since ructe 0.7.2, `templates::page_html` was used and now the old alias
has been removed.
2023-01-30 09:22:45 +01:00

30 lines
939 B
HTML

@use super::base_html;
@use crate::statics::VersionInfo;
@use crate::template::RepoInfo;
@(version_info: VersionInfo, repo_count: usize, repo_info: RepoInfo, label: String)
@:base_html("Hits-of-Code Badges", "Overview", {
<p>
The project <a href="@repo_info.url">@repo_info.url</a> has
<strong>@repo_info.hoc_pretty</strong> (exactly @repo_info.hoc) hits of code at
<a href="@repo_info.commit_url">@repo_info.head</a> on the
<code>@repo_info.branch</code> branch. The repository contains
<strong>@repo_info.commits</strong> commits.
</p>
<p>
To include the badge in your readme, use the following markdown:
</p>
<pre>
[![@label](@repo_info.base_url/@repo_info.path?branch=@repo_info.branch&label=@label)](@repo_info.base_url/@repo_info.path/view?branch=@repo_info.branch&label=@label)
</pre>
<form method="post" action="/@repo_info.path/delete">
<button type="submit">Rebuild Cache</button>
</form>
}, version_info, repo_count)