Gunwant Jain
6961ed59b4
main: Add arguments and the respective parsing
...
Signed-off-by: Gunwant Jain <mail@wantguns.dev>
2022-01-18 15:47:54 +05:30
Gunwant Jain
f35bad75e5
pretty: embed the theme in-binary
...
Signed-off-by: Gunwant Jain <mail@wantguns.dev>
2022-01-18 13:13:45 +05:30
Gunwant Jain
892e84348d
static_files: embed files in-binary
...
Signed-off-by: Gunwant Jain <mail@wantguns.dev>
2022-01-18 12:16:07 +05:30
Gunwant Jain
33583b71d4
cargo update, fmt and add rust_embed crate
...
Signed-off-by: Gunwant Jain <mail@wantguns.dev>
2022-01-16 23:11:38 +05:30
Gunwant Jain
449f0c38a9
PrettyPaste: Add Fork and New button
...
Signed-off-by: Gunwant Jain <mail@wantguns.dev>
2022-01-16 14:24:10 +05:30
Gunwant Jain
53d96865ad
UI: Use a spacier layout
...
Signed-off-by: Gunwant Jain <mail@wantguns.dev>
2021-12-26 21:01:56 +05:30
Gunwant Jain
cca3a8bec9
refactor code and add dragover visual cue
...
Signed-off-by: Gunwant Jain <mail@wantguns.dev>
2021-12-26 08:41:44 +05:30
Gunwant Jain
04c992e8b3
client: write a simple client for the pastebin
...
Signed-off-by: Gunwant Jain <mail@wantguns.dev>
2021-07-13 21:23:34 +05:30
Gunwant Jain
80c6809414
pretty: remove dead code
...
Signed-off-by: Gunwant Jain <mail@wantguns.dev>
2021-07-13 04:28:27 +05:30
Gunwant Jain
c6262e9e87
add static files
...
we have a favicon now :')
Signed-off-by: Gunwant Jain <mail@wantguns.dev>
2021-07-13 03:49:11 +05:30
Gunwant Jain
1175a57539
index: Add select for choosing languages when pasting
...
Signed-off-by: Gunwant Jain <mail@wantguns.dev>
2021-07-13 01:39:47 +05:30
Gunwant Jain
fbc92b669d
index: drag & drop redirects to the syntax highlighted pages
...
Signed-off-by: Gunwant Jain <mail@wantguns.dev>
2021-07-11 15:50:04 +05:30
Gunwant Jain
9c5a3af128
refactor: bring in the modules
...
Signed-off-by: Gunwant Jain <mail@wantguns.dev>
2021-07-11 03:07:50 +05:30
Gunwant Jain
7726a0e0ee
templates, main: copy and paste images
...
Make use of the Clipboard API. Also vivi dis is for you
Signed-off-by: Gunwant Jain <mail@wantguns.dev>
2021-07-08 20:27:42 +05:30
Gunwant Jain
e77c1a57e4
cleaned up code, using &str instead of RawStr
...
Signed-off-by: Gunwant Jain <mail@wantguns.dev>
2021-07-08 18:48:19 +05:30
Gunwant Jain
78d046afbd
main: add more routes for pretty pasting
...
cleaned up code and added a route for signifying code language
explicitly at `/p/<filename>.<ext>`
Also async-ified the server after upgrading Rocket to 0.5-rc1
Signed-off-by: Gunwant Jain <mail@wantguns.dev>
2021-07-08 18:48:01 +05:30
Gunwant Jain
1f84fd28b9
implement drag and drop
...
As a consquence of better UX, '/' post handler will now redirect instead
of returning a String.
Signed-off-by: Gunwant Jain <mail@wantguns.dev>
2021-06-19 06:49:43 +05:30
Gunwant Jain
2e4b929fb5
cargo fix
the project
...
Make use of clippy and rustfmt
Signed-off-by: Gunwant Jain <mail@wantguns.dev>
2021-01-21 16:34:59 +05:30
Gunwant Jain
651f3d8157
pretty_retrieve: use match_filname to match MIME
...
fixes pastes which had JSON, Bash, etc. content.
Signed-off-by: Gunwant Jain <mail@wantguns.dev>
2021-01-06 10:00:49 +05:30
Gunwant Jain
c2ad9ffd90
main.rs: add /submit route
...
Getting into frontend biz.
Also s/HOST/HOST_URL/ because I didn't realise that HOST is already a
taken variable.
Signed-off-by: Gunwant Jain <mail@wantguns.dev>
2021-01-06 06:13:03 +05:30
Gunwant Jain
ae8bd544de
index: use templates for the index route
...
Signed-off-by: Gunwant Jain <mail@wantguns.dev>
2021-01-06 05:16:28 +05:30
Gunwant Jain
7cfe364b8c
pretty.html: fetch stylesheet only if the var is declared
...
otherwise the app will perform an unnecessary 404 request everytime a
theme is not declared
Signed-off-by: Gunwant Jain <mail@wantguns.dev>
2021-01-06 00:58:10 +05:30
Gunwant Jain
ef96dcff33
correct usage guides
...
Signed-off-by: Gunwant Jain <mail@wantguns.dev>
2020-12-30 06:35:19 +05:30
Gunwant Jain
27f84bbe3b
add readme
...
Needs a hosting guide too.
Signed-off-by: Gunwant Jain <mail@wantguns.dev>
2020-12-30 04:37:30 +05:30
Gunwant Jain
5fc487c705
use environment variables to configure settings
...
Signed-off-by: Gunwant Jain <mail@wantguns.dev>
2020-12-30 04:19:46 +05:30
Gunwant Jain
1bc532d237
index: improve the usage guide
...
Signed-off-by: Gunwant Jain <mail@wantguns.dev>
2020-12-30 03:41:54 +05:30
Gunwant Jain
c138e9ad3e
fix MIME types and add examples
...
cpp files were getting recognised as "text/csrc". checking subtrings is
a better way to compare MIME types.
Signed-off-by: Gunwant Jain <mail@wantguns.dev>
2020-12-29 21:37:54 +05:30
Gunwant Jain
855a0faec2
routes: implement syntax highlighting for plaintext files
...
Signed-off-by: Gunwant Jain <mail@wantguns.dev>
2020-12-29 19:35:21 +05:30
Gunwant Jain
66ea75de7f
add /p/<id> routes
...
This is to work with text/plain type files only
Signed-off-by: Gunwant Jain <mail@wantguns.dev>
2020-12-29 17:37:29 +05:30
Gunwant Jain
805e4ce7d2
initialise
...
routes:
GET /<id>
POST /
Signed-off-by: Gunwant Jain <mail@wantguns.dev>
2020-12-29 15:44:15 +05:30