MCPcopy
hub / github.com/alvarotrigo/fullPage.js

github.com/alvarotrigo/fullPage.js @4.0.41 sqlite

repository ↗ · DeepWiki ↗ · release 4.0.41 ↗
388 symbols 1,124 edges 148 files 47 documented · 12%
README

fullPage.js

preview compatibility

English | Español | Français | Pусский | 中文 | 한국어 | 日本語 | Português Brasileiro

Available for <a href="https://github.com/alvarotrigo/vue-fullpage.js">Vue</a>, <a href="https://github.com/alvarotrigo/react-fullpage">React</a> and <a href="https://github.com/alvarotrigo/angular-fullpage">Angular</a>.

fullPage.js version License jsDelivr Hits Minzipped Size   |   Created by @imac2


A simple and easy to use library that creates fullscreen scrolling websites (also known as single page websites or onepage sites) and adds landscape sliders inside the sections of the site.

Introduction

Suggestion are more than welcome, not only for feature requests but also for coding style improvements. Let's make this a great library to make people's lives easier!

Compatibility

fullPage.js is fully functional on all modern browsers and with IE 11. If you need to support IE < 11 consider using fullPage.js v3. It also provides touch support for mobile phones, tablets and touch screen computers.

Special thanks to Browserstack for supporting fullpage.js.

License

Commercial license

If you want to use fullPage to develop non open sourced sites, themes, projects, and applications, the Commercial license is the appropriate license. With this option, your source code is kept proprietary. Which means, you won't have to change your whole application source code to an open source license. [Purchase a Fullpage Commercial License]

Open source license

If you are creating an open source application under a license compatible with the GNU GPL license v3, you may use fullPage under the terms of the GPLv3.

You will have to provide a prominent notice that fullPage.js is in use. The credit comments in the JavaScript and CSS files should be kept intact (even after combination or minification).

Read more about fullPage's license.

Usage

As you can see in the example files, you will need to include: - The JavaScript file fullpage.js (or its minified version fullpage.min.js) - The css file fullpage.css

Optionally, when using css3:false, you can add the easings file in case you want to use other easing effects apart from the one included in the library (easeInOutCubic).

Install using bower or npm

Optionally, you can install fullPage.js with bower or npm if you prefer:

Terminal:

// With bower
bower install fullpage.js

// With npm
npm install fullpage.js

Including files

<link rel="stylesheet" type="text/css" href="https://github.com/alvarotrigo/fullPage.js/raw/4.0.41/fullpage.css" />


<script src="https://github.com/alvarotrigo/fullPage.js/raw/4.0.41/vendors/easings.min.js"></script>

<script type="text/javascript" src="https://github.com/alvarotrigo/fullPage.js/raw/4.0.41/fullpage.js"></script>

Using Webpack, Browserify or Require.js? Check how to use fullPage.js with module loaders.

Optional use of CDN

If you prefer to use a CDN to load the needed files, fullPage.js is in, JSDelivr, UNPKG, CDNJS and others.

Required HTML structure

Start your HTML document with the compulsory HTML DOCTYPE declaration on the 1st line of your HTML code. You might have troubles with sections heights otherwise. The examples provided use HTML 5 doctype <!DOCTYPE html>.

Each section will be defined with an element containing the section class. The active section by default will be the first section, which is taken as the home page.

Sections should be placed inside a wrapper (`

in this case). The wrapper can not be thebody` element.






Some section




Some section




Some section




Some section





If you want to define a different starting point rather than the first section or the first slide of a section, just add the class active to the section and slide you want to load first.



Some section


In order to create a landscape slider within a section, each slide will be defined by default with an element containing the slide class:






 Slide 1 




 Slide 2 




 Slide 3 




 Slide 4 





You can see a fully working example of the HTML structure in the simple.html file.

Initialization

Initialization with Vanilla Javascript

All you need to do is call fullPage.js before the closing </body> tag.

new fullpage('#fullpage', {
    //options here
    autoScrolling:true,
    scrollHorizontally: true
});

Initialization with jQuery

You can use fullpage.js as a jQuery plugin if you want to!

$(document).ready(function() {
    $('#fullpage').fullpage({
        //options here
        autoScrolling:true,
        scrollHorizontally: true
    });

    // Example of how to use fullpage.js methods
    $.fn.fullpage.setAllowScrolling(false);
});

Vanilla JS example with all options

A more complex initialization with all options set could look like this:


var myFullpage = new fullpage('#fullpage', {
    // Navigation
    menu: '#menu',
    lockAnchors: false,
    anchors:['firstPage', 'secondPage'],
    navigation: false,
    navigationPosition: 'right',
    navigationTooltips: ['firstSlide', 'secondSlide'],
    showActiveTooltip: false,
    slidesNavigation: false,
    slidesNavPosition: 'bottom',

    // Scrolling
    css3: true,
    scrollingSpeed: 700,
    autoScrolling: true,
    fitToSection: true,
    fitToSectionDelay: 600,
    scrollBar: false,
    easing: 'easeInOutCubic',
    easingcss3: 'ease',
    loopBottom: false,
    loopTop: false,
    loopHorizontal: true,
    continuousVertical: false,
    continuousHorizontal: false,
    scrollHorizontally: false,
    interlockedSlides: false,
    dragAndMove: false,
    offsetSections: false,
    resetSliders: false,
    fadingEffect: false,
    normalScrollElements: '#element1, .element2',
    scrollOverflow: true,
    scrollOverflowMacStyle: false,
    scrollOverflowReset: false,
    skipIntermediateItems: false,
    touchSensitivity: 15,
    bigSectionsDestination: null,
    adjustOnNavChange: true,

    // Accessibility
    keyboardScrolling: true,
    animateAnchor: true,
    recordHistory: true,

    // Design
    controlArrows: true,
    controlArrowsHTML: [
        '



', 
        '



'
    ],
    verticalCentered: true,
    sectionsColor : ['#ccc', '#fff'],
    paddingTop: '3em',
    paddingBottom: '10px',
    fixedElements: '#header, .footer',
    responsiveWidth: 0,
    responsiveHeight: 0,
    responsiveSlides: false,
    effects: false,
    effectsOptions: [Object],
    cinematic: false,
    cinematicOptions: [Object],
    parallax: false,
    parallaxOptions: {type: 'reveal', percentage: 62, property: 'translate'},
    dropEffect: false,
    dropEffectOptions: { speed: 2300, color: '#F82F4D', zIndex: 9999},
    waterEffect: false,
    waterEffectOptions: { animateContent: true, animateOnMouseMove: true},
    cards: false,
    cardsOptions: {perspective: 100, fadeContent: true, fadeBackground: true},

    // Custom selectors
    sectionSelector: '.section',
    slideSelector: '.slide',

    lazyLoading: true,
    lazyLoadThreshold: 0,
    observer: true,
    credits: { enabled: true, label: 'Made with fullPage.js', position: 'right'},

    // Events
    beforeLeave: function(origin, destination, direction, trigger){},
    onLeave: function(origin, destination, direction, trigger){},
    afterLoad: function(origin, destination, direction, trigger){},
    afterRender: function(){},
    afterResize: function(width, height){},
    afterReBuild: function(){},
    afterResponsive: function(isResponsive){},
    afterSlideLoad: function(section, origin, destination, direction, trigger){},
    onSlideLeave: function(section, origin, destination, direction, trigger){},
    onScrollOverflow: function(section, slide, position, direction){}
});

Creating links to sections or slides

If you are using fullPage.js with anchor links for the sections (using the anchors option or the attribute data-anchor in each section), then you will be able to use anchor links also to navigate directly to a certain slide inside a section.

This would be an example of a link with an anchor: https://alvarotrigo.com/fullPage/#secondPage/2 (which is the URL you will see once you access to that section/slide manually) Notice the last part of the URL ends in #secondPage/2.

Having the following initialization:

new fullpage('#fullpage', {
    anchors:['firstPage', 'secondPage', 'thirdPage']
});

The anchor at the end of the URL #secondPage/2 defines the section and slide of destination respectively. In the previous URL, the section of destination will be the one defined with the anchor secondPage and the slide will be the 2nd slide, as we are using the index 2 for it. (the fist slide of a section has index 0, as technically it is a section).

We could have used a custom anchor for the slide instead of its index if we would have used the attribute data-anchor on the HTML markup like so:

```html

Slide 1

Slide 2

Slide 3

Extension points exported contracts — how you extend this code

fullpageOptions (Interface)
(no doc)
types/index.d.ts
fullpageApi (Interface)
(no doc)
types/index.d.ts
FullPageProps (Interface)
(no doc)
types/index.d.ts
WrapperProps (Interface)
(no doc)
types/index.d.ts

Core symbols most depended-on inside this repo

$
called by 558
src/js/common/utils.js
getOptions
called by 236
src/js/common/options.js
initFullpageNew
called by 217
tests/utils.js
getTransform
called by 92
tests/utils.js
getState
called by 90
src/js/common/state.js
setState
called by 71
src/js/common/state.js
getContainer
called by 43
src/js/common/options.js
moveSectionDown
called by 34
types/index.d.ts

Shape

Function 348
Method 34
Interface 4
Class 2

Languages

TypeScript100%

Modules by API surface

src/js/common/utils.js51 symbols
types/index.d.ts40 symbols
tests/utils.js21 symbols
src/js/keyboard/index.js17 symbols
src/js/resize.js10 symbols
src/js/mouse/wheel.js10 symbols
src/js/touch.js9 symbols
src/js/common/utilsFP.js9 symbols
src/js/common/options.js9 symbols
src/js/stateUpdates.js8 symbols
src/js/media.js8 symbols
src/js/slides/landscapeScroll.js7 symbols

Dependencies from manifests, versioned

@babel/preset-env7.16.11 · 1×
@rollup/plugin-babel5.3.0 · 1×
@rollup/plugin-commonjs21.0.1 · 1×
@rollup/plugin-node-resolve13.0.6 · 1×
@rollup/stream2.0.0 · 1×
babel-cli6.26.0 · 1×
babel-plugin-external-helpers6.22.0 · 1×
babel-preset-latest6.24.1 · 1×
browserify16.2.2 · 1×
fullpage.js4.0.21 · 1×
gulp4.0.0 · 1×
gulp-clean-css4.0.0 · 1×

For agents

$ claude mcp add fullPage.js \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact