Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Helper refactor & fixes #252

Merged
merged 3 commits into from
Jul 11, 2013
Merged

Helper refactor & fixes #252

merged 3 commits into from
Jul 11, 2013

Commits on Jul 11, 2013

  1. HTML helpers work with double taches - issue TryGhost#246 item 1.

    - updated navigation and pagination helpers to use SafeString
    - nav and pagination don't need triple taches any more
    - nav tests updated, and renamed to match helper name
    ErisDS committed Jul 11, 2013
    Configuration menu
    Copy the full SHA
    53fe5e3 View commit details
    Browse the repository at this point in the history
  2. Nav helper bug - home page always marked as current

    - fixed a bug whereby once you visit the homepage the homepage menu item is always marked as the active page
    - this was due to passing the config object being done by reference rather than by value, and therefore setting the selected item was persisted.
    ErisDS committed Jul 11, 2013
    Configuration menu
    Copy the full SHA
    0dd0d20 View commit details
    Browse the repository at this point in the history
  3. HTML helpers refactor - issue TryGhost#246 items 2 and 5.

    - moved template logic out of individual helpers and into Ghost
    - simplified template-driven helpers into closures which maintain the context of handlebars
    - with handlebars context we have access to data, so don't need to pass data in
    - check data to test that it is a simple object and not a function
    - moved helpers back into index.js
    - provided tests for both template functions in ghost and the nav helper so we are back to where we were
    ErisDS committed Jul 11, 2013
    Configuration menu
    Copy the full SHA
    6f8752a View commit details
    Browse the repository at this point in the history