A webmail client. Forked from https://git.sr.ht/~migadu/alps
No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.

12345678910111213141516171819
  1. -- This message will be printed when the plugin is loaded
  2. print("Hi, this is an example Lua plugin")
  3. -- Setup a function called when the mailbox view is rendered
  4. alps.on_render("mailbox.html", function(data)
  5. print("The mailbox view for " .. data.Mailbox.Name .. " is being rendered")
  6. -- Set extra data that can be accessed from the mailbox.html template
  7. data.Extra.Example = "Hi from Lua"
  8. end)
  9. -- Wire up a new route
  10. alps.set_route("GET", "/example", function(ctx)
  11. ctx:String(200, "This is an example page.")
  12. end)
  13. -- Set a filter function that can be used from templates
  14. alps.set_filter("example_and", function(a, b)
  15. return a .. " and " .. b
  16. end)