Skip to content
This repository has been archived by the owner on Oct 18, 2022. It is now read-only.

Commit

Permalink
Lazy loading for screenshots
Browse files Browse the repository at this point in the history
  • Loading branch information
quassy committed Feb 21, 2016
1 parent 11fb683 commit 525631d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
5 changes: 4 additions & 1 deletion _includes/app_teaser.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
{% if post.screenshots %}
<div id="screenshots">
{% for screenshot in post.screenshots %}
<img src="{{ site.baseurl }}/img/windows/{{ screenshot }}" alt="Screenshot of {{ post.title }}" />
<img src="{ site.baseurl }}/img/windows/placeholder.png" data-src="{{ site.baseurl }}/img/windows/{{ screenshot }}" alt="Screenshot of {{ post.title }}" />
<noscript>
<img src="{{ site.baseurl }}/img/windows/{{ screenshot }}" alt="Screenshot of {{ post.title }}" />
</noscript>
{% endfor %}
</div>
<p id="showcase" style="text-align:center">
Expand Down
4 changes: 4 additions & 0 deletions _layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,13 @@
<![endif]-->
<!-- load jQuery and tablesorter scripts -->
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/unveil/1.3.0/jquery.unveil.min.js"></script>
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/jquery.tablesorter/2.18.4/js/jquery.tablesorter.min.js"></script>
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/jquery.tablesorter/2.18.4/js/jquery.tablesorter.widgets.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$("img").unveil();
});
$(function(){
$(".tablesorter").tablesorter();
});
Expand Down
Binary file added img/windows/placeholder.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 525631d

Please sign in to comment.