5.0.6 • Published 9 years ago

ft-next-wrapper v5.0.6

Weekly downloads
21
License
proprietary
Repository
github
Last release
9 years ago

next-wrapper

Shared templates for ft next sites.

The node stuff has moved to ft-next-express.

  • Header styles and behaviour, including search and uber-nav
  • Client side error reporting
  • Basic Page and Click Tracking

installation

npm install -S https://github.com/Financial-Times/next-wrapper/archive/master.tar.gz
bower install -S next-wrapper=https://github.com/Financial-Times/next-wrapper.git

client js

require('next-wrapper')();

Raven

Within your app you should use the copy of raven pre-configured by next-wrapper to send client side errors to sentry: require('next-wrapper').raven.captureMessage('blah blah')

scss

@import 'next-wrapper/main'

Templates

Each full page template should then use the following (assuming they are in the root of a ./templates directory)

{% extends "components/bower/next-wrapper/templates/layout.html" %}
{% block head %}
    // optional stuff to put in the head, after your main stylesheet
{% endblock %}
{% block body %}
    // the template for your page content goes here
{% endblock %}
{% block foot %}
    // optional stuff to put after the page content and scripts
{% endblock %}

Your app should build its styles and scripts to /{{appname}}/main.js and /{{appname}}/main.css to ensure automatic inclusion.

##Development

make install
make example
5.0.6

9 years ago

5.0.5

9 years ago

5.0.1

9 years ago

5.0.0

9 years ago

4.0.1

9 years ago

4.0.0

9 years ago