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>,
|
||||
}
|
||||
|
||||
#[derive(Content)]
|
||||
#[derive(Content, Clone)]
|
||||
struct Project {
|
||||
name: String,
|
||||
url: String,
|
||||
|
@ -84,9 +84,21 @@ pub async fn get_page(config: Config) -> std::string::String {
|
|||
config.tmpl.render(
|
||||
"contrib2.html",
|
||||
PortfolioTemplate {
|
||||
projects: data,
|
||||
waiting: Vec::new(),
|
||||
closed: Vec::new(),
|
||||
projects: data
|
||||
.iter()
|
||||
.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 {
|
||||
page_title: Some("Mes contributions".to_string()),
|
||||
|
|
Loading…
Reference in a new issue