Merge with upstream

This commit is contained in:
Slava Oliyanchik 2013-03-24 18:59:46 +04:00
commit 4c25374328
8 changed files with 83 additions and 49 deletions

5
.gitmodules vendored
View File

@ -1,3 +1,6 @@
[submodule "themes/ribbon"] [submodule "themes/ribbon"]
path = themes/ribbon path = themes/ribbon
url = git@github.com:shower/ribbon.git url = git://github.com/shower/ribbon.git
[submodule "themes/bright"]
path = themes/bright
url = git://github.com/shower/bright.git

21
License.md Normal file
View File

@ -0,0 +1,21 @@
# The MIT License
Copyright © 20102013 Vadim Makeev, http://pepelsbey.net/
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
---
# Лицензия MIT
Copyright © 20102013 Вадим Макеев, http://pepelsbey.net/
Данная лицензия разрешает лицам, получившим копию данного программного обеспечения и сопутствующей документации (в дальнейшем именуемыми «Программное Обеспечение»), безвозмездно использовать Программное Обеспечение без ограничений, включая неограниченное право на использование, копирование, изменение, добавление, публикацию, распространение, сублицензирование и/или продажу копий Программного Обеспечения, также как и лицам, которым предоставляется данное Программное Обеспечение, при соблюдении следующих условий:
Указанное выше уведомление об авторском праве и данные условия должны быть включены во все копии или значимые части данного Программного Обеспечения.
ДАННОЕ ПРОГРАММНОЕ ОБЕСПЕЧЕНИЕ ПРЕДОСТАВЛЯЕТСЯ «КАК ЕСТЬ», БЕЗ КАКИХ-ЛИБО ГАРАНТИЙ, ЯВНО ВЫРАЖЕННЫХ ИЛИ ПОДРАЗУМЕВАЕМЫХ, ВКЛЮЧАЯ, НО НЕ ОГРАНИЧИВАЯСЬ ГАРАНТИЯМИ ТОВАРНОЙ ПРИГОДНОСТИ, СООТВЕТСТВИЯ ПО ЕГО КОНКРЕТНОМУ НАЗНАЧЕНИЮ И ОТСУТСТВИЯ НАРУШЕНИЙ ПРАВ. НИ В КАКОМ СЛУЧАЕ АВТОРЫ ИЛИ ПРАВООБЛАДАТЕЛИ НЕ НЕСУТ ОТВЕТСТВЕННОСТИ ПО ИСКАМ О ВОЗМЕЩЕНИИ УЩЕРБА, УБЫТКОВ ИЛИ ДРУГИХ ТРЕБОВАНИЙ ПО ДЕЙСТВУЮЩИМ КОНТРАКТАМ, ДЕЛИКТАМ ИЛИ ИНОМУ, ВОЗНИКШИМ ИЗ, ИМЕЮЩИМ ПРИЧИНОЙ ИЛИ СВЯЗАННЫМ С ПРОГРАММНЫМ ОБЕСПЕЧЕНИЕМ ИЛИ ИСПОЛЬЗОВАНИЕМ ПРОГРАММНОГО ОБЕСПЕЧЕНИЯ ИЛИ ИНЫМИ ДЕЙСТВИЯМИ С ПРОГРАММНЫМ ОБЕСПЕЧЕНИЕМ.

View File

@ -1,9 +0,0 @@
The MIT License
Copyright © 20102013 Vadim Makeev, http://pepelsbey.net/
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

View File

