📤📚 A small utility to share content on the internet. Files are served raw, no transcoding or special magic. Uploading requires a password. https://picopublish.sequentialread.com/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

50 lines
1.8 KiB

<!DOCTYPE HTML>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>picopublish</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" type="text/css" href="/static/application.css">
<link rel="stylesheet" type="text/css" href="{{ .CaptchaURL }}/static/captcha.css">
<script src="{{ .CaptchaURL }}/static/captcha.js?v=3"></script>
</head>
<body>
<div class="header">
<h3>PicoPublish</h3>
<div style="float:right; padding-right:20px;">
<a href="https://git.sequentialread.com/forest/picopublish">source code</a>
</div>
</div>
<div class="header-shadow"></div>
<div class="splash content">
<h3>Please wait for a moment...</h3>
3 years ago
<form method="POST" action="" style="font-size: 11px;">
<input type="hidden" name="challenge" value="{{ .Challenge }}" />
<input type="hidden" name="nonce" />
<div class="captcha-container"
data-sqr-captcha-url="{{ .CaptchaURL }}"
data-sqr-captcha-challenge="{{ .Challenge }}"
data-sqr-captcha-callback="myCaptchaCallback">
</div>
</form>
</div>
<script>
window.myCaptchaCallback = (nonce) => {
document.querySelector("form input[name='nonce']").value = nonce;
setTimeout(function() {
document.querySelector("form").submit();
}, 500);
};
// note its important that the CSS is already loaded at this point,
// otherwise the script will wait to create the captcha element
// until the css is loaded, and so code inside sqrCaptchaTrigger will fail
// because it will try to update the captcha element that doesn't exist yet.
window.sqrCaptchaInit();
window.sqrCaptchaTrigger();
</script>
</body>
</html>