Hi Jeff,

Thank you for all your hard work, d8 AT looks great. Would it be possible (or a good idea) to add a custom js section in the form of a tab to the theme like the custom css? Screenshot attached.

I always think that writing js by adding it to the .info file then going into that file in the theme dir appears to be the opposite of the custom css approach - so should we not have a consistent experience?

Maybe even css & js turned off by default.

Thanks for any consideration.

Phil

CommentFileSizeAuthor
at8-customjs.png29.7 KBkingfisher64
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Jeff Burnz’s picture

There lies a major issue with JS and that is security - CSS is pretty innocuous and I can do some basic output filtering to remove anything dangerous, but with JS it's all dangerous, that said I'll look at some modules that allow adding JS (I would think that Google Analytics module is worth looking at) to see how they do this stuff in D8 - maybe its possible and safe at the same time, I need to learn more about it.

One problem is how to load the file dynamically (we can't really do inline JS anymore, or at least its a bit problematic and ugly in D8), I'm not totally down with how dynamic libraries work in D8 so I need to read up on that feature also.

kingfisher64’s picture

Thanks Jeff for taking the time to respond. I'd like to use adaptive theme for all d8 sites. Plan to join the theme club.

You mentioned dynamic library integration. Are you talking like being able to use things like bootstrap or another library etc with a simple tick on/off through AT or have I misunderstood?

Thanks again, I've not doubt AT will be a success with d8.

Jeff Burnz’s picture

Dynamic libraries is a feature (or at least was proposed) of D8 where you don't need to declare the library before being able to use it, well, at least thats the general gist of it as far as I know, like I said I don't know much about this feature, or even if it works.

kingfisher64’s picture

I guess things will become clearer closer to the d8 launch.

Jeff Burnz’s picture

Status: Active » Closed (outdated)