Skip to content

Instantly share code, notes, and snippets.

@j-cam
Created July 8, 2015 16:02
Show Gist options
  • Save j-cam/bd7ff27a9683b044dbb0 to your computer and use it in GitHub Desktop.
Save j-cam/bd7ff27a9683b044dbb0 to your computer and use it in GitHub Desktop.
Template for creating a new photo set post.
<!-- START SLIDE FUNCTIONALITY -->
<script type src="http://code.jquery.com/jquery-latest.min.js"></script>
<script src="/storage/js/slides.jquery.js"></script>
<script>
$(function () {
$('#slides').slides({
preload: true,
preloadImage: '/storage/js/loading.jpg',
autoHeight: true,
autoHeightSpeed: 350,
generateNextPrev: false,
generatePagination: false,
bigTarget: true,
play: 0,
pause: 3500,
hoverPause: false,
effect: 'fade',
fadeSpeed: 1,
crossfade: true
});
});
$(document).keydown(function (e) {
if (e.keyCode === 37) {
$('a.prev').trigger('click');
} else if (e.keyCode === 39) {
$('a.next').trigger('click');
}
});
</script>
<!-- END SLIDE FUNTIONALITY -->
<!-- START SLIDES TEMPLATE -->
<div id="slides">
<div class="slides_container">
<div>
<img src="/storage/photography/name-of-set/01.jpg">
</div>
<div>
<img src="/storage/photography/name-of-set/02.jpg">
</div>
<div>
<img src="/storage/photography/name-of-set/03.jpg">
</div>
<div>
<img src="/storage/photography/name-of-set/04.jpg">
</div>
<div>
<img src="/storage/photography/name-of-set/05.jpg">
</div>
<div>
<img src="/storage/photography/name-of-set/06.jpg">
</div>
<div>
<img src="/storage/photography/name-of-set/07.jpg">
</div>
<div>
<img src="/storage/photography/name-of-set/08.jpg">
</div>
<div>
<img src="/storage/photography/name-of-set/09.jpg">
</div>
<div>
<img src="/storage/photography/name-of-set/10.jpg">
</div>
<div>
<img src="/storage/photography/name-of-set/11.jpg">
</div>
<div>
<img src="/storage/photography/name-of-set/12.jpg">
</div>
<div>
<img src="/storage/photography/name-of-set/13.jpg">
</div>
<div>
<img src="/storage/photography/name-of-set/14.jpg">
</div>
<div>
<img src="/storage/photography/name-of-set/15.jpg">
</div>
<div>
<img src="/storage/photography/name-of-set/16.jpg">
</div>
</div>
<div id="nav">
<a href="#" class="prev">Previous</a> | <a href="#" class="next">Next</a>
</div>
</div>
<!-- END SLIDES TEMPLATE -->
<!-- START CAPTION TEMPLATE -->
<!--
<div id="text">
<h3>A TITLE GOES HERE</h3>
<p>
LINE OF TEXT GOES HERE
<br>
LINE OF TEXT GOES HERE
<br>
LINE OF TEXT GOES HERE
</p>
</div>
-->
<!-- END CAPTION TEMPLATE -->
@j-cam
Copy link
Author

j-cam commented Jul 8, 2015

Instructions

  1. Click the raw button at the top
  2. Replace "name-of-set" in each image tag with the new name.
  3. Copy paste all of the text into the top of each photo set page.

Notes: There are 3 sections: slide functionality, slides template, caption template. The caption template is commented out and won't be visible unless it is uncommented. To make it visible remove "" at line 111. If the caption isn't needed at all, delete everything from line 94 to line 112.

Here is just the slide functionality script for updating existing pages: JR Photo Set Slides Script

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment