Commit graph

17 commits

Author SHA1 Message Date
Simon Ser
e93346ffa9
Remove the public/ directory
Now that all templates are provided by plugins, there's no need to have
a public/ directory. Themes can be in /themes instead of /public/themes.
2019-12-16 12:58:21 +01:00
Simon Ser
d897eeee5c
Introduce base plugin
This plugin offers base IMAP/SMTP functionality.

References: https://todo.sr.ht/~sircmpwn/koushin/39
2019-12-16 12:52:44 +01:00
Simon Ser
f07ab52632
Add docs 2019-12-11 15:24:39 +01:00
Simon Ser
1b5bc568fb
Allow plugins to provide their own templates 2019-12-11 15:08:31 +01:00
Simon Ser
e54a359acb
Export Server.{Sessions,Plugins}
And unexport a few internal functions.
2019-12-11 13:03:31 +01:00
Simon Ser
d8f411176f
Export Context
This allows plugins to access it.
2019-12-11 12:48:20 +01:00
Simon Ser
835e9e5033
go fmt 2019-12-10 17:39:42 +01:00
Simon Ser
3748b4413e
Introduce GlobalRenderData and RenderData
GlobalRenderData contains some global metadata that can be obtained from
any template.

RenderData is a base type for template data. It contains a Global field
with global metadata and an Extra field for plugins.
2019-12-10 17:36:21 +01:00
Simon Ser
edf738f23d
Load all themes on startup
This is the first step to allow each user to have a different theme.
2019-12-10 16:41:56 +01:00
Simon Ser
4a504b0fc6
Rename Plugin.Render to Plugin.Inject
This function doesn't render anything, it just adds extra data to the
template data.
2019-12-10 16:07:02 +01:00
Simon Ser
76599232dc
Add a Lua API to set template filters 2019-12-09 17:54:24 +01:00
Simon Ser
4f74722c14
Add basic support for plugins 2019-12-09 16:05:40 +01:00
Simon Ser
e94b1311de
Add basic theme support
References: https://todo.sr.ht/~sircmpwn/koushin/1
2019-12-04 18:30:01 +01:00
Simon Ser
a4729060be
Escape mailbox names in URLs
Closes: https://todo.sr.ht/~sircmpwn/koushin/14
2019-12-03 17:31:53 +01:00
Simon Ser
be14524c33
Display & download any message part 2019-12-03 13:07:25 +01:00
Simon Ser
fce17c9733
Linkify mailbox list 2019-12-02 18:29:06 +01:00
Simon Ser
a1a067e6de
Add HTTP server boilerplate 2019-12-02 15:31:00 +01:00