Theme without boostrap
-
- Posts: 1
- Joined: Tue Jan 14, 2020 6:16 am
Theme without boostrap
WonderCMS is awesome and easy to use.
I was able to follow the 8 easy steps to create a theme.
However, I noticed that the settings dialog is completely broken in the absence of bootstrap css and js.
I like to keep my sites lightweight.
Do you have a theme without bootstrap? OR Is it possible to only load jquery and bootstrap css and js when logged in?
Many thanks, Vj
I was able to follow the 8 easy steps to create a theme.
However, I noticed that the settings dialog is completely broken in the absence of bootstrap css and js.
I like to keep my sites lightweight.
Do you have a theme without bootstrap? OR Is it possible to only load jquery and bootstrap css and js when logged in?
Many thanks, Vj
- StephanStanisic
- Posts: 37
- Joined: Fri Jul 05, 2019 8:51 pm
Re: Theme without boostrap
Hey melbournevijay,
Welcome to the WonderCMS community!
Awesome question, this is a problem I've found before. I made a skeleton for a bootstrap-less theme on github:
For normal themes:
https://github.com/StephanStanisic/_empty
For single page themes:
https://github.com/StephanStanisic/_single
These themes include bootstrap just on summernote, summernote-air and the admin panel.
Let me know if this helps!
(These skeletons are really a WIP, any modifications/pull requests are happily welcome!)
Welcome to the WonderCMS community!
Awesome question, this is a problem I've found before. I made a skeleton for a bootstrap-less theme on github:
For normal themes:
https://github.com/StephanStanisic/_empty
For single page themes:
https://github.com/StephanStanisic/_single
These themes include bootstrap just on summernote, summernote-air and the admin panel.
Let me know if this helps!
(These skeletons are really a WIP, any modifications/pull requests are happily welcome!)
Re: Theme without boostrap
Stephan you ROCK!
Would it make sense to implement something like a check mark in the "Settings" panel that would disable Bootstrap and jQuery for visitors? Possibly two, for disabling Bootstrap and/or jQuery separately?
Would it make sense to implement something like a check mark in the "Settings" panel that would disable Bootstrap and jQuery for visitors? Possibly two, for disabling Bootstrap and/or jQuery separately?
- StephanStanisic
- Posts: 37
- Joined: Fri Jul 05, 2019 8:51 pm
Re: Theme without boostrap
Sorry for the late reply, didn't saw the reaction.
I think it would be better to remote the frameworks all together, and let the theme include them if they use them. The usage of javascript is minimal right now and I don't see the added benefit of keeping an old version of bootstrap inside WonderCMS.
Of course I am currently testing the possibilities of this, including the new admin panel I mentioned and (hopefully, didn't start yet) a way for plugins to create custom admin menu options.
Also, if you would like to go the check mark route you should add this as a configurable option inside the theme. Problem is if a plugin requires bootstrap (summernote) and a theme doesn't have the bootstrap enabled it will not work. By getting rid of bootstrap all together this isn't a problem any more.
I think it would be better to remote the frameworks all together, and let the theme include them if they use them. The usage of javascript is minimal right now and I don't see the added benefit of keeping an old version of bootstrap inside WonderCMS.
Of course I am currently testing the possibilities of this, including the new admin panel I mentioned and (hopefully, didn't start yet) a way for plugins to create custom admin menu options.
Also, if you would like to go the check mark route you should add this as a configurable option inside the theme. Problem is if a plugin requires bootstrap (summernote) and a theme doesn't have the bootstrap enabled it will not work. By getting rid of bootstrap all together this isn't a problem any more.
Re: Theme without boostrap
With the latest WonderCMS 3.0.5, Bootstrap and jQuery can be removed from the theme, but the Bootstrap and jQuery will be still included for the admin.
This feature enables any developer to remove the user facing libraries while maintaining a functional WonderCMS admin.
I believe this is the wanted behaviour?
This feature enables any developer to remove the user facing libraries while maintaining a functional WonderCMS admin.
I believe this is the wanted behaviour?
Re: Theme without boostrap
Just chipping in, I saw the cdn admin javascript file is just a couple of functions, which are easily replaced by todays vanilla JS ![Cool 8-)](./images/smilies/icon_cool.gif)
I'm assuming there are a couple more JS calls in the index.php ? I've not inspected index too much![Smile :)](./images/smilies/icon_e_smile.gif)
![Cool 8-)](./images/smilies/icon_cool.gif)
I'm assuming there are a couple more JS calls in the index.php ? I've not inspected index too much
![Smile :)](./images/smilies/icon_e_smile.gif)
Re: Theme without boostrap
mjxl, we're planning on migrating away from jQuery for the admin panel, as well as bootstrap.
So on the admin part, there should be no more external libraries.
Hope this is good news for you![Wink ;)](./images/smilies/icon_e_wink.gif)
So on the admin part, there should be no more external libraries.
Hope this is good news for you
![Wink ;)](./images/smilies/icon_e_wink.gif)
Re: Theme without boostrap
Neat! I really don't mind it being there, but looked like it could go without jQuery anyways :p!
Re: Theme without boostrap
Good news, first part of the detaching WonderCMS completely from the bootstrap library is done, along with a lot of other improvements such as easier editing, animations, UX improvements.
Something like having "backups" for pages would be also awesome, but I think we still need to figure that out.
Next part is detaching jQuery and then we're ready for a release.
Something like having "backups" for pages would be also awesome, but I think we still need to figure that out.
Next part is detaching jQuery and then we're ready for a release.
Re: Theme without boostrap
Awesome, when I tried removing the need of jQuery, I only got stuck on the $get/post thingy.wiz wrote: ↑Mon Apr 27, 2020 2:52 pm Good news, first part of the detaching WonderCMS completely from the bootstrap library is done, along with a lot of other improvements such as easier editing, animations, UX improvements.
Something like having "backups" for pages would be also awesome, but I think we still need to figure that out.
Next part is detaching jQuery and then we're ready for a release.
This could be replaced with Fetch/XHR, right?
The rest of it was pretty straightforward, as they are just regular functions :3