Page 1 of 4

Theme without boostrap

Posted: Tue Jan 14, 2020 12:50 pm
by melbournevijay
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

Re: Theme without boostrap

Posted: Tue Jan 14, 2020 3:40 pm
by StephanStanisic
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!)

Re: Theme without boostrap

Posted: Tue Jan 14, 2020 7:28 pm
by wiz
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?

Re: Theme without boostrap

Posted: Wed Jan 29, 2020 9:18 pm
by StephanStanisic
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.

Re: Theme without boostrap

Posted: Mon Feb 10, 2020 9:05 pm
by wiz
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?

Re: Theme without boostrap

Posted: Thu Feb 27, 2020 12:31 am
by mjxl
Just chipping in, I saw the cdn admin javascript file is just a couple of functions, which are easily replaced by todays vanilla JS 8-)

I'm assuming there are a couple more JS calls in the index.php ? I've not inspected index too much :)

Re: Theme without boostrap

Posted: Thu Apr 23, 2020 12:45 pm
by wiz
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 ;)

Re: Theme without boostrap

Posted: Mon Apr 27, 2020 2:25 pm
by mjxl
wiz wrote:
Thu Apr 23, 2020 12:45 pm
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 ;)
Neat! I really don't mind it being there, but looked like it could go without jQuery anyways :p!

Re: Theme without boostrap

Posted: Mon Apr 27, 2020 2:52 pm
by wiz
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.

Re: Theme without boostrap

Posted: Mon Apr 27, 2020 4:05 pm
by mjxl
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.
Awesome, when I tried removing the need of jQuery, I only got stuck on the $get/post thingy.
This could be replaced with Fetch/XHR, right?

The rest of it was pretty straightforward, as they are just regular functions :3