This commit is contained in:
parent
a50d894926
commit
4b85a948bc
1 changed files with 16 additions and 4 deletions
|
@ -21,7 +21,7 @@ struct PortfolioTemplate {
|
||||||
closed: Vec<Project>,
|
closed: Vec<Project>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Content)]
|
#[derive(Content, Clone)]
|
||||||
struct Project {
|
struct Project {
|
||||||
name: String,
|
name: String,
|
||||||
url: String,
|
url: String,
|
||||||
|
@ -84,9 +84,21 @@ pub async fn get_page(config: Config) -> std::string::String {
|
||||||
config.tmpl.render(
|
config.tmpl.render(
|
||||||
"contrib2.html",
|
"contrib2.html",
|
||||||
PortfolioTemplate {
|
PortfolioTemplate {
|
||||||
projects: data,
|
projects: data
|
||||||
waiting: Vec::new(),
|
.iter()
|
||||||
closed: Vec::new(),
|
.cloned()
|
||||||
|
.filter(|p| !p.pulls_merged.is_empty())
|
||||||
|
.collect(),
|
||||||
|
waiting: data
|
||||||
|
.iter()
|
||||||
|
.cloned()
|
||||||
|
.filter(|p| !p.pulls_open.is_empty())
|
||||||
|
.collect(),
|
||||||
|
closed: data
|
||||||
|
.iter()
|
||||||
|
.cloned()
|
||||||
|
.filter(|p| !p.pulls_closed.is_empty())
|
||||||
|
.collect(),
|
||||||
},
|
},
|
||||||
Infos {
|
Infos {
|
||||||
page_title: Some("Mes contributions".to_string()),
|
page_title: Some("Mes contributions".to_string()),
|
||||||
|
|
Loading…
Reference in a new issue