Page 2 of 4

Re: Theme without boostrap

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

Re: Theme without boostrap

Posted: Mon May 18, 2020 2:06 pm
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)

Re: Theme without boostrap

Posted: Tue May 19, 2020 6:13 am
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.

Re: Theme without boostrap

Posted: Wed May 20, 2020 6:03 pm
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

Re: Theme without boostrap

Posted: Sat May 23, 2020 7:52 am
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!

Re: Theme without boostrap

Posted: Wed Aug 26, 2020 1:14 pm
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 13204 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

Re: Theme without boostrap

Posted: Tue Sep 08, 2020 1:29 pm
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 13079 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. ~( ̄▽ ̄)~

Re: Theme without boostrap

Posted: Mon Sep 14, 2020 9:45 am
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). :)

Re: Theme without boostrap

Posted: Thu Feb 18, 2021 1:56 am
by platypusman
Hi there. New to WonderCMS (sounds amazing so far!), and looking into creating a theme.

Is it correct to say that you can't create a theme that doesn't use Bootstrap?? I sure hope that's not the case...

Before doing a bunch of trial and error to find out, thought I'd just ask here first... : )

thanks!

Re: Theme without boostrap

Posted: Thu Feb 18, 2021 5:15 am
by wiz
Hey platypusman, welcome to this awesome little community!

You can choose to use or not to use bootstrap when developing a theme. :)
Simple include it (or exclude it) from your theme.php file and you're good to go. The above news/post is only that Bootstrap is not required anymore for WonderCMS core (admin) to function.

Hope this helps, drop us any questions if you need any assistance!