25/lib/mse25_web/router.ex
Anders Englöf Ytterström a6d34d17fc
List and show events (#17)
* Improve Directus client

- Rearrange and group functions to match
- Allow whitespace when searching
- provide category to event list

* Add event list view

* Show band information on festival-ish events

* Extract view helpers to reusable module

Code is shared between ItemHTML and PageHTML,
and they really do not belong in web anyway
since it is usable outside web scope as well.

* Rename utils to event helpers

It is a file that handles the poor design choice
of the datamodel for events, so let the module
name describe that.

* Sync event view

- Replace scaffold markup with production markup
- Send more data from Directus client
2024-10-03 22:52:40 +02:00

38 lines
955 B
Elixir

defmodule Mse25Web.Router do
use Mse25Web, :router
pipeline :browser do
plug :accepts, ["html"]
plug :fetch_session
plug :fetch_live_flash
plug :put_root_layout, html: {Mse25Web.Layouts, :root}
plug :protect_from_forgery
plug :put_secure_browser_headers
end
pipeline :api do
plug :accepts, ["json"]
end
scope "/", Mse25Web do
pipe_through :browser
get "/", PageController, :home
get "/evenemang", PageController, :events
get "/webblogg", PageController, :articles
get "/delningar", PageController, :links
# get "/kommande-evenemang.ics", EventController, :calendar
# get "/event-map.js", EventController, :interactive_map
# get "/:year", TimelineController, :annual
# get "/prenumerera.xml", TimelineController, :feed
get "/*path", ItemController, :index
end
# Other scopes may use custom stacks.
# scope "/api", Mse25Web do
# pipe_through :api
# end
end