page_piling_rails 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 1e8c49ef17901b778925bbc3595035b0c32ff654
4
+ data.tar.gz: 4f41492d2b7beda406816c9a8b17ec8871f01c26
5
+ SHA512:
6
+ metadata.gz: 175f1ad6e34148d500168719a8d7e5fd70feb2a6c75224df4ba9ad23cb314a87ef51f8b01b11f80d19920a1c152470ddce908335d8be01c86b7a5155f73b9cd9
7
+ data.tar.gz: 81d817956c476f58874958f9c0b1bee6744beb8ee5f883d0cd61d564ea8b0912e03b3eef578ccecad03c11f0475dc4e6f522c985a9b33a297279eb5ed5516c49
@@ -0,0 +1,9 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
data/.rspec ADDED
@@ -0,0 +1,2 @@
1
+ --format documentation
2
+ --color
@@ -0,0 +1,5 @@
1
+ sudo: false
2
+ language: ruby
3
+ rvm:
4
+ - 2.3.0
5
+ before_install: gem install bundler -v 1.13.6
@@ -0,0 +1,74 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ In the interest of fostering an open and welcoming environment, we as
6
+ contributors and maintainers pledge to making participation in our project and
7
+ our community a harassment-free experience for everyone, regardless of age, body
8
+ size, disability, ethnicity, gender identity and expression, level of experience,
9
+ nationality, personal appearance, race, religion, or sexual identity and
10
+ orientation.
11
+
12
+ ## Our Standards
13
+
14
+ Examples of behavior that contributes to creating a positive environment
15
+ include:
16
+
17
+ * Using welcoming and inclusive language
18
+ * Being respectful of differing viewpoints and experiences
19
+ * Gracefully accepting constructive criticism
20
+ * Focusing on what is best for the community
21
+ * Showing empathy towards other community members
22
+
23
+ Examples of unacceptable behavior by participants include:
24
+
25
+ * The use of sexualized language or imagery and unwelcome sexual attention or
26
+ advances
27
+ * Trolling, insulting/derogatory comments, and personal or political attacks
28
+ * Public or private harassment
29
+ * Publishing others' private information, such as a physical or electronic
30
+ address, without explicit permission
31
+ * Other conduct which could reasonably be considered inappropriate in a
32
+ professional setting
33
+
34
+ ## Our Responsibilities
35
+
36
+ Project maintainers are responsible for clarifying the standards of acceptable
37
+ behavior and are expected to take appropriate and fair corrective action in
38
+ response to any instances of unacceptable behavior.
39
+
40
+ Project maintainers have the right and responsibility to remove, edit, or
41
+ reject comments, commits, code, wiki edits, issues, and other contributions
42
+ that are not aligned to this Code of Conduct, or to ban temporarily or
43
+ permanently any contributor for other behaviors that they deem inappropriate,
44
+ threatening, offensive, or harmful.
45
+
46
+ ## Scope
47
+
48
+ This Code of Conduct applies both within project spaces and in public spaces
49
+ when an individual is representing the project or its community. Examples of
50
+ representing a project or community include using an official project e-mail
51
+ address, posting via an official social media account, or acting as an appointed
52
+ representative at an online or offline event. Representation of a project may be
53
+ further defined and clarified by project maintainers.
54
+
55
+ ## Enforcement
56
+
57
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
58
+ reported by contacting the project team at Abhay Nikam. All
59
+ complaints will be reviewed and investigated and will result in a response that
60
+ is deemed necessary and appropriate to the circumstances. The project team is
61
+ obligated to maintain confidentiality with regard to the reporter of an incident.
62
+ Further details of specific enforcement policies may be posted separately.
63
+
64
+ Project maintainers who do not follow or enforce the Code of Conduct in good
65
+ faith may face temporary or permanent repercussions as determined by other
66
+ members of the project's leadership.
67
+
68
+ ## Attribution
69
+
70
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71
+ available at [http://contributor-covenant.org/version/1/4][version]
72
+
73
+ [homepage]: http://contributor-covenant.org
74
+ [version]: http://contributor-covenant.org/version/1/4/
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in page_piling_rails.gemspec
4
+ gemspec
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2016 TODO: Write your name
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
@@ -0,0 +1,88 @@
1
+ # PagePilingRails
2
+
3
+ - [Live demo](http://alvarotrigo.com/pagePiling/)
4
+ - [Page Piling JS](https://github.com/alvarotrigo/pagePiling.js/)
5
+
6
+ ## Installation
7
+
8
+ Add this line to your application's Gemfile:
9
+
10
+ ```ruby
11
+ gem 'page_piling_rails'
12
+ ```
13
+
14
+ And then execute:
15
+
16
+ $ bundle
17
+
18
+ And then execute:
19
+
20
+ $ bundle exec rails generate page_piling_rails:install
21
+
22
+ If rake task fails to require the js,
23
+ Add this line to your applications's `app/assets/javascripts/application.js`
24
+
25
+ ```
26
+ //= require jquery.pagepiling.min.js
27
+ ```
28
+
29
+ and also add this line to your applications's `app/assets/stylesheets/application.css`
30
+
31
+ ```
32
+ *= require jquery.pagepiling.css
33
+ ```
34
+
35
+ Or install it yourself as:
36
+
37
+ $ gem install page_piling_rails
38
+
39
+ ## Required HTML structure
40
+
41
+ Each section will be defined with a `div` containing the `section` class.
42
+ The active section by default will be the first section, which is taken as the home page.
43
+
44
+ ```html
45
+ <div id="pagepiling">
46
+ <div class="section">Some section</div>
47
+ <div class="section">Some section</div>
48
+ <div class="section">Some section</div>
49
+ <div class="section">Some section</div>
50
+ </div>
51
+ ```
52
+
53
+ ## Initialization
54
+ All you need to do is call the plugin inside a `$(document).ready` function:
55
+
56
+
57
+ ```javascript
58
+ $(document).ready(function() {
59
+ $('#pagepiling').pagepiling();
60
+ });
61
+ ```
62
+
63
+ ## Example:
64
+
65
+ ```javascript
66
+ $('#pagepiling').pagepiling({
67
+ sectionsColor: ['#f2f2f2', '#4BBFC3', '#7BAABE', 'whitesmoke', '#000'],
68
+ });
69
+ ```
70
+
71
+ ## Options
72
+ For more options checkout - [Page Piling JS](https://github.com/alvarotrigo/pagePiling.js/)
73
+
74
+ ## Development
75
+
76
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
77
+
78
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
79
+
80
+ ## Contributing
81
+
82
+ Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/page_piling_rails. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
83
+
84
+
85
+ ## License
86
+
87
+ The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
88
+
@@ -0,0 +1,6 @@
1
+ require "bundler/gem_tasks"
2
+ require "rspec/core/rake_task"
3
+
4
+ RSpec::Core::RakeTask.new(:spec)
5
+
6
+ task :default => :spec
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "bundler/setup"
4
+ require "page_piling_rails"
5
+
6
+ # You can add fixtures and/or initialization code here to make experimenting
7
+ # with your gem easier. You can also use a different console, if you like.
8
+
9
+ # (If you use this, don't forget to add pry to your Gemfile!)
10
+ # require "pry"
11
+ # Pry.start
12
+
13
+ require "irb"
14
+ IRB.start
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here
@@ -0,0 +1,36 @@
1
+ module PagePilingRails
2
+ module Generators
3
+ class InstallGenerator < Rails::Generators::Base
4
+ def add_javascripts
5
+ file_path = 'app/assets/javascripts/application.js'
6
+ if File.exists?(file_path)
7
+ append_file file_path, "//= require jquery.pagepiling.min.js\n"
8
+ end
9
+ end
10
+
11
+ def add_stylesheets
12
+ file_path = 'app/assets/stylesheets/application.css'
13
+ if File.exists?(file_path)
14
+ inject_into_file file_path, "*= require jquery.pagepiling.css\n", before: /\*\//, verbose: true
15
+ end
16
+ end
17
+
18
+ def whats_next
19
+ puts <<-EOF.strip_heredoc
20
+ \n
21
+ #################################################################\n
22
+ We've set up the basics of page piling for you, but you'll still
23
+ need to check:
24
+ 1. app/assets/javascripts/application.js has '//= require jquery.pagepiling.min.js', and
25
+ 2. app/assets/stylesheets/application.css has '*= require jquery.pagepiling.css'\n
26
+ See the README.md for this gem at
27
+ https://github.com/abhaynikam/page_piling_rails/blob/master/README.md
28
+ for more info.
29
+ Thanks for using page_piling_rails!\n
30
+ #################################################################
31
+ EOF
32
+ end
33
+ end
34
+ end
35
+ end
36
+
@@ -0,0 +1,6 @@
1
+ require "page_piling_rails/version"
2
+
3
+ module PagePilingRails
4
+ class Engine < ::Rails::Engine
5
+ end
6
+ end
@@ -0,0 +1,3 @@
1
+ module PagePilingRails
2
+ VERSION = "0.1.0"
3
+ end
@@ -0,0 +1,36 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'page_piling_rails/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "page_piling_rails"
8
+ spec.version = PagePilingRails::VERSION
9
+ spec.authors = ["Abhay Nikam"]
10
+ spec.email = ["nikam.abhay1@gmail.com"]
11
+
12
+ spec.summary = %q{Create a scrolling pile of sections}
13
+ spec.description = %q{Create beautiful fullscreen scrolling website}
14
+ spec.homepage = "https://github.com/abhaynikam/page_piling_rails"
15
+ spec.license = "MIT"
16
+
17
+ # Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
18
+ # to allow pushing to a single host or delete this section to allow pushing to any host.
19
+ # if spec.respond_to?(:metadata)
20
+ # spec.metadata['allowed_push_host'] = "TODO: Set to 'http://mygemserver.com'"
21
+ # else
22
+ # raise "RubyGems 2.0 or newer is required to protect against " \
23
+ # "public gem pushes."
24
+ # end
25
+
26
+ spec.files = `git ls-files -z`.split("\x0").reject do |f|
27
+ f.match(%r{^(test|spec|features)/})
28
+ end
29
+ spec.bindir = "exe"
30
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
31
+ spec.require_paths = ["lib"]
32
+
33
+ spec.add_development_dependency "bundler", "~> 1.13"
34
+ spec.add_development_dependency "rake", "~> 10.0"
35
+ spec.add_development_dependency "rspec", "~> 3.0"
36
+ end
@@ -0,0 +1,10 @@
1
+ /*!
2
+ * pagepiling.js 1.5.3
3
+ *
4
+ * https://github.com/alvarotrigo/pagePiling.js
5
+ * @license MIT licensed
6
+ *
7
+ * Copyright (C) 2016 alvarotrigo.com - A project by Alvaro Trigo
8
+ */
9
+ !function(n,e,t,o){"use strict";n.fn.pagepiling=function(i){function a(n){n.addClass("pp-table").wrapInner('<div class="pp-tableCell" style="height:100%" />')}function s(e){var t=n(".pp-section.active").index(".pp-section"),o=e.index(".pp-section");return t>o?"up":"down"}function c(e,t){var o={destination:e,animated:t,activeSection:n(".pp-section.active"),anchorLink:e.data("anchor"),sectionIndex:e.index(".pp-section"),toMove:e,yMovement:s(e),leavingSection:n(".pp-section.active").index(".pp-section")+1};if(!o.activeSection.is(e)){"undefined"==typeof o.animated&&(o.animated=!0),"undefined"!=typeof o.anchorLink&&v(o.anchorLink,o.sectionIndex),o.destination.addClass("active").siblings().removeClass("active"),o.sectionsToMove=p(o),"down"===o.yMovement?(o.translate3d=U(),o.scrolling="-100%",G.css3||o.sectionsToMove.each(function(e){e!=o.activeSection.index(".pp-section")&&n(this).css(u(o.scrolling))}),o.animateSection=o.activeSection):(o.translate3d="translate3d(0px, 0px, 0px)",o.scrolling="0",o.animateSection=e),n.isFunction(G.onLeave)&&G.onLeave.call(this,o.leavingSection,o.sectionIndex+1,o.yMovement),r(o),A(o.anchorLink),z(o.anchorLink,o.sectionIndex),W=o.anchorLink;var i=(new Date).getTime();F=i}}function r(e){G.css3?(w(e.animateSection,e.translate3d,e.animated),e.sectionsToMove.each(function(){w(n(this),e.translate3d,e.animated)}),setTimeout(function(){l(e)},G.scrollingSpeed)):(e.scrollOptions=u(e.scrolling),e.animated?e.animateSection.animate(e.scrollOptions,G.scrollingSpeed,G.easing,function(){d(e),l(e)}):(e.animateSection.css(u(e.scrolling)),setTimeout(function(){d(e),l(e)},400)))}function l(e){n.isFunction(G.afterLoad)&&G.afterLoad.call(this,e.anchorLink,e.sectionIndex+1)}function p(e){var t;return t="down"===e.yMovement?n(".pp-section").map(function(t){if(t<e.destination.index(".pp-section"))return n(this)}):n(".pp-section").map(function(t){if(t>e.destination.index(".pp-section"))return n(this)})}function d(e){"up"===e.yMovement&&e.sectionsToMove.each(function(t){n(this).css(u(e.scrolling))})}function u(n){return"vertical"===G.direction?{top:n}:{left:n}}function v(n,e){G.anchors.length?(location.hash=n,f(location.hash)):f(String(e))}function f(e){e=e.replace("#",""),n("body")[0].className=n("body")[0].className.replace(/\b\s?pp-viewing-[^\s]+\b/g,""),n("body").addClass("pp-viewing-"+e)}function h(){var o=t.location.hash.replace("#",""),i=o,a=n(e).find('.pp-section[data-anchor="'+i+'"]');a.length>0&&c(a,G.animateAnchor)}function m(){var n=(new Date).getTime();return n-F<V+G.scrollingSpeed}function g(){var o=t.location.hash.replace("#","").split("/"),i=o[0];if(i.length&&i&&i!==W){var a;a=isNaN(i)?n(e).find('[data-anchor="'+i+'"]'):n(".pp-section").eq(i-1),c(a)}}function S(n){return{"-webkit-transform":n,"-moz-transform":n,"-ms-transform":n,transform:n}}function w(n,e,t){n.toggleClass("pp-easing",t),n.css(S(e))}function y(e){if(!m()){e=t.event||e;var o=Math.max(-1,Math.min(1,e.wheelDelta||-e.deltaY||-e.detail)),i=n(".pp-section.active"),a=T(i);return o<0?x("down",a):x("up",a),!1}}function x(n,e){var t,o;if("down"==n?(t="bottom",o=X.moveSectionDown):(t="top",o=X.moveSectionUp),e.length>0){if(!b(t,e))return!0;o()}else o()}function b(n,e){return"top"===n?!e.scrollTop():"bottom"===n?e.scrollTop()+1+e.innerHeight()>=e[0].scrollHeight:void 0}function T(n){return n.filter(".pp-scrollable")}function C(){B.get(0).addEventListener?(B.get(0).removeEventListener("mousewheel",y,!1),B.get(0).removeEventListener("wheel",y,!1)):B.get(0).detachEvent("onmousewheel",y)}function M(){B.get(0).addEventListener?(B.get(0).addEventListener("mousewheel",y,!1),B.get(0).addEventListener("wheel",y,!1)):B.get(0).attachEvent("onmousewheel",y)}function k(){if(Q){var n=L();B.off("touchstart "+n.down).on("touchstart "+n.down,P),B.off("touchmove "+n.move).on("touchmove "+n.move,N)}}function E(){if(Q){var n=L();B.off("touchstart "+n.down),B.off("touchmove "+n.move)}}function L(){var n;return n=t.PointerEvent?{down:"pointerdown",move:"pointermove",up:"pointerup"}:{down:"MSPointerDown",move:"MSPointerMove",up:"MSPointerUp"}}function D(n){var e=new Array;return e.y="undefined"!=typeof n.pageY&&(n.pageY||n.pageX)?n.pageY:n.touches[0].pageY,e.x="undefined"!=typeof n.pageX&&(n.pageY||n.pageX)?n.pageX:n.touches[0].pageX,e}function I(n){return"undefined"==typeof n.pointerType||"mouse"!=n.pointerType}function P(n){var e=n.originalEvent;if(I(e)){var t=D(e);R=t.y,j=t.x}}function N(e){var t=e.originalEvent;if(!Y(e.target)&&I(t)){var o=n(".pp-section.active"),i=T(o);if(i.length||e.preventDefault(),!m()){var a=D(t);H=a.y,K=a.x,"horizontal"===G.direction&&Math.abs(j-K)>Math.abs(R-H)?Math.abs(j-K)>B.width()/100*G.touchSensitivity&&(j>K?x("down",i):K>j&&x("up",i)):Math.abs(R-H)>B.height()/100*G.touchSensitivity&&(R>H?x("down",i):H>R&&x("up",i))}}}function Y(e,t){t=t||0;var o=n(e).parent();return!!(t<G.normalScrollElementTouchThreshold&&o.is(G.normalScrollElements))||t!=G.normalScrollElementTouchThreshold&&Y(o,++t)}function q(){n("body").append('<div id="pp-nav"><ul></ul></div>');var e=n("#pp-nav");e.css("color",G.navigation.textColor),e.addClass(G.navigation.position);for(var t=0;t<n(".pp-section").length;t++){var o="";if(G.anchors.length&&(o=G.anchors[t]),"undefined"!==G.navigation.tooltips){var i=G.navigation.tooltips[t];"undefined"==typeof i&&(i="")}e.find("ul").append('<li data-tooltip="'+i+'"><a href="#'+o+'"><span></span></a></li>')}e.find("span").css("border-color",G.navigation.bulletsColor)}function z(e,t){G.navigation&&(n("#pp-nav").find(".active").removeClass("active"),e?n("#pp-nav").find('a[href="#'+e+'"]').addClass("active"):n("#pp-nav").find("li").eq(t).find("a").addClass("active"))}function A(e){G.menu&&(n(G.menu).find(".active").removeClass("active"),n(G.menu).find('[data-menuanchor="'+e+'"]').addClass("active"))}function O(){var n,i=e.createElement("p"),a={webkitTransform:"-webkit-transform",OTransform:"-o-transform",msTransform:"-ms-transform",MozTransform:"-moz-transform",transform:"transform"};e.body.insertBefore(i,null);for(var s in a)i.style[s]!==o&&(i.style[s]="translate3d(1px,1px,1px)",n=t.getComputedStyle(i).getPropertyValue(a[s]));return e.body.removeChild(i),n!==o&&n.length>0&&"none"!==n}function U(){return"vertical"!==G.direction?"translate3d(-100%, 0px, 0px)":"translate3d(0px, -100%, 0px)"}var W,X=n.fn.pagepiling,B=n(this),F=0,Q="ontouchstart"in t||navigator.msMaxTouchPoints>0||navigator.maxTouchPoints,R=0,j=0,H=0,K=0,V=600,G=n.extend(!0,{direction:"vertical",menu:null,verticalCentered:!0,sectionsColor:[],anchors:[],scrollingSpeed:700,easing:"easeInQuart",loopBottom:!1,loopTop:!1,css3:!0,navigation:{textColor:"#000",bulletsColor:"#000",position:"right",tooltips:[]},normalScrollElements:null,normalScrollElementTouchThreshold:5,touchSensitivity:5,keyboardScrolling:!0,sectionSelector:".section",animateAnchor:!1,afterLoad:null,onLeave:null,afterRender:null},i);n.extend(n.easing,{easeInQuart:function(n,e,t,o,i){return o*(e/=i)*e*e*e+t}}),X.setScrollingSpeed=function(n){G.scrollingSpeed=n},X.setMouseWheelScrolling=function(n){n?M():C()},X.setAllowScrolling=function(n){n?(X.setMouseWheelScrolling(!0),k()):(X.setMouseWheelScrolling(!1),E())},X.setKeyboardScrolling=function(n){G.keyboardScrolling=n},X.moveSectionUp=function(){var e=n(".pp-section.active").prev(".pp-section");!e.length&&G.loopTop&&(e=n(".pp-section").last()),e.length&&c(e)},X.moveSectionDown=function(){var e=n(".pp-section.active").next(".pp-section");!e.length&&G.loopBottom&&(e=n(".pp-section").first()),e.length&&c(e)},X.moveTo=function(t){var o="";o=isNaN(t)?n(e).find('[data-anchor="'+t+'"]'):n(".pp-section").eq(t-1),o.length>0&&c(o)},n(G.sectionSelector).each(function(){n(this).addClass("pp-section")}),G.css3&&(G.css3=O()),n(B).css({overflow:"hidden","-ms-touch-action":"none","touch-action":"none"}),X.setAllowScrolling(!0),n.isEmptyObject(G.navigation)||q();var J=n(".pp-section").length;n(".pp-section").each(function(e){n(this).data("data-index",e),n(this).css("z-index",J),e||0!==n(".pp-section.active").length||n(this).addClass("active"),"undefined"!=typeof G.anchors[e]&&n(this).attr("data-anchor",G.anchors[e]),"undefined"!=typeof G.sectionsColor[e]&&n(this).css("background-color",G.sectionsColor[e]),G.verticalCentered&&!n(this).hasClass("pp-scrollable")&&a(n(this)),J-=1}).promise().done(function(){G.navigation&&(n("#pp-nav").css("margin-top","-"+n("#pp-nav").height()/2+"px"),n("#pp-nav").find("li").eq(n(".pp-section.active").index(".pp-section")).find("a").addClass("active")),n(t).on("load",function(){h()}),n.isFunction(G.afterRender)&&G.afterRender.call(this)}),n(t).on("hashchange",g),n(e).keydown(function(e){if(G.keyboardScrolling&&!m())switch(e.which){case 38:case 33:X.moveSectionUp();break;case 40:case 34:X.moveSectionDown();break;case 36:X.moveTo(1);break;case 35:X.moveTo(n(".pp-section").length);break;case 37:X.moveSectionUp();break;case 39:X.moveSectionDown();break;default:return}}),G.normalScrollElements&&(n(e).on("mouseenter",G.normalScrollElements,function(){X.setMouseWheelScrolling(!1)}),n(e).on("mouseleave",G.normalScrollElements,function(){X.setMouseWheelScrolling(!0)})),n(e).on("click touchstart","#pp-nav a",function(e){e.preventDefault();var t=n(this).parent().index();c(n(".pp-section").eq(t))}),n(e).on({mouseenter:function(){var e=n(this).data("tooltip");n('<div class="pp-tooltip '+G.navigation.position+'">'+e+"</div>").hide().appendTo(n(this)).fadeIn(200)},mouseleave:function(){n(this).find(".pp-tooltip").fadeOut(200,function(){n(this).remove()})}},"#pp-nav li")}}(jQuery,document,window);
10
+ //# sourceMappingURL=jquery.pagepiling.min.js.map
@@ -0,0 +1,128 @@
1
+ /*!
2
+ * pagepiling.js 1.5.3
3
+ *
4
+ * https://github.com/alvarotrigo/pagePiling.js
5
+ * @license MIT licensed
6
+ *
7
+ * Copyright (C) 2016 alvarotrigo.com - A project by Alvaro Trigo
8
+ */
9
+ html, body {
10
+ overflow:hidden;
11
+ margin:0;
12
+ padding:0;
13
+
14
+ /*Avoid flicker on slides transitions for mobile phones #336 */
15
+ -webkit-tap-highlight-color: rgba(0,0,0,0);
16
+ }
17
+ .pp-section {
18
+ height:100%;
19
+ position:absolute;
20
+ width:100%;
21
+ }
22
+ .pp-easing {
23
+ -webkit-transition: all 1000ms cubic-bezier(0.550, 0.085, 0.000, 0.990);
24
+ -moz-transition: all 1000ms cubic-bezier(0.550, 0.085, 0.000, 0.990);
25
+ -o-transition: all 1000ms cubic-bezier(0.550, 0.085, 0.000, 0.990);
26
+ transition: all 1000ms cubic-bezier(0.550, 0.085, 0.000, 0.990);
27
+ /* custom */
28
+ -webkit-transition-timing-function: cubic-bezier(0.550, 0.085, 0.000, 0.990);
29
+ -moz-transition-timing-function: cubic-bezier(0.550, 0.085, 0.000, 0.990);
30
+ -o-transition-timing-function: cubic-bezier(0.550, 0.085, 0.000, 0.990);
31
+ transition-timing-function: cubic-bezier(0.550, 0.085, 0.000, 0.990);
32
+ /* custom */
33
+ }
34
+ #pp-nav {
35
+ position: fixed;
36
+ z-index: 100;
37
+ margin-top: -32px;
38
+ top: 50%;
39
+ opacity: 1;
40
+ }
41
+ #pp-nav.right {
42
+ right: 17px;
43
+ }
44
+ #pp-nav.left {
45
+ left: 17px;
46
+ }
47
+ .pp-section.pp-table{
48
+ display: table;
49
+ }
50
+ .pp-tableCell {
51
+ display: table-cell;
52
+ vertical-align: middle;
53
+ width: 100%;
54
+ height: 100%;
55
+ }
56
+ .pp-slidesNav{
57
+ position: absolute;
58
+ z-index: 4;
59
+ left: 50%;
60
+ opacity: 1;
61
+ }
62
+ .pp-slidesNav.bottom {
63
+ bottom: 17px;
64
+ }
65
+ .pp-slidesNav.top {
66
+ top: 17px;
67
+ }
68
+ #pp-nav ul,
69
+ .pp-slidesNav ul {
70
+ margin: 0;
71
+ padding: 0;
72
+ }
73
+ #pp-nav li,
74
+ .pp-slidesNav li {
75
+ display: block;
76
+ width: 14px;
77
+ height: 13px;
78
+ margin: 7px;
79
+ position:relative;
80
+ }
81
+ .pp-slidesNav li {
82
+ display: inline-block;
83
+ }
84
+ #pp-nav li a,
85
+ .pp-slidesNav li a {
86
+ display: block;
87
+ position: relative;
88
+ z-index: 1;
89
+ width: 100%;
90
+ height: 100%;
91
+ cursor: pointer;
92
+ text-decoration: none;
93
+ }
94
+ #pp-nav li .active span,
95
+ .pp-slidesNav .active span {
96
+ background: #333;
97
+ }
98
+ #pp-nav span,
99
+ .pp-slidesNav span {
100
+ top: 2px;
101
+ left: 2px;
102
+ width: 8px;
103
+ height: 8px;
104
+ border: 1px solid #000;
105
+ background: rgba(0, 0, 0, 0);
106
+ border-radius: 50%;
107
+ position: absolute;
108
+ z-index: 1;
109
+ }
110
+ .pp-tooltip {
111
+ position: absolute;
112
+ top: -2px;
113
+ color: #fff;
114
+ font-size: 14px;
115
+ font-family: arial, helvetica, sans-serif;
116
+ white-space: nowrap;
117
+ max-width: 220px;
118
+ }
119
+ .pp-tooltip.right {
120
+ right: 20px;
121
+ }
122
+ .pp-tooltip.left {
123
+ left: 20px;
124
+ }
125
+ .pp-scrollable{
126
+ overflow-y: scroll;
127
+ height: 100%;
128
+ }
metadata ADDED
@@ -0,0 +1,102 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: page_piling_rails
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Abhay Nikam
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2016-12-25 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.13'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.13'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '10.0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '10.0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rspec
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '3.0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '3.0'
55
+ description: Create beautiful fullscreen scrolling website
56
+ email:
57
+ - nikam.abhay1@gmail.com
58
+ executables: []
59
+ extensions: []
60
+ extra_rdoc_files: []
61
+ files:
62
+ - ".gitignore"
63
+ - ".rspec"
64
+ - ".travis.yml"
65
+ - CODE_OF_CONDUCT.md
66
+ - Gemfile
67
+ - LICENSE.txt
68
+ - README.md
69
+ - Rakefile
70
+ - bin/console
71
+ - bin/setup
72
+ - lib/generators/page_piling_rails/install/install_generator.rb
73
+ - lib/page_piling_rails.rb
74
+ - lib/page_piling_rails/version.rb
75
+ - page_piling_rails.gemspec
76
+ - vendor/assets/javascripts/jquery.pagepiling.min.js
77
+ - vendor/assets/stylesheets/jquery.pagepiling.css
78
+ homepage: https://github.com/abhaynikam/page_piling_rails
79
+ licenses:
80
+ - MIT
81
+ metadata: {}
82
+ post_install_message:
83
+ rdoc_options: []
84
+ require_paths:
85
+ - lib
86
+ required_ruby_version: !ruby/object:Gem::Requirement
87
+ requirements:
88
+ - - ">="
89
+ - !ruby/object:Gem::Version
90
+ version: '0'
91
+ required_rubygems_version: !ruby/object:Gem::Requirement
92
+ requirements:
93
+ - - ">="
94
+ - !ruby/object:Gem::Version
95
+ version: '0'
96
+ requirements: []
97
+ rubyforge_project:
98
+ rubygems_version: 2.5.1
99
+ signing_key:
100
+ specification_version: 4
101
+ summary: Create a scrolling pile of sections
102
+ test_files: []