wagtail-tw-blocks 0.2.5__tar.gz → 0.3.0__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.5 → wagtail_tw_blocks-0.3.0}/PKG-INFO +26 -43
  2. {wagtail_tw_blocks-0.2.5 → wagtail_tw_blocks-0.3.0}/README.md +25 -42
  3. {wagtail_tw_blocks-0.2.5 → wagtail_tw_blocks-0.3.0}/pyproject.toml +1 -1
  4. {wagtail_tw_blocks-0.2.5 → wagtail_tw_blocks-0.3.0}/wagtail_blocks/blocks.py +32 -12
  5. wagtail_tw_blocks-0.3.0/wagtail_blocks/locale/ar/LC_MESSAGES/django.po +401 -0
  6. wagtail_tw_blocks-0.3.0/wagtail_blocks/locale/cn/LC_MESSAGES/django.po +408 -0
  7. wagtail_tw_blocks-0.3.0/wagtail_blocks/locale/de/LC_MESSAGES/django.po +408 -0
  8. wagtail_tw_blocks-0.3.0/wagtail_blocks/locale/es/LC_MESSAGES/django.po +408 -0
  9. wagtail_tw_blocks-0.3.0/wagtail_blocks/locale/fr/LC_MESSAGES/django.po +409 -0
  10. wagtail_tw_blocks-0.3.0/wagtail_blocks/locale/tr/LC_MESSAGES/django.po +409 -0
  11. wagtail_tw_blocks-0.3.0/wagtail_blocks/static/wagtail_blocks/css/styles.css +2 -0
  12. {wagtail_tw_blocks-0.2.5 → wagtail_tw_blocks-0.3.0}/wagtail_blocks/static/wagtail_blocks/package-lock.json +4 -4
  13. {wagtail_tw_blocks-0.2.5 → wagtail_tw_blocks-0.3.0}/wagtail_blocks/static/wagtail_blocks/package.json +1 -1
  14. wagtail_tw_blocks-0.3.0/wagtail_blocks/templates/wagtail_blocks/blocks/accordion.html +49 -0
  15. {wagtail_tw_blocks-0.2.5 → wagtail_tw_blocks-0.3.0}/wagtail_blocks/templates/wagtail_blocks/blocks/alert.html +1 -1
  16. {wagtail_tw_blocks-0.2.5 → wagtail_tw_blocks-0.3.0}/wagtail_blocks/templates/wagtail_blocks/blocks/code.html +2 -0
  17. {wagtail_tw_blocks-0.2.5 → wagtail_tw_blocks-0.3.0}/wagtail_blocks/templates/wagtail_blocks/blocks/tabs.html +1 -1
  18. wagtail_tw_blocks-0.3.0/wagtail_blocks/templates/wagtail_blocks/styles.html +92 -0
  19. wagtail_tw_blocks-0.2.5/wagtail_blocks/static/wagtail_blocks/css/styles.css +0 -2
  20. wagtail_tw_blocks-0.2.5/wagtail_blocks/templates/wagtail_blocks/blocks/accordion.html +0 -24
  21. {wagtail_tw_blocks-0.2.5 → wagtail_tw_blocks-0.3.0}/LICENSE +0 -0
  22. {wagtail_tw_blocks-0.2.5 → wagtail_tw_blocks-0.3.0}/wagtail_blocks/__init__.py +0 -0
  23. {wagtail_tw_blocks-0.2.5 → wagtail_tw_blocks-0.3.0}/wagtail_blocks/apps.py +0 -0
  24. {wagtail_tw_blocks-0.2.5 → wagtail_tw_blocks-0.3.0}/wagtail_blocks/static/wagtail_blocks/.prettierrc +0 -0
  25. {wagtail_tw_blocks-0.2.5 → wagtail_tw_blocks-0.3.0}/wagtail_blocks/static/wagtail_blocks/README.md +0 -0
  26. {wagtail_tw_blocks-0.2.5 → wagtail_tw_blocks-0.3.0}/wagtail_blocks/static/wagtail_blocks/css/app.css +0 -0
  27. {wagtail_tw_blocks-0.2.5 → wagtail_tw_blocks-0.3.0}/wagtail_blocks/templates/wagtail_blocks/blocks/browser.html +0 -0
  28. {wagtail_tw_blocks-0.2.5 → wagtail_tw_blocks-0.3.0}/wagtail_blocks/templates/wagtail_blocks/blocks/carousel.html +0 -0
  29. {wagtail_tw_blocks-0.2.5 → wagtail_tw_blocks-0.3.0}/wagtail_blocks/templates/wagtail_blocks/blocks/code_mockup.html +0 -0
  30. {wagtail_tw_blocks-0.2.5 → wagtail_tw_blocks-0.3.0}/wagtail_blocks/templates/wagtail_blocks/blocks/diff.html +0 -0
  31. {wagtail_tw_blocks-0.2.5 → wagtail_tw_blocks-0.3.0}/wagtail_blocks/templates/wagtail_blocks/blocks/fab.html +0 -0
  32. {wagtail_tw_blocks-0.2.5 → wagtail_tw_blocks-0.3.0}/wagtail_blocks/templates/wagtail_blocks/blocks/hover_gallery.html +0 -0
  33. {wagtail_tw_blocks-0.2.5 → wagtail_tw_blocks-0.3.0}/wagtail_blocks/templates/wagtail_blocks/blocks/image.html +0 -0
  34. {wagtail_tw_blocks-0.2.5 → wagtail_tw_blocks-0.3.0}/wagtail_blocks/templates/wagtail_blocks/blocks/list.html +0 -0
  35. {wagtail_tw_blocks-0.2.5 → wagtail_tw_blocks-0.3.0}/wagtail_blocks/templates/wagtail_blocks/blocks/phone.html +0 -0
  36. {wagtail_tw_blocks-0.2.5 → wagtail_tw_blocks-0.3.0}/wagtail_blocks/templates/wagtail_blocks/blocks/steps.html +0 -0
  37. {wagtail_tw_blocks-0.2.5 → wagtail_tw_blocks-0.3.0}/wagtail_blocks/templates/wagtail_blocks/blocks/timeline.html +0 -0
  38. {wagtail_tw_blocks-0.2.5 → wagtail_tw_blocks-0.3.0}/wagtail_blocks/templates/wagtail_blocks/blocks/toast.html +0 -0
  39. {wagtail_tw_blocks-0.2.5 → wagtail_tw_blocks-0.3.0}/wagtail_blocks/templates/wagtail_blocks/blocks/window.html +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: wagtail-tw-blocks
