wagtail-tw-blocks 0.2.6__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.
- {wagtail_tw_blocks-0.2.6 → wagtail_tw_blocks-0.3.0}/PKG-INFO +26 -41
- {wagtail_tw_blocks-0.2.6 → wagtail_tw_blocks-0.3.0}/README.md +25 -40
- {wagtail_tw_blocks-0.2.6 → wagtail_tw_blocks-0.3.0}/pyproject.toml +1 -1
- {wagtail_tw_blocks-0.2.6 → wagtail_tw_blocks-0.3.0}/wagtail_blocks/blocks.py +26 -6
- {wagtail_tw_blocks-0.2.6 → wagtail_tw_blocks-0.3.0}/wagtail_blocks/locale/ar/LC_MESSAGES/django.po +96 -89
- {wagtail_tw_blocks-0.2.6 → wagtail_tw_blocks-0.3.0}/wagtail_blocks/locale/cn/LC_MESSAGES/django.po +98 -83
- {wagtail_tw_blocks-0.2.6 → wagtail_tw_blocks-0.3.0}/wagtail_blocks/locale/de/LC_MESSAGES/django.po +98 -83
- {wagtail_tw_blocks-0.2.6 → wagtail_tw_blocks-0.3.0}/wagtail_blocks/locale/es/LC_MESSAGES/django.po +98 -83
- {wagtail_tw_blocks-0.2.6 → wagtail_tw_blocks-0.3.0}/wagtail_blocks/locale/fr/LC_MESSAGES/django.po +100 -84
- {wagtail_tw_blocks-0.2.6 → wagtail_tw_blocks-0.3.0}/wagtail_blocks/locale/tr/LC_MESSAGES/django.po +98 -83
- wagtail_tw_blocks-0.3.0/wagtail_blocks/static/wagtail_blocks/css/styles.css +2 -0
- {wagtail_tw_blocks-0.2.6 → wagtail_tw_blocks-0.3.0}/wagtail_blocks/static/wagtail_blocks/package-lock.json +4 -4
- {wagtail_tw_blocks-0.2.6 → wagtail_tw_blocks-0.3.0}/wagtail_blocks/static/wagtail_blocks/package.json +1 -1
- wagtail_tw_blocks-0.3.0/wagtail_blocks/templates/wagtail_blocks/blocks/accordion.html +49 -0
- {wagtail_tw_blocks-0.2.6 → wagtail_tw_blocks-0.3.0}/wagtail_blocks/templates/wagtail_blocks/blocks/alert.html +1 -1
- {wagtail_tw_blocks-0.2.6 → wagtail_tw_blocks-0.3.0}/wagtail_blocks/templates/wagtail_blocks/blocks/code.html +2 -0
- {wagtail_tw_blocks-0.2.6 → wagtail_tw_blocks-0.3.0}/wagtail_blocks/templates/wagtail_blocks/blocks/tabs.html +1 -1
- wagtail_tw_blocks-0.3.0/wagtail_blocks/templates/wagtail_blocks/styles.html +92 -0
- wagtail_tw_blocks-0.2.6/wagtail_blocks/static/wagtail_blocks/css/styles.css +0 -2
- wagtail_tw_blocks-0.2.6/wagtail_blocks/templates/wagtail_blocks/blocks/accordion.html +0 -24
- {wagtail_tw_blocks-0.2.6 → wagtail_tw_blocks-0.3.0}/LICENSE +0 -0
- {wagtail_tw_blocks-0.2.6 → wagtail_tw_blocks-0.3.0}/wagtail_blocks/__init__.py +0 -0
- {wagtail_tw_blocks-0.2.6 → wagtail_tw_blocks-0.3.0}/wagtail_blocks/apps.py +0 -0
- {wagtail_tw_blocks-0.2.6 → wagtail_tw_blocks-0.3.0}/wagtail_blocks/static/wagtail_blocks/.prettierrc +0 -0
- {wagtail_tw_blocks-0.2.6 → wagtail_tw_blocks-0.3.0}/wagtail_blocks/static/wagtail_blocks/README.md +0 -0
- {wagtail_tw_blocks-0.2.6 → wagtail_tw_blocks-0.3.0}/wagtail_blocks/static/wagtail_blocks/css/app.css +0 -0
- {wagtail_tw_blocks-0.2.6 → wagtail_tw_blocks-0.3.0}/wagtail_blocks/templates/wagtail_blocks/blocks/browser.html +0 -0
- {wagtail_tw_blocks-0.2.6 → wagtail_tw_blocks-0.3.0}/wagtail_blocks/templates/wagtail_blocks/blocks/carousel.html +0 -0
- {wagtail_tw_blocks-0.2.6 → wagtail_tw_blocks-0.3.0}/wagtail_blocks/templates/wagtail_blocks/blocks/code_mockup.html +0 -0
- {wagtail_tw_blocks-0.2.6 → wagtail_tw_blocks-0.3.0}/wagtail_blocks/templates/wagtail_blocks/blocks/diff.html +0 -0
- {wagtail_tw_blocks-0.2.6 → wagtail_tw_blocks-0.3.0}/wagtail_blocks/templates/wagtail_blocks/blocks/fab.html +0 -0
- {wagtail_tw_blocks-0.2.6 → wagtail_tw_blocks-0.3.0}/wagtail_blocks/templates/wagtail_blocks/blocks/hover_gallery.html +0 -0
- {wagtail_tw_blocks-0.2.6 → wagtail_tw_blocks-0.3.0}/wagtail_blocks/templates/wagtail_blocks/blocks/image.html +0 -0
- {wagtail_tw_blocks-0.2.6 → wagtail_tw_blocks-0.3.0}/wagtail_blocks/templates/wagtail_blocks/blocks/list.html +0 -0
- {wagtail_tw_blocks-0.2.6 → wagtail_tw_blocks-0.3.0}/wagtail_blocks/templates/wagtail_blocks/blocks/phone.html +0 -0
- {wagtail_tw_blocks-0.2.6 → wagtail_tw_blocks-0.3.0}/wagtail_blocks/templates/wagtail_blocks/blocks/steps.html +0 -0
- {wagtail_tw_blocks-0.2.6 → wagtail_tw_blocks-0.3.0}/wagtail_blocks/templates/wagtail_blocks/blocks/timeline.html +0 -0
- {wagtail_tw_blocks-0.2.6 → wagtail_tw_blocks-0.3.0}/wagtail_blocks/templates/wagtail_blocks/blocks/toast.html +0 -0
- {wagtail_tw_blocks-0.2.6 → 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.
|
|
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
|
|
@@ -38,6 +38,14 @@ Description-Content-Type: text/markdown
|
|
|
38
38
|
|
|
39
39
|
---
|
|
40
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
|
+
|
|
41
49
|
## Demo
|
|
42
50
|
|
|
43
51
|
[](https://youtu.be/0b0dZByyPok)
|
|
@@ -94,7 +102,7 @@ You can customize the behavior of `wagtail-tw-blocks` by adding the following se
|
|
|
94
102
|
# project/settings.py
|
|
95
103
|
|
|
96
104
|
# Extend or override the default programming languages for the CodeBlock
|
|
97
|
-
|
|
105
|
+
WB_CODE_BLOCK_PROGRAMMING_LANGUAGES = [
|
|
98
106
|
('python', 'Python'),
|
|
99
107
|
('javascript', 'JavaScript'),
|
|
100
108
|
('html', 'HTML'),
|
|
@@ -108,14 +116,17 @@ WAGTAIL_BLOCKS_PROGRAMMING_LANGUAGES = [
|
|
|
108
116
|
# ...
|
|
109
117
|
]
|
|
110
118
|
|
|
119
|
+
# Show or hide the header the CodeBlock
|
|
120
|
+
WB_CODE_BLOCK_SHOW_HEADER = True # Default is True
|
|
121
|
+
|
|
111
122
|
# Show or hide the programming language label in the CodeBlock
|
|
112
|
-
|
|
123
|
+
WB_CODE_BLOCK_SHOW_PROGRAMMING_LANGUAGE = True # Default is True
|
|
113
124
|
|
|
114
125
|
# Show or hide the copy button in the CodeBlock
|
|
115
|
-
|
|
126
|
+
WB_CODE_BLOCK_SHOW_COPY_BUTTON = True # Default is True
|
|
116
127
|
|
|
117
128
|
# Show or hide window control buttons in the CodeBlock
|
|
118
|
-
|
|
129
|
+
WB_CODE_BLOCK_SHOW_WINDOW_CONTROLS = True # Default is True
|
|
119
130
|
```
|
|
120
131
|
|
|
121
132
|
---
|
|
@@ -153,47 +164,34 @@ class Article(Page):
|
|
|
153
164
|
|
|
154
165
|
```html
|
|
155
166
|
<!-- blog/base.html -->
|
|
156
|
-
|
|
157
167
|
<!doctype html>
|
|
158
|
-
|
|
159
|
-
<html data-theme="luxury">
|
|
168
|
+
<html>
|
|
160
169
|
<head>
|
|
161
170
|
<meta charset="UTF-8" />
|
|
162
171
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
163
172
|
<title>Wagtail Blocks Usage Example</title>
|
|
164
173
|
|
|
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
174
|
<!-- Code highlighting for CodeBlock -->
|
|
175
|
-
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.11.1/highlight.min.js"></script>
|
|
176
175
|
<link
|
|
177
176
|
rel="stylesheet"
|
|
178
177
|
href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.11.1/styles/github-dark.min.css"
|
|
179
178
|
/>
|
|
179
|
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.11.1/highlight.min.js"></script>
|
|
180
180
|
<script>hljs.highlightAll();</script>
|
|
181
|
-
|
|
182
|
-
<!--
|
|
181
|
+
|
|
182
|
+
<!-- Include stylesheet -->
|
|
183
183
|
{% load static %}
|
|
184
184
|
<link href="{% static 'wagtail_blocks/css/styles.css' %}" rel="stylesheet" type="text/css" />
|
|
185
185
|
</head>
|
|
186
186
|
|
|
187
187
|
<body>
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
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 }}
|
|
188
|
+
<main>
|
|
189
|
+
<h1>{{ article.title }}</h1>
|
|
190
|
+
|
|
191
|
+
<div>{{ article.content }}</div>
|
|
194
192
|
</main>
|
|
195
193
|
|
|
196
|
-
<!-- Lucide icons -->
|
|
194
|
+
<!-- Lucide icons: https://lucide.dev/icons/ -->
|
|
197
195
|
<script src="https://unpkg.com/lucide@latest"></script>
|
|
198
196
|
<script>lucide.createIcons();</script>
|
|
199
197
|
|
|
@@ -206,22 +204,9 @@ class Article(Page):
|
|
|
206
204
|
|
|
207
205
|
---
|
|
208
206
|
|
|
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
207
|
## Extending
|
|
223
208
|
|
|
224
|
-
You can easily extend or customize the provided blocks by
|
|
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:
|
|
225
210
|
|
|
226
211
|
```python
|
|
227
212
|
from wagtail_blocks import blocks
|
|
@@ -15,6 +15,14 @@
|
|
|
15
15
|
|
|
16
16
|
---
|
|
17
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
|
+
|
|
18
26
|
## Demo
|
|
19
27
|
|
|
20
28
|
[](https://youtu.be/0b0dZByyPok)
|
|
@@ -71,7 +79,7 @@ You can customize the behavior of `wagtail-tw-blocks` by adding the following se
|
|
|
71
79
|
# project/settings.py
|
|
72
80
|
|
|
73
81
|
# Extend or override the default programming languages for the CodeBlock
|
|
74
|
-
|
|
82
|
+
WB_CODE_BLOCK_PROGRAMMING_LANGUAGES = [
|
|
75
83
|
('python', 'Python'),
|
|
76
84
|
('javascript', 'JavaScript'),
|
|
77
85
|
('html', 'HTML'),
|
|
@@ -85,14 +93,17 @@ WAGTAIL_BLOCKS_PROGRAMMING_LANGUAGES = [
|
|
|
85
93
|
# ...
|
|
86
94
|
]
|
|
87
95
|
|
|
96
|
+
# Show or hide the header the CodeBlock
|
|
97
|
+
WB_CODE_BLOCK_SHOW_HEADER = True # Default is True
|
|
98
|
+
|
|
88
99
|
# Show or hide the programming language label in the CodeBlock
|
|
89
|
-
|
|
100
|
+
WB_CODE_BLOCK_SHOW_PROGRAMMING_LANGUAGE = True # Default is True
|
|
90
101
|
|
|
91
102
|
# Show or hide the copy button in the CodeBlock
|
|
92
|
-
|
|
103
|
+
WB_CODE_BLOCK_SHOW_COPY_BUTTON = True # Default is True
|
|
93
104
|
|
|
94
105
|
# Show or hide window control buttons in the CodeBlock
|
|
95
|
-
|
|
106
|
+
WB_CODE_BLOCK_SHOW_WINDOW_CONTROLS = True # Default is True
|
|
96
107
|
```
|
|
97
108
|
|
|
98
109
|
---
|
|
@@ -130,47 +141,34 @@ class Article(Page):
|
|
|
130
141
|
|
|
131
142
|
```html
|
|
132
143
|
<!-- blog/base.html -->
|
|
133
|
-
|
|
134
144
|
<!doctype html>
|
|
135
|
-
|
|
136
|
-
<html data-theme="luxury">
|
|
145
|
+
<html>
|
|
137
146
|
<head>
|
|
138
147
|
<meta charset="UTF-8" />
|
|
139
148
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
140
149
|
<title>Wagtail Blocks Usage Example</title>
|
|
141
150
|
|
|
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
151
|
<!-- Code highlighting for CodeBlock -->
|
|
152
|
-
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.11.1/highlight.min.js"></script>
|
|
153
152
|
<link
|
|
154
153
|
rel="stylesheet"
|
|
155
154
|
href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.11.1/styles/github-dark.min.css"
|
|
156
155
|
/>
|
|
156
|
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.11.1/highlight.min.js"></script>
|
|
157
157
|
<script>hljs.highlightAll();</script>
|
|
158
|
-
|
|
159
|
-
<!--
|
|
158
|
+
|
|
159
|
+
<!-- Include stylesheet -->
|
|
160
160
|
{% load static %}
|
|
161
161
|
<link href="{% static 'wagtail_blocks/css/styles.css' %}" rel="stylesheet" type="text/css" />
|
|
162
162
|
</head>
|
|
163
163
|
|
|
164
164
|
<body>
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
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 }}
|
|
165
|
+
<main>
|
|
166
|
+
<h1>{{ article.title }}</h1>
|
|
167
|
+
|
|
168
|
+
<div>{{ article.content }}</div>
|
|
171
169
|
</main>
|
|
172
170
|
|
|
173
|
-
<!-- Lucide icons -->
|
|
171
|
+
<!-- Lucide icons: https://lucide.dev/icons/ -->
|
|
174
172
|
<script src="https://unpkg.com/lucide@latest"></script>
|
|
175
173
|
<script>lucide.createIcons();</script>
|
|
176
174
|
|
|
@@ -183,22 +181,9 @@ class Article(Page):
|
|
|
183
181
|
|
|
184
182
|
---
|
|
185
183
|
|
|
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
184
|
## Extending
|
|
200
185
|
|
|
201
|
-
You can easily extend or customize the provided blocks by
|
|
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:
|
|
202
187
|
|
|
203
188
|
```python
|
|
204
189
|
from wagtail_blocks import blocks
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "wagtail-tw-blocks"
|
|
3
|
-
version = "0.
|
|
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
|
-
"
|
|
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
|
-
"
|
|
33
|
+
"WB_CODE_BLOCK_SHOW_PROGRAMMING_LANGUAGE",
|
|
28
34
|
True,
|
|
29
35
|
)
|
|
30
36
|
|
|
31
37
|
SHOW_COPY_BUTTON = getattr(
|
|
32
38
|
settings,
|
|
33
|
-
"
|
|
39
|
+
"WB_CODE_BLOCK_SHOW_COPY_BUTTON",
|
|
34
40
|
True,
|
|
35
41
|
)
|
|
36
42
|
|
|
37
43
|
SHOW_WINDOW_CONTROLS = getattr(
|
|
38
44
|
settings,
|
|
39
|
-
"
|
|
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
|
|
356
|
-
|
|
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
|
)
|