-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
executable file
·98 lines (85 loc) · 3.97 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
<!doctype html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7" lang=""> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8" lang=""> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9" lang=""> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang=""> <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Pinocchio.js - Marionette extensions</title>
<meta name="description" content="Marionette extensions: Promisable Models.">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="css/normalize.min.css">
<link rel="stylesheet" href="css/main.css">
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.4/styles/default.min.css">
</head>
<body>
<div class="header-container">
<header class="wrapper clearfix">
<h1 class="title">Pinocchio.js</h1>
<!-- <nav>
<ul>
<li><a href="#about">What is Pinocchio.js?</a></li>
<li><a href="#promisable-models">Promisable Models</a></li>
</ul>
</nav> -->
</header>
</div>
<div class="main-container">
<div class="main wrapper clearfix">
<aside>
<h3>More info</h3>
<p>Check out all available repositories at <a href="http://github.com/pinocchio-js">github.com/pinocchio-js</a></p>
</aside>
<article id="about">
<header>
<h1>What's Pinocchio.js?</h1>
<p>Pinocchio is a set of extensions for Marionette.</p>
</header>
<section>
</section>
</article>
<article id="promisable-models">
<header>
<h1>Promisable Models</h1>
<p>Promisable Models is a mixin for Backbone Models and Collections that allow them to behave as jQuery Promises.</p>
<p><a href="https://github.com/pinocchio-js/promisable-models">https://github.com/pinocchio-js/promisable-models</a></p>
</header>
<section>
<p>Promisable Models can be used for example to show a "loading" message while the models/collections fetch remote data.</p>
<pre><code class="js">// Asumes that the module was added in App.Entities
var person = new App.Entities.Promisable.Model({id: 5}),
loadingView = new MyLoadingView(),
personView;
// Show template with "Loading" message
$('.container').html(loadingView.render().el);
person.fetch();
person.done(function() {
personView = new PersonView({
model: person
});
$('.container').html(personView.render().el)
});
</code></pre>
</section>
</article>
</div> <!-- #main -->
</div> <!-- #main-container -->
<div class="footer-container">
<footer class="wrapper">
<h3>Pinocchio.js</h3>
</footer>
</div>
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.4/highlight.min.js"></script>
<script>hljs.initHighlightingOnLoad();</script>
<script src="js/main.js"></script>
<script>
(function(b,o,i,l,e,r){b.GoogleAnalyticsObject=l;b[l]||(b[l]=
function(){(b[l].q=b[l].q||[]).push(arguments)});b[l].l=+new Date;
e=o.createElement(i);r=o.getElementsByTagName(i)[0];
e.src='//www.google-analytics.com/analytics.js';
r.parentNode.insertBefore(e,r)}(window,document,'script','ga'));
ga('create','UA-59453152-1','auto');ga('send','pageview');
</script>
</body>
</html>