Add repo count to templates

This commit is contained in:
Valentin Brandl
2019-06-12 21:50:45 +02:00
parent 615460c87b
commit 60dc242e5a
10 changed files with 38 additions and 44 deletions

View File

@ -1,4 +1,3 @@
use crate::{config::Opt, templates};
use structopt::StructOpt;
pub struct VersionInfo<'a> {
@ -16,19 +15,4 @@ pub(crate) const FAVICON: &[u8] = include_bytes!("../static/favicon32.png");
lazy_static! {
pub(crate) static ref CLIENT: reqwest::Client = reqwest::Client::new();
pub(crate) static ref OPT: Opt = Opt::from_args();
pub(crate) static ref INDEX: Vec<u8> = {
let mut buf = Vec::new();
templates::index(&mut buf, VERSION_INFO, &OPT.domain).unwrap();
buf
};
pub(crate) static ref P404: Vec<u8> = {
let mut buf = Vec::new();
templates::p404(&mut buf, VERSION_INFO).unwrap();
buf
};
pub(crate) static ref P500: Vec<u8> = {
let mut buf = Vec::new();
templates::p500(&mut buf, VERSION_INFO).unwrap();
buf
};
}