wagtail-tw-blocks 0.1.2__tar.gz → 0.2.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (31) hide show
  1. {wagtail_tw_blocks-0.1.2 → wagtail_tw_blocks-0.2.1}/PKG-INFO +26 -2
  2. {wagtail_tw_blocks-0.1.2 → wagtail_tw_blocks-0.2.1}/README.md +25 -1
  3. {wagtail_tw_blocks-0.1.2 → wagtail_tw_blocks-0.2.1}/pyproject.toml +1 -1
  4. {wagtail_tw_blocks-0.1.2 → wagtail_tw_blocks-0.2.1}/wagtail_blocks/__init__.py +19 -2
  5. wagtail_tw_blocks-0.2.1/wagtail_blocks/blocks.py +563 -0
  6. wagtail_tw_blocks-0.2.1/wagtail_blocks/static/wagtail_blocks/css/styles.css +2 -0
  7. wagtail_tw_blocks-0.2.1/wagtail_blocks/templates/wagtail_blocks/blocks/accordion.html +24 -0
  8. {wagtail_tw_blocks-0.1.2 → wagtail_tw_blocks-0.2.1}/wagtail_blocks/templates/wagtail_blocks/blocks/alert.html +4 -3
  9. {wagtail_tw_blocks-0.1.2 → wagtail_tw_blocks-0.2.1}/wagtail_blocks/templates/wagtail_blocks/blocks/carousel.html +3 -3
  10. wagtail_tw_blocks-0.2.1/wagtail_blocks/templates/wagtail_blocks/blocks/code.html +64 -0
  11. {wagtail_tw_blocks-0.1.2 → wagtail_tw_blocks-0.2.1}/wagtail_blocks/templates/wagtail_blocks/blocks/diff.html +4 -7
  12. wagtail_tw_blocks-0.2.1/wagtail_blocks/templates/wagtail_blocks/blocks/fab.html +43 -0
  13. wagtail_tw_blocks-0.2.1/wagtail_blocks/templates/wagtail_blocks/blocks/hover_gallery.html +18 -0
  14. wagtail_tw_blocks-0.2.1/wagtail_blocks/templates/wagtail_blocks/blocks/list.html +55 -0
  15. wagtail_tw_blocks-0.2.1/wagtail_blocks/templates/wagtail_blocks/blocks/steps.html +12 -0
  16. wagtail_tw_blocks-0.2.1/wagtail_blocks/templates/wagtail_blocks/blocks/tabs.html +24 -0
  17. wagtail_tw_blocks-0.2.1/wagtail_blocks/templates/wagtail_blocks/blocks/timeline.html +30 -0
  18. wagtail_tw_blocks-0.2.1/wagtail_blocks/templates/wagtail_blocks/blocks/toast.html +9 -0
  19. wagtail_tw_blocks-0.2.1/wagtail_blocks/templates/wagtail_blocks/styles.html +23 -0
  20. wagtail_tw_blocks-0.1.2/wagtail_blocks/blocks.py +0 -251
  21. wagtail_tw_blocks-0.1.2/wagtail_blocks/static/wagtail_blocks/css/styles.css +0 -2
  22. wagtail_tw_blocks-0.1.2/wagtail_blocks/templates/wagtail_blocks/blocks/accordion.html +0 -19
  23. wagtail_tw_blocks-0.1.2/wagtail_blocks/templates/wagtail_blocks/blocks/code.html +0 -51
  24. wagtail_tw_blocks-0.1.2/wagtail_blocks/templates/wagtail_blocks/styles.html +0 -20
  25. {wagtail_tw_blocks-0.1.2 → wagtail_tw_blocks-0.2.1}/LICENSE +0 -0
  26. {wagtail_tw_blocks-0.1.2 → wagtail_tw_blocks-0.2.1}/wagtail_blocks/apps.py +0 -0
  27. {wagtail_tw_blocks-0.1.2 → wagtail_tw_blocks-0.2.1}/wagtail_blocks/static/wagtail_blocks/.prettierrc +0 -0
  28. {wagtail_tw_blocks-0.1.2 → wagtail_tw_blocks-0.2.1}/wagtail_blocks/static/wagtail_blocks/README.md +0 -0
  29. {wagtail_tw_blocks-0.1.2 → wagtail_tw_blocks-0.2.1}/wagtail_blocks/static/wagtail_blocks/css/app.css +0 -0
  30. {wagtail_tw_blocks-0.1.2 → wagtail_tw_blocks-0.2.1}/wagtail_blocks/static/wagtail_blocks/package-lock.json +0 -0
  31. {wagtail_tw_blocks-0.1.2 → wagtail_tw_blocks-0.2.1}/wagtail_blocks/static/wagtail_blocks/package.json +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: wagtail-tw-blocks
