2023-01-30 09:22:45 +01:00
|
|
|
@use super::base_html;
|
2022-08-19 10:34:37 +02:00
|
|
|
@use crate::{statics::VersionInfo, template::RepoGeneratorInfo};
|
2019-05-04 15:38:00 +02:00
|
|
|
|
2022-08-19 10:34:37 +02:00
|
|
|
@(version_info: VersionInfo, repo_count: usize, base_url: &str, repo_info: &RepoGeneratorInfo)
|
2019-05-04 15:38:00 +02:00
|
|
|
|
2023-01-30 09:22:45 +01:00
|
|
|
@:base_html("Hits-of-Code Badges", "Badge Generator", {
|
2019-05-04 15:38:00 +02:00
|
|
|
|
|
|
|
<p>
|
2022-08-19 10:34:37 +02:00
|
|
|
Here is the markdown for the badge for <a href="https://@repo_info.service.url()/@repo_info.user/@repo_info.repo">@repo_info.user/@repo_info.repo</a>
|
2019-05-04 15:38:00 +02:00
|
|
|
</p>
|
|
|
|
|
|
|
|
<pre>
|
2022-08-19 10:34:37 +02:00
|
|
|
[![Hits-of-Code](@base_url/@repo_info.service.service()/@repo_info.user/@repo_info.repo?branch=@repo_info.branch)](@base_url/@repo_info.service.service()/@repo_info.user/@repo_info.repo/view?branch=@repo_info.branch)
|
2019-05-04 15:38:00 +02:00
|
|
|
</pre>
|
|
|
|
|
|
|
|
<p>
|
|
|
|
It will be rendered like this
|
|
|
|
</p>
|
|
|
|
|
|
|
|
<pre>
|
2022-08-19 10:34:37 +02:00
|
|
|
<a href="@base_url/@repo_info.service.service()/@repo_info.user/@repo_info.repo/view?branch=@repo_info.branch"><img src="@base_url/@repo_info.service.service()/@repo_info.user/@repo_info.repo?branch=@repo_info.branch" alt="example badge" /></a>
|
2019-05-04 15:38:00 +02:00
|
|
|
</pre>
|
2019-06-12 21:50:45 +02:00
|
|
|
}, version_info, repo_count)
|