summaryrefslogtreecommitdiff
path: root/pages/html
diff options
context:
space:
mode:
Diffstat (limited to 'pages/html')
-rw-r--r--pages/html/create.gohtml28
-rw-r--r--pages/html/header.gohtml12
-rw-r--r--pages/html/landing.gohtml44
-rw-r--r--pages/html/meta.gohtml15
-rw-r--r--pages/html/style.gohtml84
5 files changed, 183 insertions, 0 deletions
diff --git a/pages/html/create.gohtml b/pages/html/create.gohtml
new file mode 100644
index 0000000..c08fd93
--- /dev/null
+++ b/pages/html/create.gohtml
@@ -0,0 +1,28 @@
+<!doctype html>
+<html lang="en">
+<head>
+ <title>delayed.link: created</title>
+ {{ template "meta" . }}
+ {{ template "style" . }}
+</head>
+<body>
+{{ template "header" . }}
+<main>
+ <div>
+ <a href="/l/{{.Id}}">This link will unlock at {{.OpensStr}}</a>
+ </div>
+ <div>
+ It will occur in approximately {{ .MinutesLeft }} minute{{ if gt .MinutesLeft 1 }}s{{end}}.
+ </div>
+ <div>
+ It can be opened {{ .OpensLeft }} time{{ if gt .OpensLeft 1 }}s{{end}}.
+ </div>
+ <div>
+ Be mindful embedding services might take visits off the counter.
+ </div>
+ <div>
+ This page is completely ephemeral. Once you close it, you cannot access the link again.
+ </div>
+</main>
+</body>
+</html> \ No newline at end of file
diff --git a/pages/html/header.gohtml b/pages/html/header.gohtml
new file mode 100644
index 0000000..5af455e
--- /dev/null
+++ b/pages/html/header.gohtml
@@ -0,0 +1,12 @@
+{{ define "header" }}
+ <header>
+ <a href="/">
+ <h1>
+ delayed.link
+ </h1>
+ </a>
+ <span>
+ send something now, they unlock it later
+ </span>
+ </header>
+{{end}} \ No newline at end of file
diff --git a/pages/html/landing.gohtml b/pages/html/landing.gohtml
new file mode 100644
index 0000000..268ae90
--- /dev/null
+++ b/pages/html/landing.gohtml
@@ -0,0 +1,44 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <title>delayed.link</title>
+ {{ template "style" . }}
+</head>
+<body>
+{{ template "meta" . }}
+{{ template "header" . }}
+<main>
+ <form method="POST" action="/">
+ <label>
+ <span>
+ Lock time in minutes
+ </span>
+ <input type="number" name="minutes_in_future" value="10"/>
+ </label>
+ <label>
+ <span>
+ Maximum times the link can be opened
+ </span>
+ <input type="number" name="number_of_opens" min="1" max="100" value="8"/>
+ </label>
+ <label>
+ <span>
+ URL to save for later
+ </span>
+ <input type="text" name="payload"/>
+ </label>
+ <label>
+ <span></span>
+ <input type="submit" value="Create"/>
+ </label>
+ </form>
+</main>
+<footer>
+ THERE IS NO WARRANTY FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN
+ WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE SOFTWARE “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER
+ EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+ PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH THE CUSTOMER. SHOULD
+ THE SOFTWARE PROVE DEFECTIVE, THE CUSTOMER ASSUMES THE COST OF ALL NECESSARY SERVICING, REPAIR, OR CORRECTION.
+</footer>
+</body>
+</html> \ No newline at end of file
diff --git a/pages/html/meta.gohtml b/pages/html/meta.gohtml
new file mode 100644
index 0000000..07d515b
--- /dev/null
+++ b/pages/html/meta.gohtml
@@ -0,0 +1,15 @@
+{{ define "meta" }}
+ <meta charset="UTF-8">
+ <meta name="viewport"
+ content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
+ <meta http-equiv="X-UA-Compatible" content="ie=edge">
+ <link rel="icon" href="data:,"/>
+ <meta content="delayed.link" property="og:title" />
+ <meta content="https://delayed.link/" property="og:url" />
+ {{ if (eq . nil) }}
+ <meta content="send something now, they unlock it later" property="og:description" />
+ {{ else }}
+ <meta content="this link will unlock in {{ .MinutesLeft }} minute{{ if gt .MinutesLeft 1 }}s{{end}} after this embed was created." />
+ {{ end }}
+ <meta content="#f2cae2" data-react-helmet="true" name="theme-color" />
+{{end}} \ No newline at end of file
diff --git a/pages/html/style.gohtml b/pages/html/style.gohtml
new file mode 100644
index 0000000..bb15fb9
--- /dev/null
+++ b/pages/html/style.gohtml
@@ -0,0 +1,84 @@
+{{ define "style"}}
+<style>
+ @media (prefers-color-scheme: dark) {
+ html {
+ background-color: #3e3b37;
+ color: rgb(222, 213, 200);
+ }
+ }
+
+ body {
+ max-width: 44em;
+ margin: auto;
+ display: flex;
+ flex-direction: column;
+ gap: 32px;
+
+ & p {
+ padding: 4px 0;
+ }
+ }
+ main {
+ min-height: 105vh;
+ display: flex;
+ gap: 16px;
+ flex-direction: column;
+ align-items: center;
+ }
+
+ label {
+ display: flex;
+ justify-content: end;
+ width: 100%;
+ gap: 8px;
+ }
+
+ form {
+ font-family: system-ui;
+ display: flex;
+ flex-direction: column;
+ gap: 4px;
+
+ width: 100%;
+
+ & input {
+ background-color: #fefcf8;
+ color: rgb(30, 27, 25);
+ border-color: #bad1f9;
+ border-style: double;
+ }
+
+ & input[type="number"] {
+ width: 48px;
+ }
+
+ & input[type="text"] {
+ width: 20em;
+ }
+
+ & input[type="submit"] {
+ background-color: #bef8d7;
+ border-color: #395143;
+ }
+ }
+
+ header {
+ display: flex;
+ align-items: baseline;
+ gap: 16px;
+ justify-content: space-between;
+
+ & a {
+ text-decoration: none;
+ }
+
+ & h1 {
+ font-family: monospace
+ }
+ }
+
+ a {
+ color: #f2cae2;
+ }
+</style>
+{{end}} \ No newline at end of file