Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Webpack support, fix cross-browser incompatibility, improved documentation and more general styling #3

Merged
merged 7 commits into from
Jul 12, 2016

Conversation

halbgut
Copy link
Contributor

@halbgut halbgut commented Jul 11, 2016

Webpack Support

requires now use file extensions for better Webpack support.

Cross-browser incompatibility

Replace the non standard use of Event.srcElement with Event.target.

Improve documentation

Adds an example of how markup of sides using this extension may look.

Add undeclared dependency to bespoke-classes

bespoke-classes is only added if you use a theme. So the extension actually didn't work when you didn't. This adds bespoke-classes as a dependency and initializes it, if it hasn't been done yet.

More general styling

In earlier versions the slides had to be a specific size. I personally like to make my slides w:100vw; h:100vh. This PR uses a more general approach to the problem using transform. This last change requires a major (or at least a minor) version bump, so sorry for putting this all in one PR.

@@ -36,6 +37,9 @@ module.exports = function (/*options*/) {
return function (deck) {
var update, current, resolvedQuery;

/* If `classes` hasn't been initialized jet, do it now */
if (!deck.parent.classList.contains('parent')) classes()(deck);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't it be 'bespoke-parent' ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Of course it should. Sorry :)

I just read addClass(deck.parent, 'parent') in the source code of bespoke-classes and didn't properly read what addClass actually did.

Fixing it...

@medikoo
Copy link
Owner

medikoo commented Jul 12, 2016

I've tested it with one of my presentations and it works great.

I'm ready to take it, just let's fix this class name.

Thank you!

@medikoo medikoo self-assigned this Jul 12, 2016
@halbgut
Copy link
Contributor Author

halbgut commented Jul 12, 2016

Happy to hear!

I just pushed the fix for the bespoke-parent issue. I also tested it and the condition now works as intended.

@medikoo medikoo merged commit ae6c4f4 into medikoo:master Jul 12, 2016
@medikoo
Copy link
Owner

medikoo commented Jul 12, 2016

@Kriegslustig I assume that after this changes is taken, there's no longer need for slideWidth option, as with current styles notes container will automatically adapt.

Can you confirm you see it same way?

@halbgut
Copy link
Contributor Author

halbgut commented Jul 12, 2016

Oh, yes. Sorry, I didn't read through the whole source. I'll submit another PR.

@medikoo
Copy link
Owner

medikoo commented Jul 12, 2016

@Kriegslustig it's fine, I was just removing it myself, just wanted to confirm with you, that I don't miss anything :)

@halbgut
Copy link
Contributor Author

halbgut commented Jul 12, 2016

Thanks :)

@medikoo
Copy link
Owner

medikoo commented Jul 12, 2016

Published as v2.0.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants