Html Helpers

html

Visit the: code | unit tests

{attr}

Stringify attributes on the options hash.

Params

  • options Object
  • returns String

Example


div>

{{css stylesheets}}




{js}

Generate one or more tags with paths/urls to javascript or coffeescript files.

Params

  • context Object
  • returns String

Example

{{js scripts}}

{sanitize}

Strip HTML tags from a string, so that only the text nodes are preserved.

Params

  • str String: The string of HTML to sanitize.
  • returns String

Example

{{sanitize "<span>foospan>"}}

{ul}

Block helper for creating unordered lists (

    )

    Params

    • context Object
    • options Object
    • returns String

    {ol}

    Block helper for creating ordered lists (

      )

      Params

      • context Object
      • options Object
      • returns String

      {thumbnailImage}

      Returns a

      with a thumbnail linked to a full picture

      Params

      • context Object: Object with values/attributes to add to the generated elements:
      • context.alt String
      • context.src String
      • context.width Number
      • context.height Number
      • returns String: HTML
        element with image and optional caption/link.