diff --git a/flake.nix b/flake.nix index e2c4ded..da2410d 100644 --- a/flake.nix +++ b/flake.nix @@ -17,7 +17,7 @@ packages = rec { slenpaste = pkgs.buildGoModule { pname = "slenpaste"; - version = "0.1.5"; + version = "0.2.0"; src = ./.; goPackagePath = "github.com/slendidev/slenpaste"; vendorHash = "sha256-MUvodL6K71SCfxu51T/Ka2/w32Kz+IXem1bYqXQLSaU="; diff --git a/main.go b/main.go index bfe78c7..8877ff6 100644 --- a/main.go +++ b/main.go @@ -74,7 +74,33 @@ func indexHandler(w http.ResponseWriter, r *http.Request) { scheme = "https" } d := fmt.Sprintf("%s://%s", scheme, domain) - fmt.Fprintf(w, `
Welcome to slenpaste!
+
+	fmt.Fprintf(w, `
+
+
+	
+	
+	slenpaste
+	
+
+
+	

slenpaste

+
Welcome!
 
 Upload a file:
   curl -F 'file=@yourfile.txt' -F 'expiry=1h' %s/
@@ -84,23 +110,187 @@ Upload from stdin (no file param, expire after 5m):
 
 Upload from stdin and expire on first view:
   cat yourfile.txt | curl --data-binary @- "%s/?expiry=view"
-
 
-
- -
- Expiry: - - - - - -

+ + - -
-`, d, d, d) +
+
+ Expiry + + + + + +
+ +
+ + +
+ + +
+ + +

Quick text

+

Type or paste text and upload as a .txt (no file chooser needed).

+ +
+ + +
+ +

Paste or drop images

+
+ Paste an image (Ctrl/Cmd+V) or drag & drop files here +
Images are uploaded as files. Other files dropped here work too.
+
+ +
+ + + +`, d, d, d) } func uploadHandler(w http.ResponseWriter, r *http.Request) {