# `Imison.Web.Assets`
[🔗](https://github.com/elpikel/imison/blob/v0.1.0/lib/imison/web/assets.ex#L1)

Serves the dashboard's stylesheet, fonts and script from Imison itself.

The assets are read at compile time: `priv/static/app.css`, the WOFF2 fonts
in `priv/static/fonts/`, and one script made of Phoenix's and Phoenix
LiveView's own minified JavaScript followed by `priv/static/imison.js`,
which connects the LiveView socket. Their URLs carry a digest of all of
them, so they are cached for a year and change whenever an asset does. The
stylesheet links its fonts with relative URLs, which resolve next to it.

The routes sit in the host's `:browser` pipeline, whose CSRF protection
refuses JavaScript to `<script>` tags; the script holds no secrets, so it
is served past that check, as Phoenix LiveDashboard serves its own.

# `path`

```elixir
@spec path(String.t(), :stylesheet | :script) :: String.t()
```

Returns the URL path of the stylesheet or the script of a dashboard mounted at `dashboard_path`.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
