diff --git a/public/compose.html b/public/compose.html
new file mode 100644
index 0000000..8253eeb
--- /dev/null
+++ b/public/compose.html
@@ -0,0 +1,24 @@
+{{template "head"}}
+
+
koushin
+
+
+ Back
+
+
+Compose new message
+
+
+
+{{template "foot"}}
diff --git a/public/mailbox.html b/public/mailbox.html
index c4ff097..303bdb4 100644
--- a/public/mailbox.html
+++ b/public/mailbox.html
@@ -2,7 +2,9 @@
koushin
-Logout
+
+ Logout ยท Compose
+
{{.Mailbox.Name}}
diff --git a/public/message.html b/public/message.html
index 09e56ac..cb9518b 100644
--- a/public/message.html
+++ b/public/message.html
@@ -2,7 +2,9 @@
koushin
-Back
+
+ Back
+
{{.Message.Envelope.Subject}}
diff --git a/server.go b/server.go
index c6d61e8..4156724 100644
--- a/server.go
+++ b/server.go
@@ -154,6 +154,11 @@ func handleGetPart(ctx *context, raw bool) error {
})
}
+func handleCompose(ectx echo.Context) error {
+ ctx := ectx.(*context)
+ return ctx.Render(http.StatusOK, "compose.html", nil)
+}
+
func New(imapURL string) *echo.Echo {
e := echo.New()
@@ -247,6 +252,9 @@ func New(imapURL string) *echo.Echo {
return ctx.Redirect(http.StatusFound, "/login")
})
+ e.GET("/compose", handleCompose)
+ e.POST("/compose", handleCompose)
+
e.Static("/assets", "public/assets")
return e