diff options
author | Vika <vika@fireburn.ru> | 2022-05-07 20:28:43 +0300 |
---|---|---|
committer | Vika <vika@fireburn.ru> | 2022-05-07 20:28:43 +0300 |
commit | 139b7ec10bc7f08dae9bd57eef8eff73fbb22061 (patch) | |
tree | 973c4d903e731cb5e38b682f22c38c3da1dbcd92 /src/frontend/login.rs | |
parent | 0679de841840c74ab49f54905783fac1faf028e1 (diff) | |
download | kittybox-139b7ec10bc7f08dae9bd57eef8eff73fbb22061.tar.zst |
Split into different crates
Templates and utility types are now separate crates to speed up compilation, linting and potential reuse/replacement. Potentially more crates could be split out/modularized, resulting in speedups, smaller binaries (whenever features are excluded) and even more reuse capabilities.
Diffstat (limited to 'src/frontend/login.rs')
-rw-r--r-- | src/frontend/login.rs | 19 |
1 files changed, 1 insertions, 18 deletions
diff --git a/src/frontend/login.rs b/src/frontend/login.rs index 35ce3db..9665ce7 100644 --- a/src/frontend/login.rs +++ b/src/frontend/login.rs @@ -9,24 +9,7 @@ use std::str::FromStr; use crate::frontend::templates::Template; use crate::frontend::{FrontendError, IndiewebEndpoints}; use crate::{database::Storage, ApplicationState}; - -markup::define! { - LoginPage { - form[method="POST"] { - h1 { "Sign in with your website" } - p { - "Signing in to Kittybox might allow you to view private content " - "intended for your eyes only." - } - - section { - label[for="url"] { "Your website URL" } - input[id="url", name="url", placeholder="https://example.com/"]; - input[type="submit"]; - } - } - } -} +use kittybox_templates::LoginPage; pub async fn form<S: Storage>(req: Request<ApplicationState<S>>) -> Result { let owner = req.url().origin().ascii_serialization() + "/"; |