This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
preprocess do | |
def generate_gallery_pages | |
counter = 1 | |
photos = Dir['assets/images/interiors/*']. | |
reject { |p| p.match /thumbnail/ }. | |
map { |p| p.gsub('assets','') } | |
photos.each do |photo| | |
site = Nanoc3::Site.new('.') | |
site.data_sources[0].create_item( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// first thumbnail is always the current image, so it | |
// should start out being selected | |
$('#photo_gallery ul li:first-child img').addClass('selected'); | |
// set the last thumbnail's margin to 0 | |
$('#photo_gallery ul li:last-child').addClass('last'); | |
// all thumbnails should begin with lower opacity | |
$('#photo_gallery ul img').animate({ opacity: 0.75 }).hover( | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div id="photo_gallery" class="home"> | |
<img id="main" class="preload" src="<%= home.main_photo %>" /> | |
<ul> | |
<% home.photos.each do |photo| %> | |
<li><img src="<%= photo.path %>" alt="<%= home.thumbnail_alt_text %> - <%= photo.caption %>"></li> | |
<% end %> | |
</ul> | |
</div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#photo_gallery | |
margin-bottom: 18px | |
img#main | |
width: 870px | |
height: 570px | |
margin-bottom: 5px | |
ul | |
height: 47px |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// Gallery Script | |
// | |
// first thumbnail starts out as being selected | |
$('#photo_gallery ul li:first-child img').addClass('selected'); | |
// set the last thumbnail's margin to 0 | |
$('#photo_gallery ul li:last-child').addClass('last'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<ul id="navigation2" class="append-bottom-8"> | |
<li class="lh"><a href="/<%= @item[:section] %>/"><%= titleize_section(@item) %></a></li> | |
<%= section_items path_to(@item) %> | |
</ul> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#navigation2 | |
margin-top: -5px | |
a:link, | |
a:visited | |
color: #666666 | |
.lh | |
a:link, | |
a:visited, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(document).ready(function() { | |
(function ($, fluid) { | |
fluid.reorderListWithHandlers = function (container, options) { | |
options = options || {}; | |
var addHandlers = function(element) { | |
$(element).children().prepend('<a class="handle" href="#"></a>'); | |
}; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function wrapEveryFour(children) { | |
for (var i = 0; i < (children.length / 4); i++) { | |
children.splice(0,4).wrapAll(container); | |
} | |
} | |
$('#content > section').each(function() { | |
var children = $(this).children('section'); | |
wrapEveryFour(children); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div id="content"> | |
<section> | |
<h2>Quarterly Reports</h2> | |
<h3>4th Quarter 2010</h3> | |
<section> | |
<h4>Ticket Count Reports</h4> | |
<ul> |