Skip to content

Commit 9e23862

Browse files
committed
Trying to fix the t-shirt slideshow
1 parent 9c4a61f commit 9e23862

File tree

3 files changed

+20
-10
lines changed

3 files changed

+20
-10
lines changed

css/style.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,10 @@ a:link:visited {
6565
opacity:1.0;
6666
}
6767

68-
6968
#slideshow IMG.last-active {
7069
z-index:9;
7170
}
71+
7272

7373

7474
/* ================ LAYOUT ================== */

javascript/MM_functions.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,17 @@ function slideSwitch() {
33

44
if ( $active.length == 0 ) $active = $('#slideshow IMG:last');
55

6+
// use this to pull the images in the order they appear in the markup
67
var $next = $active.next().length ? $active.next()
78
: $('#slideshow IMG:first');
89

10+
// uncomment the 3 lines below to pull the images in random order
11+
12+
// var $sibs = $active.siblings();
13+
// var rndNum = Math.floor(Math.random() * $sibs.length );
14+
// var $next = $( $sibs[ rndNum ] );
15+
16+
917
$active.addClass('last-active');
1018

1119
$next.css({opacity: 0.0})
@@ -19,6 +27,7 @@ $(function() {
1927
setInterval( "slideSwitch()", 5000 );
2028
});
2129

30+
2231
function MM_swapImgRestore() { //v3.0
2332
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
2433
}

templates/template.cover.html

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@
2020
<li>&raquo; For GNU/Linux, Mac OS X, and Windows</li>
2121
<li>&raquo; Projects run online or as double-clickable applications</li>
2222
<li>&raquo; Over 100 libraries extend the software into sound, video, computer vision, and more...</li>
23-
<li>&raquo; Well <a href="http://processing.org/reference/">documented</a>, with many <a href="http://processing.org/learning/books/">books</a> available</li>
23+
<li>&raquo; Well <a href="http://processing.org/reference/">documented</a>,
24+
with many <a href="http://processing.org/learning/books/">books</a> available</li>
2425
</ul>
2526

2627
</p>
@@ -56,14 +57,14 @@
5657
<div class="leftcol">
5758
<p>
5859
<div id="slideshow">
59-
<img src="/img/shirts/brain-1.jpg" alt="Processing T-Shirt 1" class="active" />
60-
<img src="/img/shirts/brain-2.jpg" alt="Processing T-Shirt 2" />
61-
<img src="/img/shirts/beast-1.jpg" alt="Processing T-Shirt 3" />
62-
<img src="/img/shirts/beast-2.jpg" alt="Processing T-Shirt 4" />
63-
<img src="/img/shirts/beast-3.jpg" alt="Processing T-Shirt 5" />
64-
<img src="/img/shirts/beast-4.jpg" alt="Processing T-Shirt 6" />
65-
<img src="/img/shirts/beauty-1.jpg" alt="Processing T-Shirt 7" />
66-
<img src="/img/shirts/beauty-2.jpg" alt="Processing T-Shirt 8" />
60+
<img src="/img/shirts/brain-2.jpg" alt="Slideshow Image 1" class="active" />
61+
<img src="/img/shirts/brain-1.jpg" alt="Slideshow Image 2" />
62+
<img src="/img/shirts/beast-2.jpg" alt="Slideshow Image 3" />
63+
<img src="/img/shirts/beast-1.jpg" alt="Slideshow Image 4" />
64+
<img src="/img/shirts/beast-4.jpg" alt="Slideshow Image 5" />
65+
<img src="/img/shirts/beast-3.jpg" alt="Slideshow Image 6" />
66+
<img src="/img/shirts/beauty-2.jpg" alt="Slideshow Image 7" />
67+
<img src="/img/shirts/beauty-1.jpg" alt="Slideshow Image 8" />
6768
</div>
6869
</p>
6970

0 commit comments

Comments
 (0)