add drag and drop

This commit is contained in:
2026-11-12 21:35:54 -05:00
parent 350bf1842f
commit 41aaf5006f
3 changed files with 90 additions and 18 deletions
+5 -4
View File
@@ -5,8 +5,10 @@
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>minibin</title>
<link rel="stylesheet" href="/css/main.css" />
<script defer src="/js/dnd.js"></script>
</head>
<body>
<body class="home-page" id="home-page">
{{template "site-header"}}
<main>
<p>simple file and paste hosting service</p>
@@ -18,19 +20,18 @@
<div class="file-panel">
<form action="/upload?return=html" method="post" enctype="multipart/form-data">
<label for="file-expiry">expiry</label>
<select id="paste-expiry" name="expiry">
<select id="file-expiry" name="expiry">
{{range .Expiries}}
<option value="{{.Label}}">{{.Label}}</option>
{{end}}
</select>
<input type="file" required name="file" />
<input id="upload-file" type="file" required name="file" />
<button type="submit" class="btn">upload file</button>
</form>
</div>
<div class="paste-panel">
<form action="/upload?return=html" method="post">
<label for="paste-expiry">expiry</label>
<select id="paste-expiry" name="expiry">
{{range .Expiries}}
<option value="{{.Label}}">{{.Label}}</option>