3
- Version: 0.2.5
3
+ Version: 0.3.0
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
@@ -27,8 +27,6 @@ Description-Content-Type: text/markdown
27
27
  [![CD](https://github.com/youzarsiph/wagtail-tw-blocks/actions/workflows/cd.yml/badge.svg)](https://github.com/youzarsiph/wagtail-tw-blocks/actions/workflows/cd.yml)
28
28
  [![Code Style: Black](https://github.com/youzarsiph/wagtail-tw-blocks/actions/workflows/black.yml/badge.svg)](https://github.com/youzarsiph/wagtail-tw-blocks/actions/workflows/black.yml)
29
29
  [![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
- [![Docker Image](https://github.com/youzarsiph/wagtail-tw-blocks/actions/workflows/docker-image.yml/badge.svg)](https://github.com/youzarsiph/wagtail-tw-blocks/actions/workflows/docker-image.yml)
31
- [![Docker Publish](https://github.com/youzarsiph/wagtail-tw-blocks/actions/workflows/docker-publish.yml/badge.svg)](https://github.com/youzarsiph/wagtail-tw-blocks/actions/workflows/docker-publish.yml)
32
30
  [![PyPI - Version](https://img.shields.io/pypi/v/wagtail-tw-blocks?logo=pypi&logoColor=white)](https://pypi.org/project/wagtail-tw-blocks/)
33
31
  [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/wagtail-tw-blocks?logo=python&logoColor=white)](https://pypi.org/project/wagtail-tw-blocks/)
34
32
  [![PyPI - Downloads](https://img.shields.io/pypi/dm/wagtail-tw-blocks?logo=pypi&logoColor=white)](https://pypi.org/project/wagtail-tw-blocks/)
@@ -40,6 +38,14 @@ Description-Content-Type: text/markdown
40
38
 
41
39
  ---
42
40
 
41
+ ## Key features
42
+
43
+ - **Modern design:** Tailwind CSS + daisyUI styling for clean, responsive layouts.
44
+ - **Multiple themes:** All daisyUI themes included, with easy customization.
45
+ - **CI/CD:** GitHub Actions pipelines for automated testing and deployment.
46
+
47
+ ---
48
+
43
49
  ## Demo
44
50
 
45
51
  [![Demo](https://img.youtube.com/vi/0b0dZByyPok/maxresdefault.jpg)](https://youtu.be/0b0dZByyPok)
@@ -96,7 +102,7 @@ You can customize the behavior of `wagtail-tw-blocks` by adding the following se
96
102
  # project/settings.py
97
103
 
98
104
  # Extend or override the default programming languages for the CodeBlock
99
- WAGTAIL_BLOCKS_PROGRAMMING_LANGUAGES = [
105
+ WB_CODE_BLOCK_PROGRAMMING_LANGUAGES = [
100
106
  ('python', 'Python'),
101
107
  ('javascript', 'JavaScript'),
102
108
  ('html', 'HTML'),
@@ -110,14 +116,17 @@ WAGTAIL_BLOCKS_PROGRAMMING_LANGUAGES = [
110
116
  # ...
111
117
  ]
112
118
 
119
+ # Show or hide the header the CodeBlock
120
+ WB_CODE_BLOCK_SHOW_HEADER = True # Default is True
121
+
113
122
  # Show or hide the programming language label in the CodeBlock
114
- WAGTAIL_BLOCKS_SHOW_PROGRAMMING_LANGUAGE = True # Default is True
123
+ WB_CODE_BLOCK_SHOW_PROGRAMMING_LANGUAGE = True # Default is True
115
124
 
116
125
  # Show or hide the copy button in the CodeBlock
117
- WAGTAIL_BLOCKS_SHOW_COPY_BUTTON = True # Default is True
126
+ WB_CODE_BLOCK_SHOW_COPY_BUTTON = True # Default is True
118
127
 
119
128
  # Show or hide window control buttons in the CodeBlock
120
- WAGTAIL_BLOCKS_SHOW_WINDOW_CONTROLS = True # Default is True
129
+ WB_CODE_BLOCK_SHOW_WINDOW_CONTROLS = True # Default is True
121
130
  ```
122
131
 
123
132
  ---
@@ -155,47 +164,34 @@ class Article(Page):
155
164
 
156
165
  ```html
157
166
  <!-- blog/base.html -->
158
-
159
167
  <!doctype html>
160
-
161
- <html data-theme="luxury">
168
+ <html>
162
169
  <head>
163
170
  <meta charset="UTF-8" />
164
171
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
165
172
  <title>Wagtail Blocks Usage Example</title>
166
173
 
167
- <!--
168
- Do not use in production.
169
- See:
170
- - https://tailwindcss.com/docs/installation
171
- -->
172
- <link href="https://cdn.jsdelivr.net/npm/daisyui@5" rel="stylesheet" type="text/css" />
173
- <link href="https://cdn.jsdelivr.net/npm/daisyui@5/themes.css" rel="stylesheet" type="text/css" />
174
- <script src="https://cdn.jsdelivr.net/npm/@tailwindcss/browser@4"></script>
175
-
176
174
  <!-- Code highlighting for CodeBlock -->
177
- <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.11.1/highlight.min.js"></script>
178
175
  <link
179
176
  rel="stylesheet"
180
177
  href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.11.1/styles/github-dark.min.css"
181
178
  />
179
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.11.1/highlight.min.js"></script>
182
180
  <script>hljs.highlightAll();</script>
183
-
184
- <!-- If you already using TailwindCSS and daisyUI you can include -->
181
+
182
+ <!-- Include stylesheet -->
185
183
  {% load static %}
186
184
  <link href="{% static 'wagtail_blocks/css/styles.css' %}" rel="stylesheet" type="text/css" />
187
185
  </head>
188
186
 
189
187
  <body>
190
- <!--
191
- Requires TailwindCSS Typography plugin.
192
- "@tailwindcss/typography": https://github.com/tailwindlabs/tailwindcss-typography
193
- -->
194
- <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">
195
- {{ article.content }}
188
+ <main>
189
+ <h1>{{ article.title }}</h1>
190
+
191
+ <div>{{ article.content }}</div>
196
192
  </main>
197
193
 
198
- <!-- Lucide icons -->
194
+ <!-- Lucide icons: https://lucide.dev/icons/ -->
199
195
  <script src="https://unpkg.com/lucide@latest"></script>
200
196
  <script>lucide.createIcons();</script>
201
197
 
@@ -208,22 +204,9 @@ class Article(Page):
208
204
 
209
205
  ---
210
206
 
211
- ## Key features
212
-
213
- - **Modern design:** Tailwind CSS + daisyUI styling for clean, responsive layouts.
214
- - **Multiple themes:** All daisyUI themes included, with easy customization.
215
- - **CI/CD:** GitHub Actions pipelines for automated testing and deployment.
216
- - **Dependency management:** Poetry for reproducible, maintainable installs.
217
- - **Code formatting:** Black for consistent, automatic formatting.
218
- - **Linting:** Ruff for fast, comprehensive linting.
219
- - **Testing:** Django test runner for unit and integration tests.
220
- - **Starter configs:** `.gitignore`, `pyproject.toml`, and other essentials included.
221
-
222
- ---
223
-
224
207
  ## Extending
225
208
 
226
- You can easily extend or customize the provided blocks by subclassing them. For example, to create a custom alert block with additional styles:
209
+ You can easily extend or customize the provided blocks by sub-classing them. For example, to create a custom alert block with additional styles:
227
210
 
228
211
  ```python
229
212
  from wagtail_blocks import blocks
@@ -4,8 +4,6 @@
4
4
  [![CD](https://github.com/youzarsiph/wagtail-tw-blocks/actions/workflows/cd.yml/badge.svg)](https://github.com/youzarsiph/wagtail-tw-blocks/actions/workflows/cd.yml)
5
5
  [![Code Style: Black](https://github.com/youzarsiph/wagtail-tw-blocks/actions/workflows/black.yml/badge.svg)](https://github.com/youzarsiph/wagtail-tw-blocks/actions/workflows/black.yml)
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
- [![Docker Image](https://github.com/youzarsiph/wagtail-tw-blocks/actions/workflows/docker-image.yml/badge.svg)](https://github.com/youzarsiph/wagtail-tw-blocks/actions/workflows/docker-image.yml)
8
- [![Docker Publish](https://github.com/youzarsiph/wagtail-tw-blocks/actions/workflows/docker-publish.yml/badge.svg)](https://github.com/youzarsiph/wagtail-tw-blocks/actions/workflows/docker-publish.yml)
9
7
  [![PyPI - Version](https://img.shields.io/pypi/v/wagtail-tw-blocks?logo=pypi&logoColor=white)](https://pypi.org/project/wagtail-tw-blocks/)
10
8
  [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/wagtail-tw-blocks?logo=python&logoColor=white)](https://pypi.org/project/wagtail-tw-blocks/)
11
9
  [![PyPI - Downloads](https://img.shields.io/pypi/dm/wagtail-tw-blocks?logo=pypi&logoColor=white)](https://pypi.org/project/wagtail-tw-blocks/)
@@ -17,6 +15,14 @@
17
15
 
18
16
  ---
19
17
 
18
+ ## Key features
19
+
20
+ - **Modern design:** Tailwind CSS + daisyUI styling for clean, responsive layouts.
21
+ - **Multiple themes:** All daisyUI themes included, with easy customization.
22
+ - **CI/CD:** GitHub Actions pipelines for automated testing and deployment.
23
+
24
+ ---
25
+
20
26
  ## Demo
21
27
 
22
28
  [![Demo](https://img.youtube.com/vi/0b0dZByyPok/maxresdefault.jpg)](https://youtu.be/0b0dZByyPok)
@@ -73,7 +79,7 @@ You can customize the behavior of `wagtail-tw-blocks` by adding the following se
73
79
  # project/settings.py
74
80
 
75
81
  # Extend or override the default programming languages for the CodeBlock
76
- WAGTAIL_BLOCKS_PROGRAMMING_LANGUAGES = [
82
+ WB_CODE_BLOCK_PROGRAMMING_LANGUAGES = [
77
83
  ('python', 'Python'),
78
84
  ('javascript', 'JavaScript'),
79
85
  ('html', 'HTML'),
@@ -87,14 +93,17 @@ WAGTAIL_BLOCKS_PROGRAMMING_LANGUAGES = [
87
93
  # ...
88
94
  ]
89
95
 
96
+ # Show or hide the header the CodeBlock
97
+ WB_CODE_BLOCK_SHOW_HEADER = True # Default is True
98
+
90
99
  # Show or hide the programming language label in the CodeBlock
91
- WAGTAIL_BLOCKS_SHOW_PROGRAMMING_LANGUAGE = True # Default is True
100
+ WB_CODE_BLOCK_SHOW_PROGRAMMING_LANGUAGE = True # Default is True
92
101
 
93
102
  # Show or hide the copy button in the CodeBlock
94
- WAGTAIL_BLOCKS_SHOW_COPY_BUTTON = True # Default is True
103
+ WB_CODE_BLOCK_SHOW_COPY_BUTTON = True # Default is True
95
104
 
96
105
  # Show or hide window control buttons in the CodeBlock
97
- WAGTAIL_BLOCKS_SHOW_WINDOW_CONTROLS = True # Default is True
106
+ WB_CODE_BLOCK_SHOW_WINDOW_CONTROLS = True # Default is True
98
107
  ```
99
108
 
100
109
  ---
@@ -132,47 +141,34 @@ class Article(Page):
132
141
 
133
142
  ```html
134
143
  <!-- blog/base.html -->
135
-
136
144
  <!doctype html>
137
-
138
- <html data-theme="luxury">
145
+ <html>
139
146
  <head>
140
147
  <meta charset="UTF-8" />
141
148
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
142
149
  <title>Wagtail Blocks Usage Example</title>
143
150
 
144
- <!--
145
- Do not use in production.
146
- See:
147
- - https://tailwindcss.com/docs/installation
148
- -->
149
- <link href="https://cdn.jsdelivr.net/npm/daisyui@5" rel="stylesheet" type="text/css" />
150
- <link href="https://cdn.jsdelivr.net/npm/daisyui@5/themes.css" rel="stylesheet" type="text/css" />
151
- <script src="https://cdn.jsdelivr.net/npm/@tailwindcss/browser@4"></script>
152
-
153
151
  <!-- Code highlighting for CodeBlock -->
154
- <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.11.1/highlight.min.js"></script>
155
152
  <link
156
153
  rel="stylesheet"
157
154
  href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.11.1/styles/github-dark.min.css"
158
155
  />
156
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.11.1/highlight.min.js"></script>
159
157
  <script>hljs.highlightAll();</script>
160
-
161
- <!-- If you already using TailwindCSS and daisyUI you can include -->
158
+
159
+ <!-- Include stylesheet -->
162
160
  {% load static %}
163
161
  <link href="{% static 'wagtail_blocks/css/styles.css' %}" rel="stylesheet" type="text/css" />
164
162
  </head>
165
163
 
166
164
  <body>
167
- <!--
168
- Requires TailwindCSS Typography plugin.
169
- "@tailwindcss/typography": https://github.com/tailwindlabs/tailwindcss-typography
170
- -->
171
- <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">
172
- {{ article.content }}
165
+ <main>
166
+ <h1>{{ article.title }}</h1>
167
+
168
+ <div>{{ article.content }}</div>
173
169
  </main>
174
170
 
175
- <!-- Lucide icons -->
171
+ <!-- Lucide icons: https://lucide.dev/icons/ -->
176
172
  <script src="https://unpkg.com/lucide@latest"></script>
177
173
  <script>lucide.createIcons();</script>
178
174
 
@@ -185,22 +181,9 @@ class Article(Page):
185
181
 
186
182
  ---
187
183
 
188
- ## Key features
189
-
190
- - **Modern design:** Tailwind CSS + daisyUI styling for clean, responsive layouts.
191
- - **Multiple themes:** All daisyUI themes included, with easy customization.
192
- - **CI/CD:** GitHub Actions pipelines for automated testing and deployment.
193
- - **Dependency management:** Poetry for reproducible, maintainable installs.
194
- - **Code formatting:** Black for consistent, automatic formatting.
195
- - **Linting:** Ruff for fast, comprehensive linting.
196
- - **Testing:** Django test runner for unit and integration tests.
197
- - **Starter configs:** `.gitignore`, `pyproject.toml`, and other essentials included.
198
-
199
- ---
200
-
201
184
  ## Extending
202
185
 
203
- You can easily extend or customize the provided blocks by subclassing them. For example, to create a custom alert block with additional styles:
186
+ You can easily extend or customize the provided blocks by sub-classing them. For example, to create a custom alert block with additional styles:
204
187
 
205
188
  ```python
206
189
  from wagtail_blocks import blocks
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "wagtail-tw-blocks"
3
- version = "0.2.5"
3
+ version = "0.3.0"
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"
@@ -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
 
@@ -107,7 +113,7 @@ class AccordionItem(blocks.StructBlock):
107
113
  is_expanded = blocks.BooleanBlock(
108
114
  default=False,
109
115
  required=False,
110
- help_text=_("Wether to show or hide item content"),
116
+ help_text=_("Whether to show or hide item content"),
111
117
  )
112
118
  title = blocks.CharBlock(
113
119
  max_length=64,
@@ -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,20 +253,25 @@ 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,
248
- help_text=_("Wether to show or hide which programming language is used"),
264
+ help_text=_("Whether to show or hide which programming language is used"),
249
265
  )
250
266
  show_copy_btn = blocks.BooleanBlock(
251
267
  default=SHOW_COPY_BUTTON,
252
268
  required=False,
253
- help_text=_("Wether to show or hide copy buttons"),
269
+ help_text=_("Whether to show or hide copy buttons"),
254
270
  )
255
271
  show_window_btns = blocks.BooleanBlock(
256
272
  default=SHOW_WINDOW_CONTROLS,
257
273
  required=False,
258
- help_text=_("Wether to show or hide window buttons"),
274
+ help_text=_("Whether to show or hide window buttons"),
259
275
  )
260
276
  file_name = blocks.CharBlock(
261
277
  max_length=64,
@@ -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
  )
@@ -595,7 +615,7 @@ class PhoneMockupBlock(blocks.StructBlock):
595
615
  show_camera = blocks.BooleanBlock(
596
616
  default=True,
597
617
  required=False,
598
- help_text=_("Wether to show or hide camera"),
618
+ help_text=_("Whether to show or hide camera"),
599
619
  )
600
620
  wallpaper = WImageBlock(
601
621
  required=True,
@@ -615,7 +635,7 @@ class BrowserMockupBlock(blocks.StructBlock):
615
635
  show_url = blocks.BooleanBlock(
616
636
  default=True,
617
637
  required=False,
618
- help_text=_("Wether to show or hide toolbar"),
638
+ help_text=_("Whether to show or hide toolbar"),
619
639
  )
620
640
  url = blocks.URLBlock(
621
641
  required=True,