diff --git a/README.MD b/README.MD index 164ea11..fee6476 100644 --- a/README.MD +++ b/README.MD @@ -334,10 +334,14 @@ Changes the maximum width of the UI from 720 pixels to 1080 pixels. Add the given public path prefix to all urls. +The URL copy feature will only copy the entire URL if this is provided. Otherwise only the path (eg. `/url/dog-cat-bat`) will be copied to your clipboard! + This allows you to host MicroBin behind a reverse proxy on a subpath. Note that MicroBin itself still expects all routes to be as without this option, and thus is unsuited if you are running MicroBin directly. +Example: `--public-path https://myserver.com` or `--public-path http://localhost:8080` + #### Example Usage (caddy) An example of running MicroBin behind the reverse proxy `caddy` on the path `/paste` (using systemd) diff --git a/templates/pastalist.html b/templates/pastalist.html index c3d15a2..755cd60 100644 --- a/templates/pastalist.html +++ b/templates/pastalist.html @@ -11,105 +11,121 @@
{% if args.pure_html %} -{% else %} -
- {% endif %} - - - - - - - - -
Pastas
- Key - - Created - - Expiration - + {% else %} + + {% endif %} + + + + + + + + + - - - - {% for pasta in pastas %} - {% if pasta.pasta_type == "text" && !pasta.private %} - - - - - + + + {% for pasta in pastas %} + {% if pasta.pasta_type == "text" && !pasta.private %} + + + + + + {%- endif %} - {% if pasta.editable %} - Edit - {%- endif %} - Remove - - - {%- endif %} - {% endfor %} - -
Pastas
+ Key + + Created + + Expiration + -
- {{pasta.id_as_animals()}} - - {{pasta.created_as_string()}} - - {{pasta.expiration_as_string()}} - - Raw - {% if pasta.file.is_some() %} - File + +
+ {{pasta.id_as_animals()}} + + {{pasta.created_as_string()}} + + {{pasta.expiration_as_string()}} + + Raw + {% if pasta.file.is_some() %} + File + {%- endif %} + {% if pasta.editable %} + Edit + {%- endif %} + Remove +
-
-{% if args.pure_html %} - -{% else %} -
-{% endif %} - - - - - - - - -
URL Redirects
- Key - - Created - - Expiration - + {% endfor %} + +
+
+ {% if args.pure_html %} + + {% else %} +
+ {% endif %} + + + + + + + + + - - - {% for pasta in pastas %} - {% if pasta.pasta_type == "url" && !pasta.private %} - - - - - + + {% for pasta in pastas %} + {% if pasta.pasta_type == "url" && !pasta.private %} + + + + + + {%- endif %} - Remove - - - {%- endif %} - {% endfor %} - -
URL Redirects
+ Key + + Created + + Expiration + -
- {{pasta.id_as_animals()}} - - {{pasta.created_as_string()}} - - {{pasta.expiration_as_string()}} - - Raw - {% if pasta.editable %} - Edit + +
+ {{pasta.id_as_animals()}} + + {{pasta.created_as_string()}} + + {{pasta.expiration_as_string()}} + + Copy + {% if pasta.editable %} + Edit + {%- endif %} + Remove +
-
-{%- endif %} -{% include "footer.html" %} + {% endfor %} + +
+
+ {%- endif %} + + + + {% include "footer.html" %} \ No newline at end of file