GithubHelp home page GithubHelp logo

johnzgit / framework7-plugin-welcomescreen Goto Github PK

View Code? Open in Web Editor NEW

This project forked from valnub/framework7-plugin-welcomescreen

0.0 2.0 0.0 628 KB

A plugin for Framework7 that displays a swipeable welcome screen to guide the user through a tutorial

CSS 28.18% HTML 0.31% JavaScript 71.51%

framework7-plugin-welcomescreen's Introduction

Framework7 Plugin Welcomescreen

Just a quick plugin for Framework 7

This will display a fullscreen swipeable modal window to guide the user through a welcome screen (as requested here http://www.idangero.us/framework7/forum/#!/framework7/feature-requests%23request-centered-large-mod).

Screenshot

Welcome screen

Live demo

http://www.timo-ernst.net/misc/f7-plugin-welcomescreen

Setup

  1. Copy welcomescreen.css and welcomescreen.js to your project and reference them:
<link rel="stylesheet" href="welcomescreen.css">
<script src="welcomescreen.js"></script>
  1. Define slides
var welcomescreen_slides = [
  {
    id: 0,
    picture: '<div class="tutorialicon">♥</div>',
    text: 'Welcome to this tutorial. In the next steps we will guide you through a manual that will teach you how to use this app.'
  },
  {
    id: 1,
    picture: '<div class="tutorialicon">✲</div>',
    text: 'This is slide 2'
  },
  {
    id: 2,
    picture: '<div class="tutorialicon">♫</div>',
    text: 'This is slide 3'
  },
  {
    id: 3,
    picture: '<div class="tutorialicon">☆</div>',
    text: 'Thanks for reading! Enjoy this app.<br><br><a id="tutorial-close-btn" href="#">End Tutorial</a>'
  }
];

Parameters

  • id Set an id for this slide
  • picture Set free html here
  • text You can set html here but I recommend using just plain text
  1. Initialize & options
var myapp = new Framework7();
var options = {
  'bgcolor': '#0da6ec',
  'fontcolor': '#fff'
}
var welcomescreen = myapp.welcomescreen(welcomescreen_slides, options);
  1. How to close it
$$('#some-button').click(function () {
  welcomescreen.close();
});

That's it :-) Enjoy

Made with <3 by www.timo-ernst.net

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.