froxy/templates/examples/profile.rs

27 lines
983 B
Rust

use froxy_templates::profile::{self};
use smol_str::SmolStr;
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}");
}