JSFiddle - React, Tailwind, and code Playground

by kerrydp

HTML

<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/framework7-bundle.min.css">
<script src="https://cdn.jsdelivr.net/npm/[email protected]/framework7-bundle.min.js"></script>
<!DOCTYPE html>
<html>

  <head>
    <!-- Required meta tags-->
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no, viewport-fit=cover">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <!-- Color theme for statusbar (Android only) -->
    <meta name="theme-color" content="#2196f3">
    <!-- Your app title -->
    <title>My App</title>
    <!-- Path to Framework7 Library Bundle CSS -->
    <link rel="stylesheet" href="path/to/framework7-bundle.min.css">
    <!-- Path to your custom app styles-->
    <link rel="stylesheet" href="path/to/my-app.css">
  </head>

  <body>
    <!-- App root element -->
    <div id="app">

      <!-- Your main view, should have "view-main" class -->
      <div class="view view-main">
        <!-- Initial Page, "data-name" contains page name -->
        <div data-name="home" class="page">

          <!-- Top Navbar -->
          <div class="navbar">
            <div class="navbar-bg"></div>
            <div class="navbar-inner">
              <div class="title">Awesome App</div>
            </div>
          </div>



          <!-- Scrollable page content -->
          <div class="page-content infinite-scroll-content">
            <div class="block block-strong">
              This is some example content.
            </div>
            <div class="block block-strong">
              This is some example content.
            </div>
            <div class="block block-strong">
              This is some example content.
            </div>
            <div class="block block-strong">
              This is some example content.
            </div>
            <div class="block block-strong">
              This is some example...

JavaScript

var app = new Framework7({
  // App root element
  el: '#app',
  // App Name
  name: 'My App',
  // App id
  id: 'com.myapp.test',
  // Enable swipe panel
  panel: {
    swipe: true,
  },
  theme: 'ios',
  // Add default routes
  routes: [
    {
      path: '/about/',
      url: 'about.html',
    },
  ],
  // ... other parameters
});

var mainView = app.views.create('.view-main');

var $$ = Dom7;

$$('.infinite-scroll-content').on('infinite', function (e) {
  alert("You've reached the bottom of the page, and 'infinite' event was fired.");
});