Some decentralize

This commit is contained in:
2024-03-22 14:09:27 +05:00
parent 54c82537b7
commit a6ab0d0945
5 changed files with 187 additions and 91 deletions

64
src/html.rs Normal file
View File

@ -0,0 +1,64 @@
pub const HEADER_HTML: &str = r#"
<!DOCTYPE html>
<html>
<head></head>
<body>
<header>
<a href="/">index</a>
<a href="/login">login</a>
<a href="/register">register</a>
<hr>
</header>
<main>
"#;
pub const FOOTER_HTML: &str = r#"
</main>
<footer>
<hr>
Render time: RENDER_TIMEns. Made by BitHeaven.
</footer>
</body>
</html>
"#;
pub const INDEX_HTML: &str = "<h1>main</h1>";
pub const LOGIN_HTML: &str = r#"
<h1>login</h1>
<form method="POST">
<input name="login" type="text" placeholder="login / email" required>
<br>
<input name="password" type="password" placeholder="password" required>
<br>
<br>
<button type="submit">login</button>
</form>
"#;
pub const REG_HTML: &str = r#"
<h1>register</h1>
<form method="POST">
<input name="login" type="text" placeholder="login" required>
<br>
<input name="email" type="email" placeholder="email (opt)">
<br>
<input name="password" type="password" placeholder="password" required>
<br>
<input name="password2" type="password" placeholder="password again" required>
<br>
<br>
<button type="submit">register</button>
</form>
"#;
pub const RECOVER_HTML: &str = "<h1>recover</h1>";
pub const NF_HTML: &str = "<h1>404</h1>think about it.";
pub const CSS3: &str = r#"<style>
:root { color-scheme: dark; }
body { margin: auto; max-width: 768px; }
footer { text-align: right; }
</style>"#;