screenshots animation: better names

This commit is contained in:
Thomas Waldmann 2013-10-03 16:13:11 +02:00
parent 01b0ddd97b
commit 5d6e0c2510

View File

@ -85,24 +85,23 @@
<div class="col-lg-6"> <div class="col-lg-6">
<div class="well well-sm"> <div class="well well-sm">
<h3>Screenshots</h3> <h3>Screenshots</h3>
<a id="screenshots_url" href="{% static 'screenshots/overview.png' %}"> <a id="screenshot_link" href="{% static 'screenshots/overview.png' %}">
<img id="screenshots" src="{% static 'screenshots/overview.png' %}" class="img-responsive" alt="Responsive image"> <img id="screenshot_image" src="{% static 'screenshots/overview.png' %}" class="img-responsive" alt="Responsive image">
</a> </a>
<script> <script>
var id = 0; var idx = 0;
var srcs = new Array("{% static 'screenshots/hostview.png' %}", var images = new Array("{% static 'screenshots/hostview.png' %}",
"{% static 'screenshots/help.png' %}", "{% static 'screenshots/help.png' %}",
"{% static 'screenshots/overview.png' %}", "{% static 'screenshots/overview.png' %}",
"{% static 'screenshots/generatesecret.png' %}"); "{% static 'screenshots/generatesecret.png' %}");
setInterval(function(){ setInterval(function(){
$('#screenshots').attr('src', srcs[id]); $('#screenshot_link').attr('href', images[idx]);
$('#screenshots_url').attr('href', srcs[id]); $('#screenshot_image').attr('src', images[idx]);
id += 1; idx += 1;
if(id>=srcs.length) { if(idx >= images.length) {
id=0; idx = 0;
} }
},5000); }, 5000);
</script> </script>
</div> </div>
</div> </div>