carousel.html 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  1. <!doctype html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <title>KitchenSink - Lungo 2.0</title>
  6. <meta name="description" content="">
  7. <meta name="author" content="Javier Jiménez Villar (@soyjavi)">
  8. <meta name="HandheldFriendly" content="True">
  9. <meta name="MobileOptimized" content="320">
  10. <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
  11. <meta name="apple-mobile-web-app-capable" content="yes">
  12. <meta name="apple-mobile-web-app-status-bar-style" content="black">
  13. <meta name="format-detection" content="telephone=no">
  14. <meta http-equiv="cleartype" content="on">
  15. <link rel="apple-touch-icon-precomposed" sizes="114x114" href="http://lungo.tapquo.com/resources/icon@2x.png">
  16. <link rel="apple-touch-icon-precomposed" sizes="72x72" href="http://lungo.tapquo.com/resources/icon-72.png">
  17. <link rel="apple-touch-icon-precomposed" href="http://lungo.tapquo.com/resources/icon.png">
  18. <link rel="apple-touch-startup-image" href="http://lungo.tapquo.com/resources/default.png">
  19. <!-- Main Stylesheet -->
  20. <link rel="stylesheet" href="../src/stylesheets/css/Lungo.base.css">
  21. <link rel="stylesheet" href="../src/stylesheets/css/Lungo.layout.css">
  22. <link rel="stylesheet" href="../src/stylesheets/css/Lungo.layout.nav.css">
  23. <link rel="stylesheet" href="../src/stylesheets/css/Lungo.layout.aside.css">
  24. <link rel="stylesheet" href="../src/stylesheets/css/Lungo.layout.article.css">
  25. <link rel="stylesheet" href="../src/stylesheets/css/Lungo.layout.list.css">
  26. <link rel="stylesheet" href="../src/stylesheets/css/Lungo.layout.grid.css">
  27. <link rel="stylesheet" href="../src/stylesheets/css/Lungo.widgets.css">
  28. <link rel="stylesheet" href="../src/stylesheets/css/Lungo.widgets.splash.css">
  29. <link rel="stylesheet" href="../src/stylesheets/css/Lungo.widgets.button.css">
  30. <link rel="stylesheet" href="../src/stylesheets/css/Lungo.widgets.form.css">
  31. <link rel="stylesheet" href="../src/stylesheets/css/Lungo.widgets.colour.css">
  32. <link rel="stylesheet" href="../src/stylesheets/css/Lungo.widgets.icon.css">
  33. <link rel="stylesheet" href="../src/stylesheets/css/Lungo.widgets.icon.brand.css">
  34. <link rel="stylesheet" href="../src/stylesheets/css/Lungo.widgets.loading.css">
  35. <link rel="stylesheet" href="../src/stylesheets/css/Lungo.widgets.notification.css">
  36. <link rel="stylesheet" href="../src/stylesheets/css/Lungo.theme.default.css">
  37. <!--
  38. <link rel="stylesheet" href="../../release/lungo.css">
  39. <link rel="stylesheet" href="../../release/lungo.icon.css">
  40. <link rel="stylesheet" href="../../release/lungo.icon.brand.css">
  41. <link rel="stylesheet" href="../../release/lungo.theme.default.css">
  42. -->
  43. <!-- App Stylesheet -->
  44. <link rel="stylesheet" href="stylesheets/app.css">
  45. </head>
  46. <body class="app">
  47. <section id="main" data-transition="slide" data-pull="normal">
  48. <header class="">
  49. <nav class="left button">
  50. <a href="#main-article" data-router="article" data-icon="menu"></a>
  51. <a href="#second-article" data-router="article" data-icon="menu"></a>
  52. </nav>
  53. <nav class="right button">
  54. <a href="https://twitter.com/intent/tweet?original_referer=http%3A%2F%2Flungo.tapquo.com%2F&text=@lungojs a framework for developers who want to design, build and share cross device apps" data-icon="share" target="_blank" ></a>
  55. </nav>
  56. <div class="left">
  57. <div class="centered title with-subtitle">
  58. Lungo Framework
  59. <small class="subtitle">version 2</small>
  60. </div>
  61. </div>
  62. </header>
  63. <style>
  64. .carousel {
  65. padding:50px;
  66. height: 100px;
  67. }
  68. </style>
  69. <article id="main-article" class="scroll">
  70. <a href="#" id="start1">start me!</a>
  71. <div data-control="carousel-1" class="carousel" style="background: #aaa">
  72. <ul>
  73. <li style="display:block">Lorem</li>
  74. <li style="display:none">2222</li>
  75. <li style="display:none">3333</li>
  76. </ul>
  77. </div>
  78. </article>
  79. <article id="second-article" class="scroll">
  80. <a href="#" id="start2">start me!</a>
  81. <div data-control="carousel-2" class="carousel" style="background: #ccc">
  82. <ul>
  83. <li style="display:block">1111</li>
  84. <li style="display:none">2222</li>
  85. <li style="display:none">3333</li>
  86. </ul>
  87. </div>
  88. </article>
  89. </section>
  90. <!-- Lungo dependencies -->
  91. <script src="../src/lib/quo.js"></script>
  92. <script src="../src/Lungo.js"></script>
  93. <script src="../src/Lungo.Init.js"></script>
  94. <script src="../src/Lungo.Core.js"></script>
  95. <script src="../src/Lungo.Dom.js"></script>
  96. <script src="../src/Lungo.Service.js"></script>
  97. <script src="../src/Lungo.Constants.js"></script>
  98. <script src="../src/Lungo.Events.js"></script>
  99. <script src="../src/Lungo.Notification.js"></script>
  100. <script src="../src/Lungo.Fallback.js"></script>
  101. <script src="../src/router/Lungo.Router.js"></script>
  102. <script src="../src/router/Lungo.Router.History.js" ></script>
  103. <script src="../src/view/Lungo.View.Article.js" ></script>
  104. <script src="../src/view/Lungo.View.Aside.js" ></script>
  105. <script src="../src/element/Lungo.Element.Cache.js"></script>
  106. <script src="../src/element/Lungo.Element.Carousel.js"></script>
  107. <script src="../src/element/Lungo.Element.Count.js"></script>
  108. <script src="../src/element/Lungo.Element.Loading.js"></script>
  109. <script src="../src/element/Lungo.Element.Progress.js"></script>
  110. <script src="../src/element/Lungo.Element.Pull.js"></script>
  111. <script src="../src/data/Lungo.Data.Cache.js"></script>
  112. <script src="../src/data/Lungo.Data.Sql.js"></script>
  113. <script src="../src/data/Lungo.Data.Storage.js"></script>
  114. <script src="../src/attributes/Lungo.Attributes.Data.js"></script>
  115. <script src="../src/boot/Lungo.Boot.Resources.js" ></script>
  116. <script src="../src/boot/Lungo.Boot.Stats.js" ></script>
  117. <script src="../src/boot/Lungo.Boot.Layout.js"></script>
  118. <script src="../src/boot/Lungo.Boot.Events.js"></script>
  119. <script src="../src/boot/Lungo.Boot.Data.js"></script>
  120. <script src="../src/boot/Lungo.Boot.Section.js"></script>
  121. <script src="../src/boot/Lungo.Boot.Article.js"></script>
  122. <!-- LungoJS - Sandbox App -->
  123. <script>
  124. Lungo.init();
  125. $$('#start1').tap(function() {
  126. var carousel1 = Lungo.View.Carousel($$('[data-control=carousel-1]')[0]);
  127. alert("active");
  128. });
  129. $$('#start2').tap(function() {
  130. var carousel2 = Lungo.View.Carousel($$('[data-control=carousel-2]')[0]);
  131. setInterval(function() {
  132. carousel2.next();
  133. }, 750)
  134. });
  135. </script>
  136. </body>
  137. </html>