marionette.f7

2.0.4 • Public • Published

marionette.f7

NPM version NPM downloads Dependency Status

Marionette.js integration with Framework7

Features

    ✓ Small, no need for intermediary layer, use Framework7 as is
    ✓ Configure Framework7 views (page stacks)
    ✓ Manipulate page stacks (push page, switch active one)

Usage

createApp(args) [-> Promise]

Creates a Framework7 application instance. The args is a hash accepting the following keys:

options: a hash with the application options

views: a hash with the views* configuration where the key is the view name and the value hold the view options:

  • el: the selector for the view element
  • rootPage: a Marionette view instance. It can be defined as a function or a promise
  • preRender: a boolean value to determine with the root page must be pre rendered
  • popup: a boolean value to determine if the view should be show in a popup

* In Framework7 parlance, view is a ”separate visual part of app with its own settings, navigation and history” which can contains one or more pages. Not to confuse with Marionette.js View.

pushPage(mnView [, f7ViewName])

Pushes a page into the page stack. mnView should be a Marionette view instance and f7ViewName the Framework7 view name where the page should be pushed unto. If f7ViewName is omitted the page is pushed into the active Framework7 view

popPage([f7ViewName])

Pops a page from the page stack.

f7ViewName should be the Framework7 view name where the page should be popped. If f7ViewName is omitted the page is popped from the active Framework7 view

showView(f7ViewName)

Shows a Framework7 view.

f7ViewName should be the Framework7 view name that must be show / activated. If is already active nothing is done.

showPopup(mnView)

Shows a Marionette view as a standalone popup.

mnView should be a Marionette view instance

Examples

See examples folder and live demo.

License

Copyright © 2017 Luiz Américo Pereira Câmara. This source code is licensed under the MIT license found in the LICENSE.txt file. The documentation to the project is licensed under the CC BY-SA 4.0 license.

Readme

Keywords

none

Package Sidebar

Install

npm i marionette.f7

Weekly Downloads

1

Version

2.0.4

License

MIT

Unpacked Size

77.6 kB

Total Files

7

Last publish

Collaborators

  • blikblum