View Source MemorexWeb.SharedViewHelpers (Memorex v0.2.2)

Helper functions used by various LiveViews.

Link to this section Summary

Link to this section Functions

Link to this function

ease_factor(ease_factor)

View Source
@spec ease_factor(float() | nil) :: String.t()
@spec format(Timex.Duration.t() | DateTime.t() | nil) :: String.t()
Link to this function

format_datetime(datetime)

View Source
@spec format_datetime(nil | DateTime.t()) :: String.t()
Link to this function

format_iso_datetime(datetime)

View Source
@spec format_iso_datetime(nil | DateTime.t()) :: String.t()
Link to this function

img_alt(image_file_path)

View Source
@spec img_alt(Memorex.Domain.Card.t() | String.t()) :: String.t()
@spec img_src(Memorex.Domain.Card.t()) :: String.t()
@spec page_id(atom()) :: String.t()
Link to this function

truncate(text, options \\ [])

View Source
@spec truncate(String.t(), Keyword.t()) :: String.t()