Skip to content

Instantly share code, notes, and snippets.

@yortz
Created February 3, 2016 12:58
Show Gist options
  • Save yortz/31de7fcad0df7d0ec7b0 to your computer and use it in GitHub Desktop.
Save yortz/31de7fcad0df7d0ec7b0 to your computer and use it in GitHub Desktop.
require fancybox in octopress for octopress gallery plugin
#= require ./libs/jquery-1.9.1
#= require modernizr-2.0
#= require ender
#= require jquery.waitforimages
#= require fancybox/jquery.mousewheel-3.0.6.pack
#= require fancybox/jquery.fancybox.pack
#= require underscore
#= require twitter
#= require gallery
#= require ./libs/lunr.min
#= require ./libs/handlebars
#= require ./libs/jXHR
#= require ./libs/URI.min
#= require lunr_search
#= require octopress
#= require custom
jQuery.noConflict() # prevents conflicts with Ender.js, use jQuery instead of $
jQuery(document).ready ->
jQuery("a.fancy").fancybox
nextEffect: "fade"
prevEffect: "fade"
@gallery = new Gallery '#gallery'
Handlebars.registerHelper "toLowerCase", (value) ->
(if (value and typeof value is "string") then new Handlebars.SafeString(value.toLowerCase()) else "")
Handlebars.registerHelper "is", (v1, v2, options) ->
if v1 is v2 then options.fn(@) else options.inverse(@)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment