aboutsummaryrefslogtreecommitdiff
path: root/template.go
Commit message (Collapse)AuthorAgeFilesLines
* Rename template.go to renderer.goSimon Ser2020-01-201-178/+0
|
* go fmtSimon Ser2020-01-201-1/+1
|
* Add current path to the global contextDejan Strbac2020-01-161-0/+4
|
* Fix panic when injecting a template with nil dataSimon Ser2020-01-101-1/+12
|
* Implement plugin/template reload on SIGUSR1Simon Ser2020-01-081-9/+2
| | | | | | | | There's no way around having a global mutex, because we need to update the HTTP routes when reloading plugins. During reload we need to lock the whole server. Closes: https://todo.sr.ht/~sircmpwn/koushin/43
* Add Server.ReloadSimon Ser2020-01-081-13/+27
| | | | | This only reloads templates for now. In the future it'll also reload Lua plugins.
* Add Context to Plugin.InjectSimon Ser2019-12-171-1/+1
| | | | This allows to access the request metadata and the session from injectors.
* Add RenderData interfaceSimon Ser2019-12-171-7/+37
| | | | This allows Go plugins to easily inject global data.
* Rename RenderData to BaseRenderDataSimon Ser2019-12-171-5/+5
| | | | RenderData will be used for an interface.
* Remove the public/ directorySimon Ser2019-12-161-2/+2
| | | | | 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.
* Introduce base pluginSimon Ser2019-12-161-14/+1
| | | | | | This plugin offers base IMAP/SMTP functionality. References: https://todo.sr.ht/~sircmpwn/koushin/39
* Add docsSimon Ser2019-12-111-1/+3
|
* Allow plugins to provide their own templatesSimon Ser2019-12-111-3/+6
|
* Export Server.{Sessions,Plugins}Simon Ser2019-12-111-1/+1
| | | | And unexport a few internal functions.
* Export ContextSimon Ser2019-12-111-6/+6
| | | | This allows plugins to access it.
* go fmtSimon Ser2019-12-101-6/+6
|
* Introduce GlobalRenderData and RenderDataSimon Ser2019-12-101-0/+32
| | | | | | | | 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.
* Load all themes on startupSimon Ser2019-12-101-13/+54
| | | | This is the first step to allow each user to have a different theme.
* Rename Plugin.Render to Plugin.InjectSimon Ser2019-12-101-1/+1
| | | | | This function doesn't render anything, it just adds extra data to the template data.
* Add a Lua API to set template filtersSimon Ser2019-12-091-3/+8
|
* Add basic support for pluginsSimon Ser2019-12-091-1/+11
|
* Add basic theme supportSimon Ser2019-12-041-3/+20
| | | | References: https://todo.sr.ht/~sircmpwn/koushin/1
* Escape mailbox names in URLsSimon Ser2019-12-031-0/+4
| | | | Closes: https://todo.sr.ht/~sircmpwn/koushin/14
* Display & download any message partSimon Ser2019-12-031-1/+5
|
* Linkify mailbox listSimon Ser2019-12-021-3/+0
|
* Add HTTP server boilerplateSimon Ser2019-12-021-0/+24