3
- Version: 0.1.2
3
+ Version: 0.2.1
4
4
  Summary: A collection of reusable, production-ready content blocks for Wagtail CMS, styled with Tailwind CSS and daisyUI.
5
5
  License: MIT
6
6
  License-File: LICENSE
@@ -44,6 +44,13 @@ Description-Content-Type: text/markdown
44
44
  - **Carousel:** Image or content slider with responsive design.
45
45
  - **Code:** Syntax-highlighted code snippets for technical content (Requires `highlight.js` and `clipboard.js` to be included in your page).
46
46
  - **Diff:** Side-by-side or inline difference highlighting for image comparisons.
47
+ - **FAB:** Floating Action Button with multiple action items.
48
+ - **Hover Gallery:** Image gallery with hover effects.
49
+ - **List:** Ordered lists with custom styling.
50
+ - **Steps:** Step-by-step process indicators.
51
+ - **Tabs:** Tabbed content sections.
52
+ - **Timeline:** Chronological event listings.
53
+ - **Toast:** Temporary notification messages.
47
54
 
48
55
  ---
49
56
 
@@ -122,6 +129,7 @@ class Article(Page):
122
129
  ("carousel", blocks.CarouselBlock()),
123
130
  ("code", blocks.CodeBlock()),
124
131
  ("diff", blocks.DiffBlock()),
132
+ # ...
125
133
  ],
126
134
  help_text=_("Article content"),
127
135
  )
@@ -147,7 +155,6 @@ class Article(Page):
147
155
  Do not use in production.
148
156
  See:
149
157
  - https://tailwindcss.com/docs/installation
150
- - https://daisyui.com/docs/install/
151
158
  -->
152
159
  <link href="https://cdn.jsdelivr.net/npm/daisyui@5" rel="stylesheet" type="text/css" />
153
160
  <link href="https://cdn.jsdelivr.net/npm/daisyui@5/themes.css" rel="stylesheet" type="text/css" />
@@ -201,6 +208,23 @@ class Article(Page):
201
208
 
202
209
  ---
203
210
 
211
+ ## Extending
212
+
213
+ You can easily extend or customize the provided blocks by subclassing them. For example, to create a custom alert block with additional styles:
214
+
215
+ ```python
216
+ from wagtail_blocks import blocks
217
+
218
+ class CustomAlertBlock(blocks.AlertBlock):
219
+
220
+ class Meta:
221
+ template = "path/to/your/custom_alert_template.html"
222
+ icon = "warning"
223
+ label = "Custom Alert"
224
+ ```
225
+
226
+ ---
227
+
204
228
  ## Contributing
205
229
 
206
230
  We welcome community contributions. See the [CONTRIBUTING](CONTRIBUTING.md) guide for setup instructions, coding standards, and workflow. Opening an issue before major changes helps align on scope and direction.
@@ -24,6 +24,13 @@
24
24
  - **Carousel:** Image or content slider with responsive design.
25
25
  - **Code:** Syntax-highlighted code snippets for technical content (Requires `highlight.js` and `clipboard.js` to be included in your page).
26
26
  - **Diff:** Side-by-side or inline difference highlighting for image comparisons.
