chore(renamed): removed froxy prefix on folders
This commit is contained in:
parent
e57bb34a35
commit
6960959794
29 changed files with 32 additions and 12 deletions
|
|
@ -1,41 +0,0 @@
|
|||
use smol_str::SmolStr;
|
||||
|
||||
pub use crate::templates::PROFILE as TEMPLATE;
|
||||
|
||||
pub fn add_to_context(env: &mut minijinja::Environment) {
|
||||
if env.get_template("template.html").is_err() {
|
||||
crate::meta_template::add_to_context(env);
|
||||
}
|
||||
if env.get_template("open_modal.html").is_err() {
|
||||
crate::open_modal::add_to_context(env);
|
||||
}
|
||||
|
||||
env.add_template("profile.html", TEMPLATE).unwrap();
|
||||
}
|
||||
|
||||
pub fn render(env: &minijinja::Environment, data: ProfileData) -> Result<String, minijinja::Error> {
|
||||
let template = env.get_template("profile.html")?;
|
||||
template.render(data)
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
|
||||
pub struct ProfileUser {
|
||||
pub position: Option<SmolStr>,
|
||||
pub last_active: Option<SmolStr>,
|
||||
pub image: String,
|
||||
pub name: SmolStr,
|
||||
pub pool: Option<SmolStr>,
|
||||
pub is_friend: bool,
|
||||
|
||||
pub github: Option<String>,
|
||||
pub website: Option<String>,
|
||||
pub discord: Option<String>,
|
||||
|
||||
/// profile description
|
||||
pub recit: Option<String>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
|
||||
pub struct ProfileData {
|
||||
pub user: ProfileUser,
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue