forked from barryclark/jekyll-now
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add turbolinks * Restructure scripts to work with Turbolinks * Replace manual turbo links asset with bower asset * Move JS back to footer to prevent Google PageSpeed penalty * Replace social onclick props with "_blank"-targeted links to prevent Turbolinks conflict * Add no opener no referrer to "_blank" links for security * Satisfy whitespace police * Revert share links and add turbo links compatibility
- Loading branch information
1 parent
99dff42
commit e83e4a9
Showing
4 changed files
with
28 additions
and
21 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,25 @@ | ||
//= require_self | ||
|
||
// Initialize fluidbox | ||
|
||
$(function () { | ||
$(document).on('turbolinks:load', function (event) { | ||
// Initialize fluidbox | ||
$('.fluidbox-trigger').fluidbox(); | ||
}) | ||
|
||
// Initialize scrollreveal | ||
// Track page views on Turbolinks | ||
if (typeof ga === 'function') { | ||
ga('set', 'location', event.data.url) | ||
ga('send', 'pageview') | ||
} | ||
|
||
window.sr = ScrollReveal({ reset: true }); | ||
sr.reveal('.reveal', { | ||
distance: '0', | ||
duration: 500, | ||
easing: 'ease-in-out', | ||
origin: 'top', | ||
scale: 1, | ||
reset: false, | ||
viewFactor: 0 | ||
// Initialize scrollreveal | ||
sr.reveal('.reveal', { | ||
distance: '0', | ||
duration: 500, | ||
easing: 'ease-in-out', | ||
origin: 'top', | ||
scale: 1, | ||
reset: false, | ||
viewFactor: 0 | ||
}); | ||
}); | ||
|
||
window.sr = ScrollReveal({ reset: true }); |
This file contains 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
This file contains 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
This file contains 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