Skip to content

Commit 1ea8be5

Browse files
authored
feat: New icon app in contrib including icon picker for wide set of icon libraries (#110)
* Upgrade to bootstrap5, add inital icon contrib package * Optimize css and js * Fix djlint * Update readme and changelog * Update docs * Add tests * Update test * fix flake8 * No coverage of IconPickerWidget * Update test * isort tests * Improve test coverage * add migration command * Fix flake8 * Fix: migration of icons * Fix icon migration * Dark mode css tweak, docs update, naming typos and spacings for icons * Improve flake8 and isort friendlyness * Fix: Display empty content
1 parent a9e9a0b commit 1ea8be5

File tree

177 files changed

+59771
-62
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

177 files changed

+59771
-62
lines changed

CHANGELOG.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@
22
Changelog
33
=========
44

5-
unpublished
6-
===========
5+
1.1.0
6+
=====
77

8+
* Add djangocms_frontend.contrib.icon
89
* Fix a bug which lets a carousel not start on django CMS 4.0+
910
* Update translations
1011
* Add tests for Django 4.2

README.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@ For a manual install:
121121
'djangocms_frontend.contrib.collapse',
122122
'djangocms_frontend.contrib.content',
123123
'djangocms_frontend.contrib.grid',
124+
'djangocms_frontend.contrib.icon',
124125
'djangocms_frontend.contrib.image',
125126
'djangocms_frontend.contrib.jumbotron',
126127
'djangocms_frontend.contrib.link',

djangocms_frontend/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,4 @@
1919
13. Github actions will publish the new package to pypi
2020
"""
2121

22-
__version__ = "1.0.2"
22+
__version__ = "1.1.0"

djangocms_frontend/common/bootstrap5/background.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ def render(self, context, instance, placeholder):
2424
if getattr(instance, "background_context", ""):
2525
instance.add_classes(f"bg-{instance.background_context}")
2626
if getattr(instance, "background_opacity", "100") != "100":
27-
instance.add_classes(f"bg-opacity-{instance.background_opacity}")
27+
if instance.background_opacity:
28+
instance.add_classes(f"bg-opacity-{instance.background_opacity}")
2829
if getattr(instance, "background_shadow", ""):
2930
if instance.background_shadow == "reg":
3031
instance.add_classes("shadow")

djangocms_frontend/contrib/accordion/migrations/0001_initial.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55

66
class Migration(migrations.Migration):
7-
87
initial = True
98

109
dependencies = [

djangocms_frontend/contrib/alert/migrations/0001_initial.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55

66
class Migration(migrations.Migration):
7-
87
initial = True
98

109
dependencies = [

djangocms_frontend/contrib/badge/migrations/0001_initial.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55

66
class Migration(migrations.Migration):
7-
87
initial = True
98

109
dependencies = [

djangocms_frontend/contrib/card/migrations/0001_initial.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55

66
class Migration(migrations.Migration):
7-
87
initial = True
98

109
dependencies = [

djangocms_frontend/contrib/carousel/cms_plugins.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,10 @@ class CarouselPlugin(mixin_factory("Carousel"), AttributesMixin, CMSUIPlugin):
3939
("carousel_controls", "carousel_indicators"),
4040
("carousel_keyboard", "carousel_wrap"),
4141
("carousel_ride",),
42-
("carousel_transition", "carousel_pause",),
42+
(
43+
"carousel_transition",
44+
"carousel_pause",
45+
),
4346
)
4447
},
4548
),
@@ -53,7 +56,11 @@ def get_render_template(self, context, instance, placeholder):
5356

5457
@plugin_pool.register_plugin
5558
class CarouselSlidePlugin(
56-
mixin_factory("CarouselSlide"), AttributesMixin, BackgroundMixin, LinkPluginMixin, CMSUIPlugin
59+
mixin_factory("CarouselSlide"),
60+
AttributesMixin,
61+
BackgroundMixin,
62+
LinkPluginMixin,
63+
CMSUIPlugin,
5764
):
5865
"""
5966
Components > "Carousel Slide" Plugin

djangocms_frontend/contrib/carousel/forms.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -130,9 +130,7 @@ class Meta:
130130
choices=CAROUSEL_TRANSITION_CHOICES,
131131
required=False,
132132
initial=CAROUSEL_TRANSITION_CHOICES[0][0],
133-
help_text=_(
134-
"Determines if slides change by sliding or fading."
135-
),
133+
help_text=_("Determines if slides change by sliding or fading."),
136134
widget=ButtonGroup(attrs=dict(property="text")),
137135
)
138136
attributes = AttributesFormField(
@@ -149,7 +147,10 @@ class Meta:
149147

150148

151149
class CarouselSlideForm(
152-
mixin_factory("CarouselSlide"), AbstractLinkForm, BackgroundFormMixin, EntangledModelForm
150+
mixin_factory("CarouselSlide"),
151+
AbstractLinkForm,
152+
BackgroundFormMixin,
153+
EntangledModelForm,
153154
):
154155
"""
155156
Components > "Slide" Plugin

0 commit comments

Comments
 (0)