From e1c499ee72d135b2671b87338d0b4283b20cbd74 Mon Sep 17 00:00:00 2001 From: Zynh0722 Date: Fri, 7 Apr 2023 20:37:20 -0700 Subject: [PATCH] the site is tolerable now --- dist/css/style.css | 81 ++++++++++++++++++++++++++++++++++++++++++++++ dist/index.html | 51 ++++++++++++++++++++++------- src/main.rs | 2 +- 3 files changed, 122 insertions(+), 12 deletions(-) create mode 100644 dist/css/style.css diff --git a/dist/css/style.css b/dist/css/style.css new file mode 100644 index 0000000..a3e78a1 --- /dev/null +++ b/dist/css/style.css @@ -0,0 +1,81 @@ +body { + background-color: #FCB0B3; + color: #25283D; + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; + height: 100vh; + width: 100vw; + margin: 0; +} + +.main-form { + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; + gap: 1em; +} + +.form-wrapper { + display: flex; + flex-grow: 1; + align-items: center; + justify-content: center; +} + +.cat-img { + width: 250px; + height: 250px; + overflow: hidden; +} + +.cat-img-wrapper { + border-radius: 100%; + overflow: hidden; + display: grid; +} + +#cat-fact { + max-width: 25em; + padding: 0 1em; +} + +[type="file"] { + border: 0; + clip: rect(0, 0, 0, 0); + height: 1px; + overflow: hidden; + padding: 0; + position: absolute !important; + white-space: nowrap; + width: 1px; +} +[type="file"] + label { + background-color: #49DCB1; + border-radius: 1em; + cursor: pointer; + display: inline-block; + padding: 0.5em 1em; +} +[type="file"]:focus + label, +[type="file"] + label:hover { + filter: brightness(1.1); +} +[type="file"]:focus + label { + outline: 1px dotted #000; +} + +[type="submit"] { + all: unset; + background-color: #49DCB1; + border-radius: 1em; + cursor: pointer; + display: inline-block; + padding: 0.5em 1em; +} +[type="submit"]:focus, +[type="submit"]:hover { + filter: brightness(1.1); +} diff --git a/dist/index.html b/dist/index.html index 26c1871..12f8f15 100644 --- a/dist/index.html +++ b/dist/index.html @@ -5,21 +5,50 @@ NyaZoom - + + + -

NyaZoom^2

-
+

NyaZoom2

+
+ +
+ +
+ + - - - - -
- -
- + +

+ +

diff --git a/src/main.rs b/src/main.rs index 2eb1aa1..9f1e503 100644 --- a/src/main.rs +++ b/src/main.rs @@ -31,7 +31,7 @@ async fn main() { let app = Router::new().merge(with_big_body).merge(base); - let addr = SocketAddr::from(([127, 0, 0, 1], 3000)); + let addr = SocketAddr::from(([0, 0, 0, 0], 3000)); tracing::debug!("listening on {}", addr); axum::Server::bind(&addr) .serve(app.layer(TraceLayer::new_for_http()).into_make_service())