1
0
mirror of https://github.com/webslides/WebSlides.git synced 2025-08-16 18:14:09 +02:00

Final touches

This commit is contained in:
Antonio Laguna
2017-02-23 10:20:56 +01:00
parent 2c21b8f5d9
commit 25be14fbd4
9 changed files with 69 additions and 29 deletions

45
CHANGELOG.md Normal file
View File

@@ -0,0 +1,45 @@
# 1.0.0 (2017-02-23)
This release is a special one since it sets up in the path of a better development environment. Although it's far from
perfect, it's a solid beginning.
All the code has been migrated from jQuery with ES5 to vanilla JavaScript with ES2015 (or ES6) and is fully modular.
This means that WebSlides is a (base module)[src/js/modules/webslides.js] with a solid API (few public methods) and
it's extended by (plugins)[src/js/plugins]. This leads to more granularity and less code to dive through while fixing a
bug.
The benefit from this approach is that now it's really easy to extend WebSlides to achieve what you need. You can also
overwrite current plugins. Say you don't like the current navigation with arrows and want to create a menu instead, you
can just write that for yourself with your custom needs and register it as `nav` and it will overwrite our nav with
your code.
We hope this leads to a better environment in which WebSlides can grow better.
All the technical specs live now in [this document](docs/technical.md).
## Bugfixes
- Fixed a bug with back/next buttons on the browser which lead the nav bar to not work.
## New Features
- Linking to slides without window open.
- Added custom events to listen for. `ws:init` whenever webslides is ready and `ws:slide-change` whenever a slide changes.
- Added play/stop methods.
## Breaking Changes
- This "stable" release drops the jQuery requirement and leans on ES2015 for the architecture. Hence, it's no longer possible
to use the library as before.
# 0.2.0 (2017-02-22)
## New Features
- Adding autoslide option.
# 0.1.1 (2017-02-11)
- Transform the library into an object.
- `.tabs` removed.
- `webslides-lite.js` removed.

View File

@@ -3,7 +3,9 @@
[![MIT License](https://img.shields.io/badge/license-MIT-blue.svg)](http://opensource.org/licenses/MIT)
[![Twitter](https://img.shields.io/twitter/url/https/github.com/jlantunez/webslides.svg?style=social)](https://twitter.com/webslides)
Finally, everything you need to make HTML presentations in a beautiful way. Just the essentials. You can create your own presentation instantly. Simply choose a demo and customize it in minutes — [https://webslides.tv/demos](https://webslides.tv/demos)
Finally, everything you need to make HTML presentations in a beautiful way. Just the essentials. You can create your own presentation instantly. Simply choose a demo and customize it in minutes — https://webslides.tv/demos.
A new release (at least) every 8th day of the month.
### Why WebSlides?
Good karma and productivity. Just a basic knowledge of HTML and CSS is required. Designers, marketers, and journalists can now focus on the content.

View File

@@ -115,15 +115,15 @@ Almost every single feature of WebSlides is a plugin that can be overwritten and
```
// Adding the constructor to WebSlides
WebSlides.registerPlugin('MyPlugin', MyPlugin);
WebSlides.registerPlugin('myPlugin', MyPlugin);
// Starting WebSlides
// Your plugin will be constructed at this time and it will receive the webslides instance as the only parameter.
const ws = new WebSlides();
// You can also access ws.plugins.MyPlugin now
// You can also access ws.plugins.myPlugin now
```
This allows you to rewrite the navigation to use a menu (for example) or add that missing piece of functionality you'd like to see.
This allows you to rewrite the navigation to use a menu (for example) or add that missing piece of functionality you'd like to see. See [this part of the code](../src/js/modules/webslides.js#L11) to see all the plugins we're using and the name they're using.
Make sure to let us know so it could get added to the repo!

View File

@@ -23,7 +23,7 @@
"babel-core": "^6.23.1",
"babel-loader": "^6.3.2",
"babel-preset-es2015": "^6.22.0",
"npm-run-all": "^4.0.1",
"npm-run-all": "^4.0.2",
"rimraf": "^2.6.0",
"webpack": "^2.2.1",
"webpack-dev-server": "^2.4.1"

View File

@@ -1,10 +0,0 @@
import WebSlides from './modules/webslides';
import Scroll from './plugins/scroll';
import Touch from './plugins/touch';
import Grid from './plugins/grid';
WebSlides.registerPlugin('Scroll', Scroll);
WebSlides.registerPlugin('Touch', Touch);
WebSlides.registerPlugin('Grid', Grid);
window.WebSlides = WebSlides;

View File

@@ -1,8 +1,3 @@
import WebSlides from './modules/webslides';
import Scroll from './plugins/scroll';
import Touch from './plugins/touch';
WebSlides.registerPlugin('Scroll', Scroll);
WebSlides.registerPlugin('Touch', Touch);
window.WebSlides = WebSlides;

View File

@@ -9,9 +9,12 @@ const CLASSES = {
// Default plugins
const PLUGINS = {
'nav': Plugins.Navigation,
'grid': Plugins.Grid,
'hash': Plugins.Hash,
'keyboard': Plugins.Keyboard
'keyboard': Plugins.Keyboard,
'nav': Plugins.Navigation,
'scroll': Plugins.Scroll,
'touch': Plugins.touch
};
export default class WebSlides {
@@ -166,7 +169,7 @@ export default class WebSlides {
const nextSlide = this.slides[slideI];
if (this.currentSlide_ !== null && this.isVertical &&
(!this.plugins.Touch || !this.plugins.Touch.isEnabled)) {
(!this.plugins.touch || !this.plugins.touch.isEnabled)) {
this.scrollTransitionToSlide_(
isMovingForward, nextSlide, this.onSlideChange_);
} else {

View File

@@ -1,9 +1,15 @@
import Navigation from './navigation';
import Grid from './grid';
import Hash from './hash';
import Keyboard from './keyboard';
import Navigation from './navigation';
import Scroll from './scroll';
import Touch from './touch';
export default {
Navigation,
Grid,
Hash,
Keyboard
Keyboard,
Navigation,
Scroll,
Touch
};

View File

@@ -5,13 +5,12 @@ const src = path.join(__dirname, 'src');
module.exports = {
context: src,
entry: {
webslides: './js/full.js',
'webslides-dev': './js/dev.js',
webslides: './js/full.js'
},
output: {
filename: '[name].js',
path: path.join(__dirname, 'static/js'),
publicPath: '/static/js/',
publicPath: '/static/js/'
},
devServer: {
contentBase: __dirname,