From 7f42e044948bfc620cf26fb047155d3555f9b80a Mon Sep 17 00:00:00 2001 From: fernando Date: Tue, 13 Feb 2024 10:28:30 -0500 Subject: [PATCH] Add dependencies --- Cargo.lock | 12 ++++++++++++ Cargo.toml | 1 + sql/schema.sql | 6 +++--- src/main.rs | 1 + src/model/mod.rs | 0 src/view/fragments/mod.rs | 0 src/view/mod.rs | 2 ++ static/css/input.css | 2 +- 8 files changed, 20 insertions(+), 4 deletions(-) create mode 100644 src/model/mod.rs create mode 100644 src/view/fragments/mod.rs diff --git a/Cargo.lock b/Cargo.lock index e4abab3..c8b84b4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -351,6 +351,7 @@ version = "0.1.0" dependencies = [ "maud", "rocket", + "rocket_session", "serde", "sqlx", ] @@ -1429,6 +1430,17 @@ dependencies = [ "uncased", ] +[[package]] +name = "rocket_session" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a1a0f6637aba596ac1975584479638b9350d54187f4c745584d046b3dd1ea6f" +dependencies = [ + "parking_lot", + "rand", + "rocket", +] + [[package]] name = "rsa" version = "0.9.6" diff --git a/Cargo.toml b/Cargo.toml index 19b0bee..85e31cc 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,5 +8,6 @@ edition = "2021" [dependencies] maud = { version = "0.26.0", features = ["rocket"] } rocket = "0.5.0" +rocket_session = "0.3.0" serde = "1.0.196" sqlx = { version = "0.7.3", features = ["postgres"] } diff --git a/sql/schema.sql b/sql/schema.sql index 7b63fcc..c97a7b8 100644 --- a/sql/schema.sql +++ b/sql/schema.sql @@ -1,9 +1,9 @@ --- PostgreSQL schema for the database +-- MySQL schema for the database -- User table -CREATE TABLE user ( - user_id SERIAL PRIMARY KEY, +CREATE TABLE user ( + user_id INT PRIMARY KEY AUTO_INCREMENT, user_email VARCHAR(50) NOT NULL, user_password VARCHAR(255) NOT NULL, user_names VARCHAR(50) NOT NULL, diff --git a/src/main.rs b/src/main.rs index 8429044..5b05b85 100644 --- a/src/main.rs +++ b/src/main.rs @@ -2,6 +2,7 @@ use rocket::fs::FileServer; mod controller; mod view; +mod model; #[macro_use] extern crate rocket; diff --git a/src/model/mod.rs b/src/model/mod.rs new file mode 100644 index 0000000..e69de29 diff --git a/src/view/fragments/mod.rs b/src/view/fragments/mod.rs new file mode 100644 index 0000000..e69de29 diff --git a/src/view/mod.rs b/src/view/mod.rs index 5620db3..1c08c62 100644 --- a/src/view/mod.rs +++ b/src/view/mod.rs @@ -1,5 +1,7 @@ use maud::{html, Markup, DOCTYPE}; +mod fragments; + #[get("/")] pub fn index() -> Markup { html! { diff --git a/static/css/input.css b/static/css/input.css index 5e02c42..02095ba 100644 --- a/static/css/input.css +++ b/static/css/input.css @@ -9,7 +9,7 @@ @media (prefers-color-scheme: light) { :root { - --c-bg: #fafaf0; + --c-bg: #f8f8fa; --c-on-bg: #101010; } }