This commit is contained in:
JMARyA 2024-09-18 11:15:30 +02:00
parent 8eaee638a9
commit 1608b7a337
Signed by: jmarya
GPG key ID: 901B2ADDF27C2263
2 changed files with 5 additions and 3 deletions

View file

@ -49,7 +49,7 @@ impl Project {
maud::html!(
div class="card" id=(card_id) {
@if let Some(icon) = &self.icon {
img src=(format!("/static/icons/{}", icon)) style="float: left; width: 200px; height: 200px;";
img src=(format!("/static/{}", icon)) style="float: left; width: 200px; height: 200px;margin-right: 80px;";
}
h3 { (self.name) };
p { (self.description) };

View file

@ -8,9 +8,9 @@ use rocket::{get, launch, routes, State};
mod config;
mod site;
#[get("/icon/<file>")]
#[get("/static/<file>")]
async fn icon_res(file: &str) -> Option<NamedFile> {
let path = Path::new("static/icons/").join(file);
let path = Path::new("static").join(file);
NamedFile::open(path).await.ok()
}
@ -19,6 +19,8 @@ pub fn main_page(c: &State<Config>) -> RawHtml<String> {
RawHtml(site::gen_site(c))
}
// todo : fav icon
#[launch]
async fn rocket() -> _ {
let conf_path: String = std::env::args()