@ -9,17 +9,16 @@ To see Shower in action:
- Use arrow keys to navigate - Use arrow keys to navigate
- Press `Esc` to exit presentation mode - Press `Esc` to exit presentation mode
See more details on [using keyboard](shower/wiki/Shortcuts) to control Shower. See more details on [using keyboard](https://github.com/shower/shower/wiki/Shortcuts) to control Shower.
## Using Shower ## Using Shower
There are two ways of using Shower: you can get full template [ZIP 1.4 MB](http://shwr.me/template.zip) or just an engine [ZIP 650 KB](http://shwr.me/shower.zip). See more details for beginners and advanced techniques in [Quick Start](shower/wiki/Quick-Start) instructions. There are two ways of using Shower: you can get full template [ZIP 1.7 MB](http://shwr.me/template.zip) or just an engine [ZIP 915 KB](http://shwr.me/shower.zip). See more details for beginners and advanced techniques in [Quick Start](https://github.com/shower/shower/wiki/Quick-Start) instructions.
## Printing to PDF ## Printing to PDF
You can print your presentation to PDF using Google Chrome “Print to PDF” option in print dialog, [wkhtmltopdf](http://code.google.com/p/wkhtmltopdf) or [Prince](http://princexml.com). Print styles should be supplied to a theme for proper results. Please see [print styles](https://github.com/shower/ribbon/blob/master/styles/print.scss) for the Ribbon theme as example. You can print your presentation to PDF using Google Chrome “Print to PDF” option in print dialog or [wkhtmltopdf](http://code.google.com/p/wkhtmltopdf) or [Prince](http://princexml.com).
Example of Shower template printed by Prince: [PDF 435 KB](https://github.com/shower/template/blob/master/index.pdf?raw=true). See more detais on printing in [documentation](https://github.com/shower/shower/wiki/Print).
Example of Shower template printed by Prince: [PDF 435 KB](https://github.com/shower/template/blob/master/index.pdf?raw=true). See more detais on printing in [documentation](shower/wiki/Print).
## Usage examples ## Usage examples
@ -37,9 +36,9 @@ Supported desktop browsers: Chrome, Internet Explorer, Firefox, Opera, Safari. O
## Contributing ## Contributing
You're always welcome to contibute. Fork project, make changes and send it as pull request. But it's better to file an [issue](http://github.com/shower/shower/issues) with your idea first. Read [contributing rules](https://github.com/shower/shower/blob/master/Contributing.md) for more details. You're always welcome to contibute. Fork project, make changes and send it as pull request. But it's better to file an [issue](https://github.com/shower/shower/issues) with your idea first. Read [contributing rules](https://github.com/shower/shower/blob/master/Contributing.md) for more details.
Main contributors: [pepelsbey](http://github.com/pepelsbey), [jahson](http://github.com/jahson), [miripiruni](http://github.com/miripiruni), [kizu](http://github.com/kizu). Main contributors: [pepelsbey](https://github.com/pepelsbey), [jahson](https://github.com/jahson), [miripiruni](https://github.com/miripiruni), [kizu](https://github.com/kizu).
--- ---
Licensed under [MIT License](http://en.wikipedia.org/wiki/MIT_License), see [license page](shower/wiki/MIT-License) for details. Licensed under [MIT License](http://en.wikipedia.org/wiki/MIT_License), see [license page](https://github.com/shower/shower/wiki/MIT-License) for details.

View File

@ -3,16 +3,14 @@
* @copyright 20102013 Vadim Makeev, pepelsbey.net * @copyright 20102013 Vadim Makeev, pepelsbey.net
* @license MIT license: github.com/shower/shower/wiki/MIT-License * @license MIT license: github.com/shower/shower/wiki/MIT-License
*/ */
window.shower = (function(window, document, undefined) { window.shower = window.shower || (function(window, document, undefined) {
var shower = {}, var shower = {},
url = window.location, url = window.location,
body = document.body, body = document.body,
slides = document.querySelectorAll('.slide'), slides = [],
progress = document.querySelector('div.progress div'), progress = [],
timer, timer,
timing = 0, isHistoryApiSupported = !!(window.history && history.pushState);
isHistoryApiSupported = !!(window.history && history.pushState),
l = slides.length, i;
function Slide(opts) { function Slide(opts) {
@ -161,13 +159,29 @@ window.shower = (function(window, document, undefined) {
return element.dataset ? element.dataset[name] : element.getAttribute('data-' + name); return element.dataset ? element.dataset[name] : element.getAttribute('data-' + name);
}; };
shower.slideList = []; shower.slideList = [];
for (i = 0; i < l; i++) { /**
* Shower initialization
* @param {String} [slideSelector]
* @param {String} [progressSelector]
* @returns {Object} shower
*/
shower.init = function(slideSelector, progressSelector) {
var timing;
slideSelector = slideSelector || '.slide';
progressSelector = progressSelector || 'div.progress div';
slides = document.querySelectorAll(slideSelector);
progress = document.querySelector(progressSelector);
for (var i = 0; i < slides.length; i++) {
// Slide IDs are optional. In case of missing ID we set it to the // Slide IDs are optional. In case of missing ID we set it to the
// slide number // slide number
if ( ! slides[i].id) { if ( ! slides[i].id) {
slides[i].id = 'slide_' + (i + 1); slides[i].id = i + 1;
} }
timing = shower._getData(slides[i], 'timing'); timing = shower._getData(slides[i], 'timing');
@ -192,6 +206,9 @@ window.shower = (function(window, document, undefined) {
})); }));
} }
return shower;
};
/** /**
* Get slide scale value. * Get slide scale value.
* @private * @private
@ -849,6 +866,8 @@ window.shower = (function(window, document, undefined) {
} }
}, false); }, false);
shower.init();
document.addEventListener('click', function(e) { document.addEventListener('click', function(e) {
var slideNumber = shower.getSlideNumber(shower._getSlideIdByEl(e.target)), var slideNumber = shower.getSlideNumber(shower._getSlideIdByEl(e.target)),
slide; slide;

2
shower.min.js vendored

File diff suppressed because one or more lines are too long

1
themes/bright Submodule

@ -0,0 +1 @@
Subproject commit 7846bbef1debed0aa42b4b415e699ebb93e779d7

@ -1 +1 @@
Subproject commit 41e17a628fd092271fded46304e6c009bc0ba1e0 Subproject commit e1a38b6cc6079bfd1f94f6db4b7904fb2276d538