Presentation deck using Vue.js "Webpack Simple", GSAP and Hammer.js. Copy or clone this repo to start off a new project.
- [nav-position] Accepts either "right" or "left", default "right"
- [scripts] Custom callback functions for animating or anything else
- [slide-duration] A number in seconds for slide transition duration, default 1
ID attribute is optional, but not required. If ID is used, it will be the name of the slide in the navigation menu.
<slides nav-position='right' :scripts='scripts' :slide-duration='1'>
<section></section>
<section></section>
<section id="is-optional"> Your Content </section>
<section></section>
<section></section>
</slides>
Each <section> cycles through the following CSS classes
- null
- active
- active, complete
- active, complete
- complete
- null
- currentSlide - Reference to current HTML DOM Element
- slideDuration - Slide duration in seconds
slideStart() {
// called immediately before the slide begins to move into view
if (currentSlide.dataset.i === '1') {
// do something with slide number 1
}
// or
if (currentSlide.id === 'some-id') {
// do something with an assiged slide id
}
},
slideEnd() {
// called at the end of the slide transitioning
};
# install dependencies
npm install
# serve with hot reload at localhost:8080
npm run dev
# build for production with minification
npm run build
# build for production and view the bundle analyzer report
npm run build --reportFor a detailed explanation on how things work, check out the guide and docs for vue-loader.