Theme without boostrap

wiz
Admin
Posts: 481
Joined: Sat Oct 30, 2010 12:23 am

Re: Theme without boostrap

Post by wiz »

Awesome news: latest WonderCMS version (3.0.8) settings/core is completely detached from Bootstrap and jQuery.
mjxl
Posts: 27
Joined: Thu Jan 30, 2020 4:57 am

Re: Theme without boostrap

Post by mjxl »

wiz wrote: Mon May 18, 2020 8:36 am Awesome news: latest WonderCMS version (3.0.8) settings/core is completely detached from Bootstrap and jQuery.
Sick !

Did my eyes also spot a new default theme?!?!!

/edit: wouldn't hurt to check the changelog MARCEL....... (That's me btw)
wiz
Admin
Posts: 481
Joined: Sat Oct 30, 2010 12:23 am

Re: Theme without boostrap

Post by wiz »

Nice to meet you Marcel, I'm Robert. :)
How do you like the new default theme (that ones includes Bootstrap 4 though), just the admin doesn't require it.
mjxl
Posts: 27
Joined: Thu Jan 30, 2020 4:57 am

Re: Theme without boostrap

Post by mjxl »

y0 Robert, the new default theme looks very good imo, it has a nice modern touch to it :) !
I saw it was based on BS4 yeah, Bootstrap IS very good imho. (not really weird, since like, half of the entire WWW runs on bootstrap lol)

I will dismantle the theme I was working on at my page, I'm using Spectre CSS If memory serves me right still, lol.

Come to think of it, i haven't yet checked if the plugins I did got broken :P

My attention span is all over the place, I jump from VSCode into fiddling with synthesizers to (at the moment) playing the SHIT out of DOOM Eternal.
Find it hard to spread/balance my interests from time to time xD
wiz
Admin
Posts: 481
Joined: Sat Oct 30, 2010 12:23 am

Re: Theme without boostrap

Post by wiz »

All good, thank you for the extended support and feedback, glad you like it. :)

Hope all is going good on your end and would love to see your progress!
User avatar
YawningHippo
Posts: 7
Joined: Wed Aug 19, 2020 6:26 pm

Re: Theme without boostrap

Post by YawningHippo »

Sorry for bumping an old post, but i've only just discovered this bootstrap & jquery independency.
Thanks for all the work put into optimizing the cms and for aiming on keeping things lightweight!
After pronto testing it seems that without bootstrap and jquery a few minor issues still remain:

screenshot.png
screenshot.png (54.13 KiB) Viewed 362 times

  • The alert window cannot be closed, clicking on x does nothing (nothing in console either)
  • The settings button has no background color, easily fixed with: background-color: grey;

Also, since I've now discovered my time spent on twiddling with these libraries was wasted and possibly prevent that for future developers, I'd like to propose a revision of the wiki section regarding neccesary theme tags, where both jquery (jquery-1.12.4.min.js, yikes!) and bootstrap are deemed as such: https://github.com/robiso/wondercms/wiki/Theme-tags
User avatar
YawningHippo
Posts: 7
Joined: Wed Aug 19, 2020 6:26 pm

Re: Theme without boostrap

Post by YawningHippo »

I'm not sure how I missed the console errors last time around, but there's definately some errors in there without jQuery and Bootstrap.
I've trial-errored my barebones template and the following script calls remain neccesary for an error-free functioning of wondercms:

Code: Select all

<script src="https://code.jquery.com/jquery-3.4.1.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js"></script>
This makes sense since even before logging in, the default login button fires a jQuery onclick event:

Code: Select all

<button type="submit" class="btn btn-info" onclick="$('#login').show();">Login</button>

@wiz, you mentioned the core being completely detached from Bootstrap and jQuery (in regards to version 3.0.8).
Were these changes undone for later versions? No matter my setup, I can't verify that in the current version 3.1.1.

On the css side, removing Bootstrap has no effect on the settings menu, which is awesome! 👍🏻
Some default elements like Alerts and cache messages however are now completely unstyled:

Capture.PNG
Capture.PNG (11.45 KiB) Viewed 237 times

Since the Alerts and admin messages are as much core parts of the system as the settings menu,
perhaps some basic styling should be included for those elements in the default $Wcms->css().

I've love for the CMS to be as lightweight and independent as possible and jQuery and Bootstrap don't fit that goal.
As far as I can tell the bootstrap.min.js and popper.js libraries are only included for bootstrap powered tooltips.

Regarding jQuery I'm not sure how deeply integrated it is, but native JS could eliminate it's need altogether.
I've built some fun stuff lately with native JS and could be of more help there than on the PHP side of things. ~( ̄▽ ̄)~
wiz
Admin
Posts: 481
Joined: Sat Oct 30, 2010 12:23 am

Re: Theme without boostrap

Post by wiz »

Hi YawningHippo.

Currently, latest WonderCMS core (settings panel, while being in logged in as admin) doesn't require any Bootstrap or JS. The whole admin part is done with vanilla JS and can be found here: https://github.com/robiso/wondercms-cdn-files.

Additionally, for theming the Settings panel, we use our own CSS which borrows the Boostrap layout but is reduced by about 80%.
The actual theme requires Bootstrap or JS, not the backend.

Please let me know if I missed something (it's still early here). :)
Post Reply