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!(
|
maud::html!(
|
||||||
div class="card" id=(card_id) {
|
div class="card" id=(card_id) {
|
||||||
@if let Some(icon) = &self.icon {
|
@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) };
|
h3 { (self.name) };
|
||||||
p { (self.description) };
|
p { (self.description) };
|
||||||
|
|
|
@ -8,9 +8,9 @@ use rocket::{get, launch, routes, State};
|
||||||
mod config;
|
mod config;
|
||||||
mod site;
|
mod site;
|
||||||
|
|
||||||
#[get("/icon/<file>")]
|
#[get("/static/<file>")]
|
||||||
async fn icon_res(file: &str) -> Option<NamedFile> {
|
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()
|
NamedFile::open(path).await.ok()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -19,6 +19,8 @@ pub fn main_page(c: &State<Config>) -> RawHtml<String> {
|
||||||
RawHtml(site::gen_site(c))
|
RawHtml(site::gen_site(c))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// todo : fav icon
|
||||||
|
|
||||||
#[launch]
|
#[launch]
|
||||||
async fn rocket() -> _ {
|
async fn rocket() -> _ {
|
||||||
let conf_path: String = std::env::args()
|
let conf_path: String = std::env::args()
|
||||||
|
|
Loading…
Add table
Reference in a new issue