Browse Source

Put echo in Ember app & store own static img

master
sipp11 10 years ago
parent
commit
0928763f74
  1. BIN
      img/158x240.gif
  2. BIN
      img/300x169.gif
  3. BIN
      img/92x138.gif
  4. 23
      index.html
  5. 5
      js/app.js

BIN
img/158x240.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 646 B

BIN
img/300x169.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

BIN
img/92x138.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 369 B

23
index.html

@ -51,15 +51,15 @@
{{#each model}}
<li class="thumbnail">
{{#if backdrop_path}}
<img src="http://placehold.it/300x169" alt="" data-echo="http://image.tmdb.org/t/p/w300{{unbound backdrop_path}}" width="300" height="169" class="img-rounded" {{action 'openInfoModal' this}}>
<img src="/img/300x169.gif" alt="" data-echo="http://image.tmdb.org/t/p/w300{{unbound backdrop_path}}" width="300" height="169" class="img-rounded" {{action 'openInfoModal' this}}>
{{else}}
{{#if poster_path}}
<img src="http://placehold.it/92x138" alt=""width="92" height="138" align="left" class="img-rounded" {{action 'openInfoModal' this}} data-echo="http://image.tmdb.org/t/p/w92{{unbound poster_path}}" />
<img src="/img/92x138.gif" alt="" width="92" height="138" align="left" class="img-rounded" {{action 'openInfoModal' this}} data-echo="http://image.tmdb.org/t/p/w92{{unbound poster_path}}" />
{{else}}
{{#if poster_url}}
<img src="http://placehold.it/158x240" alt=""width="158" height="240" align="left" class="img-rounded" {{action 'openInfoModal' this}} data-echo="{{unbound poster_url}}" />
<img src="/img/158x240.gif" alt="" width="158" height="240" align="left" class="img-rounded" {{action 'openInfoModal' this}} data-echo="{{unbound poster_url}}" />
{{else}}
<img src="http://placehold.it/92x138" alt=""width="92" height="138" align="left" class="img-rounded" {{action 'openInfoModal' this}} />
<img src="/img/92x138.gif" alt="" width="92" height="138" align="left" class="img-rounded" {{action 'openInfoModal' this}} />
{{/if}}
{{/if}}
{{/if}}
@ -121,24 +121,13 @@
</script>
<script src="js/jquery-2.1.1.min.js"></script>
<script src="js/isotope.pkgd.min.js"></script>
<script src="js/echo.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/isotope.pkgd.min.js"></script>
<script src="//showtimes.everyday.in.th/bower_components/moment/moment.js"></script>
<script src="//showtimes.everyday.in.th/js/libs/handlebars-1.1.2.js"></script>
<script src="//showtimes.everyday.in.th/js/libs/ember-1.7.0.min.js"></script>
<script src="js/echo.min.js"></script>
<script src="/js/app.js"></script>
<script>
echo.init({
offset: 200,
throttle: 350,
unload: true,
callback: function (element, op) {
$('#container').isotope();
}
});
</script>
</body>
</html>

5
js/app.js

@ -97,6 +97,11 @@ App.MoviesView = Ember.View.extend({
transitionDuration: '0.7s',
isResizeBound: true
});
echo.init({
offset: 10,
throttle: 250,
unload: false
});
});
}
});

Loading…
Cancel
Save