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 |
|
@ -1,5 +1,5 @@
|
|||
body {
|
||||
|
||||
|
||||
background: url(/static/assets/bg.gif);
|
||||
color: white;
|
||||
font-family: monospace;
|
||||
|
@ -19,7 +19,7 @@ body {
|
|||
text-align: center;
|
||||
width: 100%;
|
||||
margin-top: 10px;
|
||||
|
||||
|
||||
}
|
||||
|
||||
.titlebar {
|
||||
|
@ -34,7 +34,7 @@ a:link {
|
|||
}
|
||||
|
||||
#content {
|
||||
width: 60%;
|
||||
width: 50%;
|
||||
}
|
||||
|
||||
#main-pane {
|
||||
|
@ -71,7 +71,7 @@ a:link {
|
|||
width: 100%;
|
||||
|
||||
}
|
||||
|
||||
|
||||
#content-pane, #sidenav {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
|
@ -88,5 +88,5 @@ a:link {
|
|||
margin-left: 10px;
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -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