27
+ - **FAB:** Floating Action Button with multiple action items.
28
+ - **Hover Gallery:** Image gallery with hover effects.
29
+ - **List:** Ordered lists with custom styling.
30
+ - **Steps:** Step-by-step process indicators.
31
+ - **Tabs:** Tabbed content sections.
32
+ - **Timeline:** Chronological event listings.
33
+ - **Toast:** Temporary notification messages.
27
34
 
28
35
  ---
29
36
 
@@ -102,6 +109,7 @@ class Article(Page):
102
109
  ("carousel", blocks.CarouselBlock()),
103
110
  ("code", blocks.CodeBlock()),
104
111
  ("diff", blocks.DiffBlock()),
112
+ # ...
105
113
  ],
106
114
  help_text=_("Article content"),
107
115
  )
@@ -127,7 +135,6 @@ class Article(Page):
127
135
  Do not use in production.
128
136
  See:
129
137
  - https://tailwindcss.com/docs/installation
130
- - https://daisyui.com/docs/install/
131
138
  -->
132
139
  <link href="https://cdn.jsdelivr.net/npm/daisyui@5" rel="stylesheet" type="text/css" />
133
140
  <link href="https://cdn.jsdelivr.net/npm/daisyui@5/themes.css" rel="stylesheet" type="text/css" />
@@ -181,6 +188,23 @@ class Article(Page):
181
188
 
182
189
  ---
183
190
 
191
+ ## Extending
192
+
193
+ You can easily extend or customize the provided blocks by subclassing them. For example, to create a custom alert block with additional styles:
194
+
195
+ ```python
196
+ from wagtail_blocks import blocks
197
+
198
+ class CustomAlertBlock(blocks.AlertBlock):
199
+
200
+ class Meta:
201
+ template = "path/to/your/custom_alert_template.html"
202
+ icon = "warning"
203
+ label = "Custom Alert"
204
+ ```
205
+
206
+ ---
207
+
184
208
  ## Contributing
185
209
 
186
210
  We welcome community contributions. See the [CONTRIBUTING](CONTRIBUTING.md) guide for setup instructions, coding standards, and workflow. Opening an issue before major changes helps align on scope and direction.
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "wagtail-tw-blocks"
3
- version = "0.1.2"
3
+ version = "0.2.1"
4
4
  description = "A collection of reusable, production-ready content blocks for Wagtail CMS, styled with Tailwind CSS and daisyUI."
5
5
  authors = ["Yousef Abu Shanab <josephyousef249@gmail.com>"]
6
6
  license = "MIT"
@@ -3,14 +3,15 @@
3
3
  from django.utils.translation import gettext_lazy as _
4
4
 
5
5
  # Constants
6
- ACCORDION_STYLE_VARIANTS = [
6
+ ACCORDION_STYLES = [
7
7
  ("plus", _("Plus")),
8
8
  ("arrow", _("Arrow")),
9
9
  ]
10
10
 
11
- ALERT_STYLE_VARIANTS = [
11
+ ALERT_STYLES = [
12
12
  ("soft", _("Soft")),
13
13
  ("outline", _("Outline")),
14
+ ("dash", _("Dash")),
14
15
  ]
15
16
 
16
17
  ALERT_LEVELS = [
@@ -20,6 +21,22 @@ ALERT_LEVELS = [
20
21
  ("error", _("Error")),
21
22
  ]
22
23
 
24
+ COLOR_CHOICES = [
25
+ ("primary", _("Primary")),
26
+ ("secondary", _("Secondary")),
27
+ ("accent", _("Accent")),
28
+ ("success", _("Success")),
29
+ ("info", _("Info")),
30
+ ("warning", _("Warning")),
31
+ ("error", _("Error")),
32
+ ]
33
+
34
+ TAB_STYLES = [
35
+ ("border", _("Border")),
36
+ ("box", _("Box")),
37
+ ("lift", _("Lift")),
38
+ ]
39
+
23
40
  # The popular programming languages
24
41
  PROGRAMMING_LANGUAGES = [
25
42
  ("auto", _("Auto")),