Chapter 8: Gallery
Hi Imar.
I have built the Gallery site according to the book. It almost works as described. The difference is, that I only get the first thumbnail. Is it possible that something is wrong with the tinycarousel.css:
<div id="slider-code"> <!-- don´t use id="slider-code" to get all thumbnails -->
<a class="buttons prev" href="#">left</a>
<div class="viewport">
<ul class="overview">
@foreach(var file in files){
<li>
<a class="thumb" href="Uploads/@folderName/@file.Replace("_thumb", "")">
<img src="Uploads/@folderName/@file" alt=""/>
</a>
</li>
}
</ul>
</div>
If I omit the id="slider-code", the I get all thumbnails shown, albeit not horizontally ordered but stacked vertically.
Another question: on page 212 in the book it says: ... copy the images (from the Upload folder) to your newly created Images folder. As far as I can see from the code in Gallery.cshtml, the images are fetched from the Uploads folder. In any case, I don´t copy the images and it does not seem to matter.
Regards,
Gudni
__________________
Regards,
Gudni G. Sigurdsson
|