Use version info struct
This commit is contained in:
parent
bdf9d382d4
commit
1f807a14fb
@ -1,4 +1,6 @@
|
|||||||
@(title: &str, header: &str, content: Content, commit: &str, version: &str)
|
@use crate::VersionInfo;
|
||||||
|
|
||||||
|
@(title: &str, header: &str, content: Content, version_info: VersionInfo)
|
||||||
|
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
@ -32,7 +34,7 @@
|
|||||||
<nav>
|
<nav>
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<small>HoC v@version - <a href="https://github.com/vbrandl/hoc/commit/@commit">@commit</a></small>
|
<small>HoC v@version_info.version - <a href="https://github.com/vbrandl/hoc/commit/@version_info.commit">@version_info.commit</a></small>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</nav>
|
</nav>
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
@use super::base;
|
@use super::base;
|
||||||
|
@use crate::VersionInfo;
|
||||||
|
|
||||||
@(commit: &str, version: &str, domain: &str)
|
@(version_info: VersionInfo, domain: &str)
|
||||||
|
|
||||||
@:base("Hits-of-Code Badges", "Hits-of-Code Badges", {
|
@:base("Hits-of-Code Badges", "Hits-of-Code Badges", {
|
||||||
|
|
||||||
@ -60,4 +61,4 @@ my <a href="https://mirror.oldsql.cc/key.asc">GPG key</a>
|
|||||||
(<a href="http://pool.sks-keyservers.net/pks/lookup?op=get&search=0x1FFE431282F4B8CC0A7579167FB009175885FC76">from a
|
(<a href="http://pool.sks-keyservers.net/pks/lookup?op=get&search=0x1FFE431282F4B8CC0A7579167FB009175885FC76">from a
|
||||||
keyserver</a>), or by using any other UID from my key.
|
keyserver</a>), or by using any other UID from my key.
|
||||||
</p>
|
</p>
|
||||||
}, commit, version)
|
}, version_info)
|
||||||
|
@ -1,11 +1,12 @@
|
|||||||
@use super::base;
|
@use super::base;
|
||||||
|
@use crate::VersionInfo;
|
||||||
|
|
||||||
@(commit: &str, version: &str, domain: &str, path: &str, url: &str, hoc: u64, head: &str, commit_url: &str)
|
@(version_info: VersionInfo, domain: &str, path: &str, url: &str, hoc: u64, hoc_pretty: &str, head: &str, commit_url: &str)
|
||||||
|
|
||||||
@:base("Hits-of-Code Badges", "Overview", {
|
@:base("Hits-of-Code Badges", "Overview", {
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
The project at <a href="@url">@url</a> has <strong>@hoc</strong> hits of code at <a href="@commit_url">@head</a>.
|
The project <a href="@url">@url</a> has <strong>@hoc_pretty</strong> (exactly @hoc) hits of code at <a href="@commit_url">@head</a>.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
@ -15,4 +16,4 @@ To include the badge in your readme, use the following markdown:
|
|||||||
<pre>
|
<pre>
|
||||||
[![Hits-of-Code](https://@domain/@path)](https://@domain/view/@path)
|
[![Hits-of-Code](https://@domain/@path)](https://@domain/view/@path)
|
||||||
</pre>
|
</pre>
|
||||||
}, commit, version)
|
}, version_info)
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
@use super::base;
|
@use super::base;
|
||||||
|
@use crate::VersionInfo;
|
||||||
|
|
||||||
@(commit: &str, version: &str)
|
@(version_info: VersionInfo)
|
||||||
|
|
||||||
@:base("Page not Found - Hits-of-Code Badges", "404 - Page not Found", {
|
@:base("Page not Found - Hits-of-Code Badges", "404 - Page not Found", {
|
||||||
<p>
|
<p>
|
||||||
@ -10,4 +11,4 @@
|
|||||||
<p>
|
<p>
|
||||||
If you think, this is a mistake on my side, please <a href="mailto:mail+hoc@@vbrandl.net">drop me a mail</a>.
|
If you think, this is a mistake on my side, please <a href="mailto:mail+hoc@@vbrandl.net">drop me a mail</a>.
|
||||||
</p>
|
</p>
|
||||||
}, commit, version)
|
}, version_info)
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
@use super::base;
|
@use super::base;
|
||||||
|
@use crate::VersionInfo;
|
||||||
|
|
||||||
@(commit: &str, version: &str)
|
@(version_info: VersionInfo)
|
||||||
|
|
||||||
@:base("Internal Server Error - Hits-of-Code Badges", "500 - Internal Server Error", {
|
@:base("Internal Server Error - Hits-of-Code Badges", "500 - Internal Server Error", {
|
||||||
<p>
|
<p>
|
||||||
@ -10,4 +11,4 @@
|
|||||||
<p>
|
<p>
|
||||||
If you think, this is a bug, please <a href="mailto:mail+hoc@@vbrandl.net">drop me a mail</a>.
|
If you think, this is a bug, please <a href="mailto:mail+hoc@@vbrandl.net">drop me a mail</a>.
|
||||||
</p>
|
</p>
|
||||||
}, commit, version)
|
}, version_info)
|
||||||
|
Loading…
Reference in New Issue
Block a user