upload page after uploading
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{{define "site-header"}}
|
||||
<div class="site-header">
|
||||
<h1>minibin</h1>
|
||||
<h1><a style="text-decoration: none;" href="/">minibin</a></h1>
|
||||
<div>
|
||||
<a href="/tos">tos</a>
|
||||
<a href="/privacy">privacy</a>
|
||||
|
||||
+4
-4
@@ -16,7 +16,7 @@
|
||||
<input type="radio" name="upload-type" id="type-paste" />
|
||||
<label for="type-paste">paste</label>
|
||||
<div class="file-panel">
|
||||
<form action="/upload?return=redirect" method="post" enctype="multipart/form-data">
|
||||
<form action="/upload?return=html" method="post" enctype="multipart/form-data">
|
||||
<label for="file-expiry">expiry</label>
|
||||
<select id="paste-expiry" name="expiry">
|
||||
{{range .Expiries}}
|
||||
@@ -24,11 +24,11 @@
|
||||
{{end}}
|
||||
</select>
|
||||
<input type="file" required name="file" />
|
||||
<button type="submit">upload file</button>
|
||||
<button type="submit" class="btn">upload file</button>
|
||||
</form>
|
||||
</div>
|
||||
<div class="paste-panel">
|
||||
<form action="/upload?return=redirect" method="post">
|
||||
<form action="/upload?return=html" method="post">
|
||||
<label for="paste-expiry">expiry</label>
|
||||
|
||||
<select id="paste-expiry" name="expiry">
|
||||
@@ -37,7 +37,7 @@
|
||||
{{end}}
|
||||
</select>
|
||||
<textarea id="content" name="content" rows="10" required placeholder="cmon, paste something already!"></textarea>
|
||||
<button type="submit">upload paste</button>
|
||||
<button type="submit" class="btn">upload paste</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>minibin</title>
|
||||
<link rel="stylesheet" href="/css/main.css" />
|
||||
</head>
|
||||
<script src="/js/copy.js" defer></script>
|
||||
<body>
|
||||
{{template "site-header"}}
|
||||
<main>
|
||||
<div>
|
||||
{{if hasPrefix .MIMEType "image/"}}
|
||||
<img src="/{{.ID}}" />
|
||||
{{else if hasPrefix .MIMEType "video/"}}
|
||||
<video src="/{{.ID}}" controls></video>
|
||||
{{else if hasPrefix .MIMEType "audio/"}}
|
||||
<audio src="/{{.ID}}" controls></audio>
|
||||
{{else}}
|
||||
<h2>{{.Filename}}</h2>
|
||||
<h2>{{.ID}}{{.FileExtension}}</h2>
|
||||
{{end}}
|
||||
</div>
|
||||
|
||||
<div class="upload-links">
|
||||
<a href="/{{.ID}}">view raw upload</a>
|
||||
<!--
|
||||
copying is only available with javascript
|
||||
we will make this element visible with javascript
|
||||
-->
|
||||
<a id="copy-link" data-id="{{.ID}}" href="#" style="display: none">copy link</a>
|
||||
<form action="/{{.ID}}/delete?redirect=true" method="post">
|
||||
<input type="hidden" name="delete_token" value="{{.DeleteToken}}" />
|
||||
<button type="submit" class="link-btn">delete upload</button>
|
||||
</form>
|
||||
</div>
|
||||
</main>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user