View Source ExCell (ExCell v0.1.1)

ExCell is used to split larger views in smaller cells that can be reused and easily packaged with Javascript and CSS.

A cell consists of a couple of files:

cells
|- avatar
|  |- template.html.eex
|  |- view.html.eex
|  |- style.css (optional)
|  |- index.js (optional)
|- header
...

You can render the cell in a view, controller or another cell by adding the following code:

cell(AvatarCell, class: "CustomClassName", user: %User{})

This would generate the following HTML when you render the cell:

<span class="AvatarCell" data-cell="AvatarCell" data-cell-params="{}">
  <img src="/images/foo/avatar.jpg" class="AvatarCell-Image" alt="foo" />
</span>

Summary

Functions

Link to this function

class_name(name, classes)

View Source
Link to this function

config(keyword, fallback \\ nil)

View Source
Link to this function

container(module, id, params, attributes, callback)

View Source
Link to this function

module_relative_to(module, relative_to)

View Source
Link to this function

options(module, id, params, attributes, content)

View Source
Link to this function

relative_name(module, namespace)

View Source