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

User Theme Selection #290

Closed
rgstephens opened this Issue Apr 18, 2016 · 4 comments

Comments

Projects
None yet
2 participants
@rgstephens

I'd like to allow the user to select among the list of bootswatch themes. The examples I've seen involve using jQuery to change the <link .. to reference the associated css file.

Since Kitchen merges the css files, I'm wondering if there is a way to disable this merge to dynamically update the Theme or is there another approach?

@perak

This comment has been minimized.

Show comment
Hide comment
@perak

perak Apr 18, 2016

Owner

Hi @rgstephens good question - I don't know how you can do that - I didn't try to play with it.

Problem is not that meteor-kitchen merges css files: problem is that meteor merges css files.

So, if you add multiple themes into application, each theme will be automatically merged into single css file (and that will guide to nowhere).

Maybe you should just generate application without theme (with naked bootstrap3) and then using external css files from CDN, and as you said, dynamically changing <link ... tag... I don't know, try to play with it and please let me know if you succeed.

👍

Owner

perak commented Apr 18, 2016

Hi @rgstephens good question - I don't know how you can do that - I didn't try to play with it.

Problem is not that meteor-kitchen merges css files: problem is that meteor merges css files.

So, if you add multiple themes into application, each theme will be automatically merged into single css file (and that will guide to nowhere).

Maybe you should just generate application without theme (with naked bootstrap3) and then using external css files from CDN, and as you said, dynamically changing <link ... tag... I don't know, try to play with it and please let me know if you succeed.

👍

@rgstephens

This comment has been minimized.

Show comment
Hide comment
@rgstephens

rgstephens Apr 19, 2016

@perak - Thanks for the pointers. I'll give this a try and report back.

@perak - Thanks for the pointers. I'll give this a try and report back.

@rgstephens

This comment has been minimized.

Show comment
Hide comment
@rgstephens

rgstephens Apr 20, 2016

I implemented user selectable bootswatch themes following the approach suggested by @perak and posted the code here. I'd like to get the item_list from a session variable as I raised in this issue but it's otherwise done.

Gotta love this Meteor Kitchen!

I implemented user selectable bootswatch themes following the approach suggested by @perak and posted the code here. I'd like to get the item_list from a session variable as I raised in this issue but it's otherwise done.

Gotta love this Meteor Kitchen!

@perak

This comment has been minimized.

Show comment
Hide comment
@perak

perak Apr 20, 2016

Owner

@rgstephens congratulations!

And thank you! 👍

Owner

perak commented Apr 20, 2016

@rgstephens congratulations!

And thank you! 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment