fix
This commit is contained in:
parent
8eaee638a9
commit
1608b7a337
2 changed files with 5 additions and 3 deletions
|
@ -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) };
|
||||
|
|
|
@ -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()
|
||||
|
|
Loading…
Add table
Reference in a new issue