i hate css
This commit is contained in:
parent
232e8e1a92
commit
b45ab7aef5
|
@ -2,6 +2,8 @@
|
|||
mod routes;
|
||||
mod templates;
|
||||
|
||||
use std::sync::Mutex;
|
||||
|
||||
use actix_web::{web, App, HttpServer};
|
||||
use actix_files as actix_fs;
|
||||
|
||||
|
@ -13,7 +15,7 @@ pub(crate) async fn start_actix(config: &Config, database: Database) -> anyhow::
|
|||
log::info!("Serving an http server at http://{bindip}");
|
||||
HttpServer::new(move || {
|
||||
App::new()
|
||||
.app_data(actix_web::web::Data::new(database.clone()))
|
||||
.app_data(actix_web::web::Data::new(Mutex::new(database.clone())))
|
||||
.route("/", web::get().to(routes::index)) // index.html
|
||||
.service(actix_fs::Files::new("/static", "./static").index_file("index.html")) // static directory
|
||||
.service(web::redirect("/favicon.ico", "/static/favicon.ico")) //? special redirect for favicon
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
|
BIN
static/assets/uwu.jpg
Normal file
BIN
static/assets/uwu.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.5 KiB |
|
@ -34,7 +34,7 @@ a:link {
|
|||
}
|
||||
|
||||
#content {
|
||||
width: 60%;
|
||||
width: 50%;
|
||||
}
|
||||
|
||||
#main-pane {
|
||||
|
|
|
@ -1,3 +1,16 @@
|
|||
|
||||
|
||||
|
||||
.post {
|
||||
border: 2px solid purple;
|
||||
height: 10%;
|
||||
/* position: relative;
|
||||
object-fit: contain; */
|
||||
}
|
||||
|
||||
.post-img {
|
||||
/* width: fit-content;
|
||||
height: fit-content;
|
||||
position: relative;
|
||||
width: fit-content; */
|
||||
}
|
|
@ -6,6 +6,7 @@
|
|||
<title>placeholder</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<link rel="stylesheet" href="/static/css/global.css">
|
||||
<link rel="stylesheet" href="/static/css/index.css">
|
||||
|
||||
</head>
|
||||
|
||||
|
@ -34,8 +35,14 @@
|
|||
|
||||
<div class="box" id="content-pane">
|
||||
|
||||
|
||||
<p>{{placeholder}}</p>
|
||||
|
||||
<div class="post">
|
||||
<img class="post-img" src="/static/assets/uwu.jpg" alt="post img">
|
||||
<h3 class="post-title">Title text</h3>
|
||||
<h5 class="post-desc">Description text</h5>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue
Block a user