Skip to content

Instantly share code, notes, and snippets.

@bmann
Created September 8, 2013 06:23
Show Gist options
  • Save bmann/6482379 to your computer and use it in GitHub Desktop.
Save bmann/6482379 to your computer and use it in GitHub Desktop.
A partial for Harp to include in an article layout if you want to embed a gallery. Create a directory with the same name as the article and put as many images as you like in it. Uses [swipejs](http://swipejs.com).
<%
if (public.images[current.source]) { %>
<div id="slider" class="swipe">
<div class="swipe-wrap"> <%
for (image in public.images[current.source].contents) { %>
<div><img src="/images/<%= current.source %>/<%= public.images[current.source].contents[image] %>" class="image image-full" /></div>
<% } %>
</div>
</div>
<% } %>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment