wagtail-tw-blocks 0.2.6__tar.gz → 0.3.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 (39) hide show
  1. {wagtail_tw_blocks-0.2.6 → wagtail_tw_blocks-0.3.1}/PKG-INFO +28 -45
  2. {wagtail_tw_blocks-0.2.6 → wagtail_tw_blocks-0.3.1}/README.md +25 -41
  3. {wagtail_tw_blocks-0.2.6 → wagtail_tw_blocks-0.3.1}/pyproject.toml +3 -3
  4. {wagtail_tw_blocks-0.2.6 → wagtail_tw_blocks-0.3.1}/wagtail_blocks/blocks.py +26 -6
  5. {wagtail_tw_blocks-0.2.6 → wagtail_tw_blocks-0.3.1}/wagtail_blocks/locale/ar/LC_MESSAGES/django.po +96 -89
  6. {wagtail_tw_blocks-0.2.6 → wagtail_tw_blocks-0.3.1}/wagtail_blocks/locale/cn/LC_MESSAGES/django.po +98 -83
  7. {wagtail_tw_blocks-0.2.6 → wagtail_tw_blocks-0.3.1}/wagtail_blocks/locale/de/LC_MESSAGES/django.po +98 -83
  8. {wagtail_tw_blocks-0.2.6 → wagtail_tw_blocks-0.3.1}/wagtail_blocks/locale/es/LC_MESSAGES/django.po +98 -83
  9. {wagtail_tw_blocks-0.2.6 → wagtail_tw_blocks-0.3.1}/wagtail_blocks/locale/fr/LC_MESSAGES/django.po +100 -84
  10. {wagtail_tw_blocks-0.2.6 → wagtail_tw_blocks-0.3.1}/wagtail_blocks/locale/tr/LC_MESSAGES/django.po +98 -83
  11. wagtail_tw_blocks-0.3.1/wagtail_blocks/static/wagtail_blocks/css/styles.css +2 -0
  12. {wagtail_tw_blocks-0.2.6 → wagtail_tw_blocks-0.3.1}/wagtail_blocks/static/wagtail_blocks/package-lock.json +4 -4
  13. {wagtail_tw_blocks-0.2.6 → wagtail_tw_blocks-0.3.1}/wagtail_blocks/static/wagtail_blocks/package.json +1 -1
  14. wagtail_tw_blocks-0.3.1/wagtail_blocks/templates/wagtail_blocks/blocks/accordion.html +49 -0
  15. {wagtail_tw_blocks-0.2.6 → wagtail_tw_blocks-0.3.1}/wagtail_blocks/templates/wagtail_blocks/blocks/alert.html +1 -1
  16. {wagtail_tw_blocks-0.2.6 → wagtail_tw_blocks-0.3.1}/wagtail_blocks/templates/wagtail_blocks/blocks/code.html +2 -0
  17. {wagtail_tw_blocks-0.2.6 → wagtail_tw_blocks-0.3.1}/wagtail_blocks/templates/wagtail_blocks/blocks/tabs.html +1 -1
  18. wagtail_tw_blocks-0.3.1/wagtail_blocks/templates/wagtail_blocks/styles.html +92 -0
  19. wagtail_tw_blocks-0.2.6/wagtail_blocks/static/wagtail_blocks/css/styles.css +0 -2
  20. wagtail_tw_blocks-0.2.6/wagtail_blocks/templates/wagtail_blocks/blocks/accordion.html +0 -24
  21. {wagtail_tw_blocks-0.2.6 → wagtail_tw_blocks-0.3.1}/LICENSE +0 -0
  22. {wagtail_tw_blocks-0.2.6 → wagtail_tw_blocks-0.3.1}/wagtail_blocks/__init__.py +0 -0
  23. {wagtail_tw_blocks-0.2.6 → wagtail_tw_blocks-0.3.1}/wagtail_blocks/apps.py +0 -0
  24. {wagtail_tw_blocks-0.2.6 → wagtail_tw_blocks-0.3.1}/wagtail_blocks/static/wagtail_blocks/.prettierrc +0 -0
  25. {wagtail_tw_blocks-0.2.6 → wagtail_tw_blocks-0.3.1}/wagtail_blocks/static/wagtail_blocks/README.md +0 -0
  26. {wagtail_tw_blocks-0.2.6 → wagtail_tw_blocks-0.3.1}/wagtail_blocks/static/wagtail_blocks/css/app.css +0 -0
  27. {wagtail_tw_blocks-0.2.6 → wagtail_tw_blocks-0.3.1}/wagtail_blocks/templates/wagtail_blocks/blocks/browser.html +0 -0
  28. {wagtail_tw_blocks-0.2.6 → wagtail_tw_blocks-0.3.1}/wagtail_blocks/templates/wagtail_blocks/blocks/carousel.html +0 -0
  29. {wagtail_tw_blocks-0.2.6 → wagtail_tw_blocks-0.3.1}/wagtail_blocks/templates/wagtail_blocks/blocks/code_mockup.html +0 -0
  30. {wagtail_tw_blocks-0.2.6 → wagtail_tw_blocks-0.3.1}/wagtail_blocks/templates/wagtail_blocks/blocks/diff.html +0 -0
  31. {wagtail_tw_blocks-0.2.6 → wagtail_tw_blocks-0.3.1}/wagtail_blocks/templates/wagtail_blocks/blocks/fab.html +0 -0
  32. {wagtail_tw_blocks-0.2.6 → wagtail_tw_blocks-0.3.1}/wagtail_blocks/templates/wagtail_blocks/blocks/hover_gallery.html +0 -0
  33. {wagtail_tw_blocks-0.2.6 → wagtail_tw_blocks-0.3.1}/wagtail_blocks/templates/wagtail_blocks/blocks/image.html +0 -0
  34. {wagtail_tw_blocks-0.2.6 → wagtail_tw_blocks-0.3.1}/wagtail_blocks/templates/wagtail_blocks/blocks/list.html +0 -0
  35. {wagtail_tw_blocks-0.2.6 → wagtail_tw_blocks-0.3.1}/wagtail_blocks/templates/wagtail_blocks/blocks/phone.html +0 -0
  36. {wagtail_tw_blocks-0.2.6 → wagtail_tw_blocks-0.3.1}/wagtail_blocks/templates/wagtail_blocks/blocks/steps.html +0 -0
  37. {wagtail_tw_blocks-0.2.6 → wagtail_tw_blocks-0.3.1}/wagtail_blocks/templates/wagtail_blocks/blocks/timeline.html +0 -0
  38. {wagtail_tw_blocks-0.2.6 → wagtail_tw_blocks-0.3.1}/wagtail_blocks/templates/wagtail_blocks/blocks/toast.html +0 -0
  39. {wagtail_tw_blocks-0.2.6 → wagtail_tw_blocks-0.3.1}/wagtail_blocks/templates/wagtail_blocks/blocks/window.html +0 -0
@@ -1,21 +1,20 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: wagtail-tw-blocks
3
- Version: 0.2.6
3
+ Version: 0.3.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
7
7
  Author: Yousef Abu Shanab
8
8
  Author-email: josephyousef249@gmail.com
9
- Requires-Python: >=3.10
9
+ Requires-Python: >=3.11
10
10
  Classifier: License :: OSI Approved :: MIT License
11
11
  Classifier: Programming Language :: Python :: 3
12
- Classifier: Programming Language :: Python :: 3.10
13
12
  Classifier: Programming Language :: Python :: 3.11
14
13
  Classifier: Programming Language :: Python :: 3.12
15
14
  Classifier: Programming Language :: Python :: 3.13
16
15
  Classifier: Programming Language :: Python :: 3.14
17
16
  Requires-Dist: django (>=5.2.1)
18
- Requires-Dist: wagtail (>=7.0)
17
+ Requires-Dist: wagtail (>=7.2)
19
18
  Project-URL: Documentation, https://github.com/youzarsiph/wagtail-tw-blocks
20
19
  Project-URL: Homepage, https://github.com/youzarsiph/wagtail-tw-blocks
21
20
  Project-URL: Repository, https://github.com/youzarsiph/wagtail-tw-blocks
@@ -29,7 +28,6 @@ Description-Content-Type: text/markdown
29
28
  [![Code Linting: Ruff](https://github.com/youzarsiph/wagtail-tw-blocks/actions/workflows/ruff.yml/badge.svg)](https://github.com/youzarsiph/wagtail-tw-blocks/actions/workflows/ruff.yml)
30
29
  [![PyPI - Version](https://img.shields.io/pypi/v/wagtail-tw-blocks?logo=pypi&logoColor=white)](https://pypi.org/project/wagtail-tw-blocks/)
31
30
  [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/wagtail-tw-blocks?logo=python&logoColor=white)](https://pypi.org/project/wagtail-tw-blocks/)
32
- [![PyPI - Downloads](https://img.shields.io/pypi/dm/wagtail-tw-blocks?logo=pypi&logoColor=white)](https://pypi.org/project/wagtail-tw-blocks/)
33
31
  [![PyPI - License](https://img.shields.io/pypi/l/wagtail-tw-blocks?logo=pypi&logoColor=white)](https://pypi.org/project/wagtail-tw-blocks/)
34
32
 
35
33
  ## Overview
@@ -38,6 +36,14 @@ Description-Content-Type: text/markdown
38
36
 
39
37
  ---
40
38
 
39
+ ## Key features
40
+
41
+ - **Modern design:** Tailwind CSS + daisyUI styling for clean, responsive layouts.
42
+ - **Multiple themes:** All daisyUI themes included, with easy customization.
43
+ - **CI/CD:** GitHub Actions pipelines for automated testing and deployment.
44
+
45
+ ---
46
+
41
47
  ## Demo
42
48
 
43
49
  [![Demo](https://img.youtube.com/vi/0b0dZByyPok/maxresdefault.jpg)](https://youtu.be/0b0dZByyPok)
@@ -94,7 +100,7 @@ You can customize the behavior of `wagtail-tw-blocks` by adding the following se
94
100
  # project/settings.py
95
101
 
96
102
  # Extend or override the default programming languages for the CodeBlock
97
- WAGTAIL_BLOCKS_PROGRAMMING_LANGUAGES = [
103
+ WB_CODE_BLOCK_PROGRAMMING_LANGUAGES = [
98
104
  ('python', 'Python'),
99
105
  ('javascript', 'JavaScript'),
100
106
  ('html', 'HTML'),
@@ -108,14 +114,17 @@ WAGTAIL_BLOCKS_PROGRAMMING_LANGUAGES = [
108
114
  # ...
109
115
  ]
110
116
 
117
+ # Show or hide the header the CodeBlock
118
+ WB_CODE_BLOCK_SHOW_HEADER = True # Default is True
119
+
111
120
  # Show or hide the programming language label in the CodeBlock
112
- WAGTAIL_BLOCKS_SHOW_PROGRAMMING_LANGUAGE = True # Default is True
121
+ WB_CODE_BLOCK_SHOW_PROGRAMMING_LANGUAGE = True # Default is True
113
122
 
114
123
  # Show or hide the copy button in the CodeBlock
115
- WAGTAIL_BLOCKS_SHOW_COPY_BUTTON = True # Default is True
124
+ WB_CODE_BLOCK_SHOW_COPY_BUTTON = True # Default is True
116
125
 
117
126
  # Show or hide window control buttons in the CodeBlock
118
- WAGTAIL_BLOCKS_SHOW_WINDOW_CONTROLS = True # Default is True
127
+ WB_CODE_BLOCK_SHOW_WINDOW_CONTROLS = True # Default is True
119
128
  ```
120
129
 
121
130
  ---
@@ -153,47 +162,34 @@ class Article(Page):
153
162
 
154
163
  ```html
155
164
  <!-- blog/base.html -->
156
-
157
165
  <!doctype html>
158
-
159
- <html data-theme="luxury">
166
+ <html>
160
167
  <head>
161
168
  <meta charset="UTF-8" />
162
169
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
163
170
  <title>Wagtail Blocks Usage Example</title>
164
171
 
165
- <!--
166
- Do not use in production.
167
- See:
168
- - https://tailwindcss.com/docs/installation
169
- -->
170
- <link href="https://cdn.jsdelivr.net/npm/daisyui@5" rel="stylesheet" type="text/css" />
171
- <link href="https://cdn.jsdelivr.net/npm/daisyui@5/themes.css" rel="stylesheet" type="text/css" />
172
- <script src="https://cdn.jsdelivr.net/npm/@tailwindcss/browser@4"></script>
173
-
174
172
  <!-- Code highlighting for CodeBlock -->
175
- <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.11.1/highlight.min.js"></script>
176
173
  <link
177
174
  rel="stylesheet"
178
175
  href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.11.1/styles/github-dark.min.css"
179
176
  />
177
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.11.1/highlight.min.js"></script>
180
178
  <script>hljs.highlightAll();</script>
181
-
182
- <!-- If you already using TailwindCSS and daisyUI you can include -->
179
+
180
+ <!-- Include stylesheet -->
183
181
  {% load static %}
184
182
  <link href="{% static 'wagtail_blocks/css/styles.css' %}" rel="stylesheet" type="text/css" />
185
183
  </head>
186
184
 
187
185
  <body>
188
- <!--
189
- Requires TailwindCSS Typography plugin.
190
- "@tailwindcss/typography": https://github.com/tailwindlabs/tailwindcss-typography
191
- -->
192
- <main class="prose mx-auto prose-sm prose-video:rounded-box xl:prose-lg 2xl:prose-xl prose-headings:text-primary prose-img:rounded-box prose-img:w-full">
193
- {{ article.content }}
186
+ <main>
187
+ <h1>{{ article.title }}</h1>
188
+
189
+ <div>{{ article.content }}</div>
194
190
  </main>
195
191
 
196
- <!-- Lucide icons -->
192
+ <!-- Lucide icons: https://lucide.dev/icons/ -->
197
193
  <script src="https://unpkg.com/lucide@latest"></script>
198
194
  <script>lucide.createIcons();</script>
199
195
 
@@ -206,22 +202,9 @@ class Article(Page):
206
202
 
207
203
  ---
208
204
 
209
- ## Key features
210
-
211
- - **Modern design:** Tailwind CSS + daisyUI styling for clean, responsive layouts.
212
- - **Multiple themes:** All daisyUI themes included, with easy customization.
213
- - **CI/CD:** GitHub Actions pipelines for automated testing and deployment.
214
- - **Dependency management:** Poetry for reproducible, maintainable installs.
215
- - **Code formatting:** Black for consistent, automatic formatting.
216
- - **Linting:** Ruff for fast, comprehensive linting.
217
- - **Testing:** Django test runner for unit and integration tests.
218
- - **Starter configs:** `.gitignore`, `pyproject.toml`, and other essentials included.
219
-
220
- ---
221
-
222
205
  ## Extending
223
206
 
224
- You can easily extend or customize the provided blocks by subclassing them. For example, to create a custom alert block with additional styles:
207
+ You can easily extend or customize the provided blocks by sub-classing them. For example, to create a custom alert block with additional styles:
225
208
 
226
209
  ```python
227
210
  from wagtail_blocks import blocks
@@ -6,7 +6,6 @@
6
6
  [![Code Linting: Ruff](https://github.com/youzarsiph/wagtail-tw-blocks/actions/workflows/ruff.yml/badge.svg)](https://github.com/youzarsiph/wagtail-tw-blocks/actions/workflows/ruff.yml)
7
7
  [![PyPI - Version](https://img.shields.io/pypi/v/wagtail-tw-blocks?logo=pypi&logoColor=white)](https://pypi.org/project/wagtail-tw-blocks/)
8
8
  [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/wagtail-tw-blocks?logo=python&logoColor=white)](https://pypi.org/project/wagtail-tw-blocks/)
9
- [![PyPI - Downloads](https://img.shields.io/pypi/dm/wagtail-tw-blocks?logo=pypi&logoColor=white)](https://pypi.org/project/wagtail-tw-blocks/)
10
9
  [![PyPI - License](https://img.shields.io/pypi/l/wagtail-tw-blocks?logo=pypi&logoColor=white)](https://pypi.org/project/wagtail-tw-blocks/)
11
10
 
12
11
  ## Overview
@@ -15,6 +14,14 @@
15
14
 
16
15
  ---
17
16
 
17
+ ## Key features
18
+
19
+ - **Modern design:** Tailwind CSS + daisyUI styling for clean, responsive layouts.
20
+ - **Multiple themes:** All daisyUI themes included, with easy customization.
21
+ - **CI/CD:** GitHub Actions pipelines for automated testing and deployment.
22
+
23
+ ---
24
+
18
25
  ## Demo
19
26
 
20
27
  [![Demo](https://img.youtube.com/vi/0b0dZByyPok/maxresdefault.jpg)](https://youtu.be/0b0dZByyPok)
@@ -71,7 +78,7 @@ You can customize the behavior of `wagtail-tw-blocks` by adding the following se
71
78
  # project/settings.py
72
79
 
73
80
  # Extend or override the default programming languages for the CodeBlock
74
- WAGTAIL_BLOCKS_PROGRAMMING_LANGUAGES = [
81
+ WB_CODE_BLOCK_PROGRAMMING_LANGUAGES = [
75
82
  ('python', 'Python'),
76
83
  ('javascript', 'JavaScript'),
77
84
  ('html', 'HTML'),
@@ -85,14 +92,17 @@ WAGTAIL_BLOCKS_PROGRAMMING_LANGUAGES = [
85
92
  # ...
86
93
  ]
87
94
 
95
+ # Show or hide the header the CodeBlock
96
+ WB_CODE_BLOCK_SHOW_HEADER = True # Default is True
97
+
88
98
  # Show or hide the programming language label in the CodeBlock
89
- WAGTAIL_BLOCKS_SHOW_PROGRAMMING_LANGUAGE = True # Default is True
99
+ WB_CODE_BLOCK_SHOW_PROGRAMMING_LANGUAGE = True # Default is True
90
100
 
91
101
  # Show or hide the copy button in the CodeBlock
92
- WAGTAIL_BLOCKS_SHOW_COPY_BUTTON = True # Default is True
102
+ WB_CODE_BLOCK_SHOW_COPY_BUTTON = True # Default is True
93
103
 
94
104
  # Show or hide window control buttons in the CodeBlock
95
- WAGTAIL_BLOCKS_SHOW_WINDOW_CONTROLS = True # Default is True
105
+ WB_CODE_BLOCK_SHOW_WINDOW_CONTROLS = True # Default is True
96
106
  ```
97
107
 
98
108
  ---
@@ -130,47 +140,34 @@ class Article(Page):
130
140
 
131
141
  ```html
132
142
  <!-- blog/base.html -->
133
-
134
143
  <!doctype html>
135
-
136
- <html data-theme="luxury">
144
+ <html>
137
145
  <head>
138
146
  <meta charset="UTF-8" />
139
147
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
140
148
  <title>Wagtail Blocks Usage Example</title>
141
149
 
142
- <!--
143
- Do not use in production.
144
- See:
145
- - https://tailwindcss.com/docs/installation
146
- -->
147
- <link href="https://cdn.jsdelivr.net/npm/daisyui@5" rel="stylesheet" type="text/css" />
148
- <link href="https://cdn.jsdelivr.net/npm/daisyui@5/themes.css" rel="stylesheet" type="text/css" />
149
- <script src="https://cdn.jsdelivr.net/npm/@tailwindcss/browser@4"></script>
150
-
151
150
  <!-- Code highlighting for CodeBlock -->
152
- <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.11.1/highlight.min.js"></script>
153
151
  <link
154
152
  rel="stylesheet"
155
153
  href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.11.1/styles/github-dark.min.css"
156
154
  />
155
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.11.1/highlight.min.js"></script>
157
156
  <script>hljs.highlightAll();</script>
158
-
159
- <!-- If you already using TailwindCSS and daisyUI you can include -->
157
+
158
+ <!-- Include stylesheet -->
160
159
  {% load static %}
161
160
  <link href="{% static 'wagtail_blocks/css/styles.css' %}" rel="stylesheet" type="text/css" />
162
161
  </head>
163
162
 
164
163
  <body>
165
- <!--
166
- Requires TailwindCSS Typography plugin.
167
- "@tailwindcss/typography": https://github.com/tailwindlabs/tailwindcss-typography
168
- -->
169
- <main class="prose mx-auto prose-sm prose-video:rounded-box xl:prose-lg 2xl:prose-xl prose-headings:text-primary prose-img:rounded-box prose-img:w-full">
170
- {{ article.content }}
164
+ <main>
165
+ <h1>{{ article.title }}</h1>
166
+
167
+ <div>{{ article.content }}</div>
171
168
  </main>
172
169
 
173
- <!-- Lucide icons -->
170
+ <!-- Lucide icons: https://lucide.dev/icons/ -->
174
171
  <script src="https://unpkg.com/lucide@latest"></script>
175
172
  <script>lucide.createIcons();</script>
176
173
 
@@ -183,22 +180,9 @@ class Article(Page):
183
180
 
184
181
  ---
185
182
 
186
- ## Key features
187
-
188
- - **Modern design:** Tailwind CSS + daisyUI styling for clean, responsive layouts.
189
- - **Multiple themes:** All daisyUI themes included, with easy customization.
190
- - **CI/CD:** GitHub Actions pipelines for automated testing and deployment.
191
- - **Dependency management:** Poetry for reproducible, maintainable installs.
192
- - **Code formatting:** Black for consistent, automatic formatting.
193
- - **Linting:** Ruff for fast, comprehensive linting.
194
- - **Testing:** Django test runner for unit and integration tests.
195
- - **Starter configs:** `.gitignore`, `pyproject.toml`, and other essentials included.
196
-
197
- ---
198
-
199
183
  ## Extending
200
184
 
201
- You can easily extend or customize the provided blocks by subclassing them. For example, to create a custom alert block with additional styles:
185
+ You can easily extend or customize the provided blocks by sub-classing them. For example, to create a custom alert block with additional styles:
202
186
 
203
187
  ```python
204
188
  from wagtail_blocks import blocks
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "wagtail-tw-blocks"
3
- version = "0.2.6"
3
+ version = "0.3.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"
@@ -11,9 +11,9 @@ repository = "https://github.com/youzarsiph/wagtail-tw-blocks"
11
11
  documentation = "https://github.com/youzarsiph/wagtail-tw-blocks"
12
12
 
13
13
  [tool.poetry.dependencies]
14
- python = ">=3.10"
14
+ python = ">=3.11"
15
15
  django = ">=5.2.1"
16
- wagtail = ">=7.0"
16
+ wagtail = ">=7.2"
17
17
 
18
18
  [tool.poetry.group.dev.dependencies]
19
19
  black = ">=25.1.0"
@@ -18,25 +18,31 @@ from wagtail_blocks import (
18
18
  # Settings
19
19
  PROGRAMMING_LANGUAGES = getattr(
20
20
  settings,
21
- "WAGTAIL_BLOCKS_PROGRAMMING_LANGUAGES",
21
+ "WB_CODE_BLOCK_PROGRAMMING_LANGUAGES",
22
22
  PROGRAMMING_LANGUAGES,
23
23
  )
24
24
 
25
+ SHOW_HEADER = getattr(
26
+ settings,
27
+ "WB_CODE_BLOCK_SHOW_HEADER",
28
+ True,
29
+ )
30
+
25
31
  SHOW_PROGRAMMING_LANGUAGE = getattr(
26
32
  settings,
27
- "WAGTAIL_BLOCKS_SHOW_PROGRAMMING_LANGUAGE",
33
+ "WB_CODE_BLOCK_SHOW_PROGRAMMING_LANGUAGE",
28
34
  True,
29
35
  )
30
36
 
31
37
  SHOW_COPY_BUTTON = getattr(
32
38
  settings,
33
- "WAGTAIL_BLOCKS_SHOW_COPY_BUTTON",
39
+ "WB_CODE_BLOCK_SHOW_COPY_BUTTON",
34
40
  True,
35
41
  )
36
42
 
37
43
  SHOW_WINDOW_CONTROLS = getattr(
38
44
  settings,
39
- "WAGTAIL_BLOCKS_SHOW_WINDOW_CONTROLS",
45
+ "WB_CODE_BLOCK_SHOW_WINDOW_CONTROLS",
40
46
  True,
41
47
  )
42
48
 
@@ -136,6 +142,11 @@ class AccordionBlock(blocks.StructBlock):
136
142
  required=False,
137
143
  help_text=_("Accordion style"),
138
144
  )
145
+ is_joined = blocks.BooleanBlock(
146
+ default=False,
147
+ required=False,
148
+ help_text=_("Designates if accordion is joined"),
149
+ )
139
150
  items = blocks.ListBlock(
140
151
  AccordionItem(),
141
152
  required=True,
@@ -242,6 +253,11 @@ class CarouselBlock(blocks.StructBlock):
242
253
  class CodeBlock(blocks.StructBlock):
243
254
  """Code block is used to show a block of code in a box that looks like a code editor."""
244
255
 
256
+ show_header = blocks.BooleanBlock(
257
+ default=SHOW_PROGRAMMING_LANGUAGE,
258
+ required=False,
259
+ help_text=_("Whether to show or hide the header"),
260
+ )
245
261
  show_language = blocks.BooleanBlock(
246
262
  default=SHOW_PROGRAMMING_LANGUAGE,
247
263
  required=False,
@@ -323,6 +339,8 @@ class FABBlock(blocks.StructBlock):
323
339
  )
324
340
  items = blocks.ListBlock(
325
341
  ButtonBlock(),
342
+ max_num=4,
343
+ min_num=1,
326
344
  required=True,
327
345
  help_text=_("FAB items"),
328
346
  )
@@ -352,12 +370,14 @@ class HoverGalleryBlock(blocks.StructBlock):
352
370
  """
353
371
  Hover Gallery is container of images.
354
372
  The first image is visible be default and when we hover it horizontally,
355
- other images show up. Hover Gallery is useful for product cards in ecommerce sites,
356
- portfoilios or in image galleries. Hover Gallery can include up to 10 images.
373
+ other images show up. Hover Gallery is useful for product cards in e-commerce sites,
374
+ portfolios or in image galleries. Hover Gallery can include up to 10 images.
357
375
  """
358
376
 
359
377
  items = blocks.ListBlock(
360
378
  HoverGalleryItem(),
379
+ max_num=10,
380
+ min_num=2,
361
381
  required=True,
362
382
  help_text=_("Gallery items"),
363
383
  )