ft-next-wrapper

5.0.6 • Public • Published

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

Readme

Keywords

none

Package Sidebar

Install

npm i ft-next-wrapper

Weekly Downloads

1

Version

5.0.6

License

proprietary

Last publish

Collaborators

  • mattandrews
  • ftlabs