Improved the post page
This commit is contained in:
parent
d64e020abb
commit
f638047508
1
.gitignore
vendored
1
.gitignore
vendored
@ -1 +1,2 @@
|
|||||||
/target
|
/target
|
||||||
|
/Files/posts.json
|
||||||
|
@ -14,7 +14,8 @@
|
|||||||
padding-top: 50px;
|
padding-top: 50px;
|
||||||
}
|
}
|
||||||
|
|
||||||
h1 {
|
h1,
|
||||||
|
h2{
|
||||||
color: orange;
|
color: orange;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -125,10 +125,10 @@
|
|||||||
<div id="form-container">
|
<div id="form-container">
|
||||||
<form action="/" method="post" enctype="application/x-www-form-urlencoded">
|
<form action="/" method="post" enctype="application/x-www-form-urlencoded">
|
||||||
|
|
||||||
<label for="name">Name (optionnal):</label>
|
<label for="name">Name</label>
|
||||||
<input type="text" id="name" name="name" required>
|
<input type="text" id="name" name="name" required>
|
||||||
|
|
||||||
<label for="content">Content:</label>
|
<label for="content">Content</label>
|
||||||
<textarea type="input" id="content" name="content" rows="30" cols="55" placeholder="Put your content here. It will be encrypted via DES-256 and stored." required></textarea>
|
<textarea type="input" id="content" name="content" rows="30" cols="55" placeholder="Put your content here. It will be encrypted via DES-256 and stored." required></textarea>
|
||||||
|
|
||||||
<input type="submit" value="submit">
|
<input type="submit" value="submit">
|
||||||
|
@ -0,0 +1 @@
|
|||||||
|
{"name":"qzdqzd","crypt":"EFOUHjEiFhRorSgOQAgOgA==","date":"03/07/2023@18:45:45","id":11295522918797061807}
|
@ -123,9 +123,9 @@ async fn show_post(path: web::Path<(u64, String)>, req: HttpRequest) -> impl Res
|
|||||||
}
|
}
|
||||||
|
|
||||||
let _ = &mut ret_text.push_str(&format!("\n\
|
let _ = &mut ret_text.push_str(&format!("\n\
|
||||||
<b>This is the link to your post. Don't lose it !\
|
<b>Save the link to this page ! We will not store it anywhere.</b><br><br><i>\
|
||||||
It can also be accessed raw using Curl or Wget.</b><br>\n\
|
This page can be also be accessed using curl or wget.</i><hr>\n\
|
||||||
><i>{} @{}</i><br><br>\n<pre>\n", post.name, post.date));
|
<h2>{}</h2>\n<i>{}</i><br><br>\n<pre>\n", post.name, post.date));
|
||||||
|
|
||||||
let _ = match decrypt(post.crypt, &password) {
|
let _ = match decrypt(post.crypt, &password) {
|
||||||
Ok(v) => {
|
Ok(v) => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user