Commit Graph

39 Commits

Author SHA1 Message Date
c9132e836a feat: markdown rendering /m/<id>
Some checks failed
Build CI / pre-build-checks (push) Failing after 16s
Build CI / build (amd64) (push) Has been skipped
Build CI / build (arm64) (push) Has been skipped
2026-04-21 16:24:08 +02:00
ellotheth
91be122104 add a link to the raw paste from the pretty paste
fixes wantguns/bin#22
2023-10-14 16:00:37 +05:30
ellotheth
3598e6bd91 add the upload button to the man page 2023-08-18 20:29:08 +05:30
ellotheth
fc821be03f style an upload button for phones/tablets 2023-08-18 20:29:08 +05:30
Jonas Geiler
3bbd64611f fix: corrected spelling of "minimalistic" 2022-07-23 19:51:21 -04:00
Gunwant Jain
c8637b04dd Index: Add option to remove /client help
fixes #7

Signed-off-by: Gunwant Jain <mail@wantguns.dev>
2022-04-23 04:48:06 +05:30
Gunwant Jain
eff3f0dbd6 pretty: add softwrapping to pastes
Signed-off-by: Gunwant Jain <mail@wantguns.dev>
2022-01-25 14:34:21 +05:30
Gunwant Jain
dff3e673c2 flyci: detach daemon after deployment
Otherwise the github action hangs on the job.
I should open an issue regarding this on fly's tracker.

Signed-off-by: Gunwant Jain <mail@wantguns.dev>
2022-01-25 03:21:03 +05:30
Gunwant Jain
6104639596 Add a ton of new syntaxes
All thanks to guys at Broot, which took it from bat

Signed-off-by: Gunwant Jain <mail@wantguns.dev>
2022-01-25 02:27:41 +05:30
Gunwant Jain
9c986c1327 fonts: switch to serving fonts from the server
Signed-off-by: Gunwant Jain <mail@wantguns.dev>
2022-01-24 16:08:25 +05:30
Gunwant Jain
ab99405c89 Showcase the demo version
Signed-off-by: Gunwant Jain <mail@wantguns.dev>
2022-01-21 13:38:06 +05:30
Gunwant Jain
edc247b558 Templates: fix the content type of templates
Templating is weird af in Rocket. Look into 3a541ae for more.
The content-type of the rendering is determined by the extension of the
template name.

But renaming these templates would break building the project for
development because it finds a phony template there. So the trick is to
default the `template_dir` to `args.upload` because it should never
interfere and will be always present.
This also fixes the hax in Dockerfile by making it the default.

Signed-off-by: Gunwant Jain <mail@wantguns.dev>
2022-01-19 16:33:57 +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
372bbf28d3 Use Iosevka instead of Fira Code
Signed-off-by: Gunwant Jain <mail@wantguns.dev>
2022-01-16 09:52:00 +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
3e10267caf Add visual cue for uploading files
Unfortunately, since fetch API does not support getting progress while
perfoming uploads, we cannot have a more dynamic cue

Signed-off-by: Gunwant Jain <mail@wantguns.dev>
2021-12-26 09:58:58 +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
a9dc9452fc index: increase drag area to the entire form
Signed-off-by: Gunwant Jain <mail@wantguns.dev>
2021-07-13 21:58:04 +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
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
8a3b29a0ef templates/index: update the description
Give a quick rundown of how to use the pastebin

Signed-off-by: Gunwant Jain <mail@wantguns.dev>
2021-07-08 21:57:59 +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
0cd0d24549 templates: add drag and drop func, use ayu dark
Use a more man-like description

Signed-off-by: Gunwant Jain <mail@wantguns.dev>
2021-07-08 18:51:20 +05:30
Gunwant Jain
150bade1e5 css: change placeholder and made the UI generally tighter
Also I have encouraged the user to change their monospace font
accordingly for the best personal satisfaction.

Signed-off-by: Gunwant Jain <mail@wantguns.dev>
2021-06-19 08:07:25 +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
8ddca50c55 base.html: re-add scroll bars
My only grief with scroll bars was not even with scroll bars, but FF's
shitty contrast breaking scroll bars in dark backgrounds. Fortunately
that has been settled for in the latest beta.

Also I was missing using a scrollbar on the pastebin :p

Signed-off-by: Gunwant Jain <mail@wantguns.dev>
2021-05-15 14:29:02 +05:30
Gunwant Jain
594f89385b templates: fix cascaded scrolling, add more aez
Signed-off-by: Gunwant Jain <mail@wantguns.dev>
2021-01-09 08:05:53 +05:30
Gunwant Jain
5d45bf8ebf base.html: format file
Signed-off-by: Gunwant Jain <mail@wantguns.dev>
2021-01-07 05:02:57 +05:30
Gunwant Jain
d3106f3fce index.html: add a frontend for pastes
a simple, minimalistic frontend for pasting texts the objectively easy
way for those not comfortable with CLI.

Signed-off-by: Gunwant Jain <mail@wantguns.dev>
2021-01-06 07:08:36 +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
db08f5c8a9 pretty.html: refactor
Make actual use of the Tera templating, when youre intending to use it.

Signed-off-by: Gunwant Jain <mail@wantguns.dev>
2021-01-06 05:14:12 +05:30
Gunwant Jain
cfd2fa15b6 pretty.html: corrections for optimum lighthouse results
added meta tag for SEO
use font-display: swap (almost) for faster contentful paints

Signed-off-by: Gunwant Jain <mail@wantguns.dev>
2021-01-06 04:10:59 +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
5277c60b81 pretty.html: use jsdelivr instead of cloudfare
Apparently, Cloudfare took 2X time when fetching content of similar
sizes.

Signed-off-by: Gunwant Jain <mail@wantguns.dev>
2021-01-06 00:50:37 +05:30
Gunwant Jain
13da6056d6 pretty.html: add bg color for selected text
Signed-off-by: Gunwant Jain <mail@wantguns.dev>
2021-01-03 09:24:22 +05:30
Gunwant Jain
153aaf2215 pretty.html: add aez, line numbers, default font
Should look a lot cleaner now.

Signed-off-by: Gunwant Jain <mail@wantguns.dev>
2021-01-03 05:17:41 +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