aboutsummaryrefslogtreecommitdiff
path: root/public
diff options
context:
space:
mode:
Diffstat (limited to 'public')
-rw-r--r--public/assets/style.css1
-rw-r--r--public/compose.html26
-rw-r--r--public/foot.html2
-rw-r--r--public/head.html8
-rw-r--r--public/login.html14
-rw-r--r--public/mailbox.html45
-rw-r--r--public/message.html58
7 files changed, 0 insertions, 154 deletions
diff --git a/public/assets/style.css b/public/assets/style.css
deleted file mode 100644
index 8f414f5..0000000
--- a/public/assets/style.css
+++ /dev/null
@@ -1 +0,0 @@
-/* TODO */
diff --git a/public/compose.html b/public/compose.html
deleted file mode 100644
index 2a52675..0000000
--- a/public/compose.html
+++ /dev/null
@@ -1,26 +0,0 @@
-{{template "head.html"}}
-
-<h1>koushin</h1>
-
-<p>
- <a href="/mailbox/INBOX">Back</a>
-</p>
-
-<h2>Compose new message</h2>
-
-<form method="post" action="">
- <input type="hidden" name="in_reply_to" value="{{.Message.InReplyTo}}">
-
- <p>From:</p>
- <input type="email" name="from" value="{{.Message.From}}">
- <p>To:</p>
- <input type="email" name="to" multiple value="{{.Message.ToString}}">
- <p>Subject:</p>
- <input type="text" name="subject" value="{{.Message.Subject}}">
- <p>Body:</p>
- <textarea name="text" cols="80" rows="20">{{.Message.Text}}</textarea>
- <br><br>
- <input type="submit" value="Send">
-</form>
-
-{{template "foot.html"}}
diff --git a/public/foot.html b/public/foot.html
deleted file mode 100644
index b605728..0000000
--- a/public/foot.html
+++ /dev/null
@@ -1,2 +0,0 @@
- </body>
-</html>
diff --git a/public/head.html b/public/head.html
deleted file mode 100644
index 35dda42..0000000
--- a/public/head.html
+++ /dev/null
@@ -1,8 +0,0 @@
-<!DOCTYPE html>
-<html lang="en">
- <head>
- <meta charset="utf-8">
- <title>koushin</title>
- <link rel="stylesheet" href="/assets/style.css">
- </head>
- <body>
diff --git a/public/login.html b/public/login.html
deleted file mode 100644
index 6ae1737..0000000
--- a/public/login.html
+++ /dev/null
@@ -1,14 +0,0 @@
-{{template "head.html"}}
-
-<h1>koushin</h1>
-
-<form method="post" action="/login">
- <label for="username">Username:</label>
- <input type="text" name="username" id="username"/>
- <label for="password">Password:</label>
- <input type="password" name="password" id="password"/>
- <br><br>
- <input type="submit" value="Login">
-</form>
-
-{{template "foot.html"}}
diff --git a/public/mailbox.html b/public/mailbox.html
deleted file mode 100644
index ddd1260..0000000
--- a/public/mailbox.html
+++ /dev/null
@@ -1,45 +0,0 @@
-{{template "head.html"}}
-
-<h1>koushin</h1>
-
-<p>
- <a href="/logout">Logout</a> · <a href="/compose">Compose</a>
-</p>
-
-<h2>{{.Mailbox.Name}}</h2>
-
-<p>Mailboxes:</p>
-<ul>
- {{range .Mailboxes}}
- <li><a href="/mailbox/{{.Name | pathescape}}">{{.Name}}</a></li>
- {{end}}
-</ul>
-
-{{if .Messages}}
- <p>Messages:</p>
- <ul>
- {{range .Messages}}
- <li><a href="/message/{{$.Mailbox.Name | pathescape}}/{{.Uid}}?part={{.TextPartName}}">
- {{if .Envelope.Subject}}
- {{.Envelope.Subject}}
- {{else}}
- (No subject)
- {{end}}
- </a></li>
- {{end}}
- </ul>
-
- <p>
- {{if ge .PrevPage 0}}
- <a href="?page={{.PrevPage}}">Prev</a>
- {{end}}
- {{if and (ge .PrevPage 0) (ge .NextPage 0)}}·{{end}}
- {{if ge .NextPage 0}}
- <a href="?page={{.NextPage}}">Next</a>
- {{end}}
- </p>
-{{else}}
- <p>Mailbox is empty.</p>
-{{end}}
-
-{{template "foot.html"}}
diff --git a/public/message.html b/public/message.html
deleted file mode 100644
index 729937d..0000000
--- a/public/message.html
+++ /dev/null
@@ -1,58 +0,0 @@
-{{template "head.html"}}
-
-<h1>koushin</h1>
-
-<p>
- <a href="/mailbox/{{.Mailbox.Name | pathescape}}?page={{.MailboxPage}}">
- Back
- </a>
-</p>
-
-<h2>
- {{if .Message.Envelope.Subject}}
- {{.Message.Envelope.Subject}}
- {{else}}
- (No subject)
- {{end}}
-</h2>
-
-{{define "message-part-tree"}}
- {{/* nested templates can't access the parent's context */}}
- {{$ = index . 0}}
- {{with index . 1}}
- <a
- {{if .IsText}}
- href="{{$.Message.Uid}}?part={{.PathString}}"
- {{else}}
- href="{{$.Message.Uid}}/raw?part={{.PathString}}"
- {{end}}
- >
- {{if eq $.PartPath .PathString}}<strong>{{end}}
- {{.String}}
- {{if eq $.PartPath .PathString}}</strong>{{end}}
- </a>
- {{if gt (len .Children) 0}}
- <ul>
- {{range .Children}}
- <li>{{template "message-part-tree" (tuple $ .)}}</li>
- {{end}}
- </ul>
- {{end}}
- {{end}}
-{{end}}
-
-<p>Parts:</p>
-
-{{template "message-part-tree" (tuple $ .Message.PartTree)}}
-
-<hr>
-
-{{if .Body}}
- <p><a href="{{.Message.Uid}}/reply?part={{.PartPath}}">Reply</a></p>
- <pre>{{.Body}}</pre>
-{{else}}
- <p>Can't preview this message part.</p>
- <a href="{{.Message.Uid}}/raw?part={{.PartPath}}">Download</a>
-{{end}}
-
-{{template "foot.html"}}