Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add initial support for Bootstrap 5 #161

Merged
merged 22 commits into from
Oct 7, 2021
Merged

Add initial support for Bootstrap 5 #161

merged 22 commits into from
Oct 7, 2021

Conversation

greyli
Copy link
Member

@greyli greyli commented Sep 25, 2021

After this PR merged, we can start to work on the macros one by one to adapt them to support Bootstrap 5.

It brings clear names for different Bootstrap versions. You can use Bootstrap5 for Bootstrap 5:

from flask_bootstrap import Bootstrap5

bootstrap = Bootstrap5(app)

Import templates from the bootstrap5/ path:

{% from 'bootstrap5/form.html' import render_form %}

And if you want to use Bootstrap 4, just use Boostrap4 and boostrap4/:

from flask_bootstrap import Bootstrap4

bootstrap = Bootstrap4(app)
{% from 'bootstrap4/form.html' import render_form %}

The old names (Bootstrap and bootstrap/) will throw out a warning from version 2.0.

Todo:

  • Refactor the base class to support multiple major Bootstrap versions.
  • Refactor tests to support test multiple Bootstrap versions.
  • Add tests for Bootstrap5 load_* methods.
  • Move Bootstrap 4 resources to subfolder bootstrap4.
  • Add Bootstrap 5 resources.
  • Move Bootstrap 4 templates to the boostrap4 folder.
  • Add warning for Boostrap class and template path bootstrap/.
  • Add Bootswatch themes files for Bootstrap 5.
  • Add example application for Bootstrap 5.
  • Update docs and README.
  • Add docs for Bootstrap 5 support.

@greyli greyli added this to the 2.0.0 milestone Sep 25, 2021
This was linked to issues Sep 25, 2021
@greyli greyli merged commit f5de572 into master Oct 7, 2021
@greyli greyli deleted the bootstrap5-init branch October 7, 2021 04:37
This was referenced Oct 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Sync new themes from Bootswatch Add Bootstrap 5 support
1 participant