38 lines
1.4 KiB
Rust
38 lines
1.4 KiB
Rust
use froxy_templates::profile::{self};
|
|
use smol_str::SmolStr;
|
|
|
|
/*
|
|
{
|
|
friends: std::array::from_fn::<_, 10, _>(|i| Friend {
|
|
name: "maiboyer".into(),
|
|
image: "https://friends.42paris.fr/proxy/resize/512/03c61af252becbca11aac5ff49a2e61c/maiboyer.jpg".into(),
|
|
position: (i < 5).then_some("f1r1s1".into()),
|
|
last_active: (i > 6).then_some("Last thuesday".into()),
|
|
}).to_vec(),
|
|
}
|
|
*/
|
|
|
|
fn main() {
|
|
let mut env = minijinja::Environment::new();
|
|
profile::add_to_context(&mut env);
|
|
let data = profile::render(
|
|
&env,
|
|
profile::ProfileData {
|
|
user: profile::ProfileUser {
|
|
position: Some(SmolStr::new_static("f1r1s1")),
|
|
last_active: None,
|
|
image: "https://friends.42paris.fr/proxy/resize/512/03c61af252becbca11aac5ff49a2e61c/maiboyer.jpg".into(),
|
|
name: SmolStr::new_static("maiboyer"),
|
|
pool: None, //Some(SmolStr::new_static("August 2025")),
|
|
is_friend: false,
|
|
github: Some("https://github.com/Maix0".to_string()),
|
|
website: None, //Some("https://maix.me".to_string()),
|
|
discord: None,// Some("maix".to_string()),
|
|
recit: Some("Yes".to_string()),
|
|
},
|
|
},
|
|
)
|
|
.unwrap();
|
|
|
|
println!("{data}");
|
|
}
|