Commit Graph

18 Commits

Author SHA1 Message Date
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
009972ae88 readme: use markdown, add deployment examples
Signed-off-by: Gunwant Jain <mail@wantguns.dev>
2021-01-06 00:14:16 +05:30
Gunwant Jain
9780e01deb docker-compose: use dockerhub's container registry
Signed-off-by: Gunwant Jain <mail@wantguns.dev>
2021-01-06 00:12:21 +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
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
ea790a066a Dockerised the app
Good use of env vars now

Signed-off-by: Gunwant Jain <mail@wantguns.dev>
2020-12-30 04:20:39 +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