wagtail-tw-blocks 0.2.6__py3-none-any.whl → 0.3.0__py3-none-any.whl

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.
@@ -4,6 +4,7 @@
4
4
  <div
5
5
  class="card card-sm lg:card-md 2xl:card-lg border border-base-300 bg-base-200"
6
6
  >
7
+ {% if self.show_header %}
7
8
  <div class="flex items-center justify-between gap-4 p-2">
8
9
  {% if self.show_window_btns %}
9
10
  <div class="flex items-center gap-2">
@@ -56,6 +57,7 @@
56
57
  {% endif %}
57
58
  </div>
58
59
  </div>
60
+ {% endif %}
59
61
 
60
62
  <pre
61
63
  class="overflow-x-auto max-w-full rounded-box overflow-clip"
@@ -8,7 +8,7 @@
8
8
  type="radio"
9
9
  aria-label="{{ item.title }}"
10
10
  name="{{ self.name|slugify }}"
11
- checked="{% if item.is_selected %}true{% else %}false{% endif %}"
11
+ {% if item.is_selected %}checked{% endif %}
12
12
  />
13
13
  <div
14
14
  class="tab-content bg-base-100 border-base-300 p-4 {% if self.style != 'lift' %} rounded-field {% endif %}"
@@ -0,0 +1,92 @@
1
+ <!-- Accordion styles -->
2
+ <div class="collapse collapse-arrow"></div>
3
+ <div class="collapse collapse-plus"></div>
4
+
5
+ <!-- Alert styles -->
6
+ <div class="alert alert-info"></div>
7
+ <div class="alert alert-success"></div>
8
+ <div class="alert alert-warning"></div>
9
+ <div class="alert alert-info"></div>
10
+ <!-- Soft -->
11
+ <div class="alert alert-soft alert-info"></div>
12
+ <div class="alert alert-soft alert-success"></div>
13
+ <div class="alert alert-soft alert-warning"></div>
14
+ <div class="alert alert-soft alert-info"></div>
15
+ <!-- Outline -->
16
+ <div class="alert alert-outline alert-info"></div>
17
+ <div class="alert alert-outline alert-success"></div>
18
+ <div class="alert alert-outline alert-warning"></div>
19
+ <div class="alert alert-outline alert-info"></div>
20
+ <!-- Dash -->
21
+ <div class="alert alert-dash alert-info"></div>
22
+ <div class="alert alert-dash alert-success"></div>
23
+ <div class="alert alert-dash alert-warning"></div>
24
+ <div class="alert alert-dash alert-info"></div>
25
+
26
+ <!-- Buttons -->
27
+ <button class="btn btn-primary"></button>
28
+ <button class="btn btn-secondary"></button>
29
+ <button class="btn btn-accent"></button>
30
+ <button class="btn btn-info"></button>
31
+ <button class="btn btn-success"></button>
32
+ <button class="btn btn-warning"></button>
33
+ <button class="btn btn-error"></button>
34
+ <!-- Soft -->
35
+ <button class="btn btn-soft btn-primary"></button>
36
+ <button class="btn btn-soft btn-secondary"></button>
37
+ <button class="btn btn-soft btn-accent"></button>
38
+ <button class="btn btn-soft btn-info"></button>
39
+ <button class="btn btn-soft btn-success"></button>
40
+ <button class="btn btn-soft btn-warning"></button>
41
+ <button class="btn btn-soft btn-error"></button>
42
+ <!-- Outline -->
43
+ <button class="btn btn-outline btn-primary"></button>
44
+ <button class="btn btn-outline btn-secondary"></button>
45
+ <button class="btn btn-outline btn-accent"></button>
46
+ <button class="btn btn-outline btn-info"></button>
47
+ <button class="btn btn-outline btn-success"></button>
48
+ <button class="btn btn-outline btn-warning"></button>
49
+ <button class="btn btn-outline btn-error"></button>
50
+ <!-- Dash -->
51
+ <button class="btn btn-dash btn-primary"></button>
52
+ <button class="btn btn-dash btn-secondary"></button>
53
+ <button class="btn btn-dash btn-accent"></button>
54
+ <button class="btn btn-dash btn-info"></button>
55
+ <button class="btn btn-dash btn-success"></button>
56
+ <button class="btn btn-dash btn-warning"></button>
57
+ <button class="btn btn-dash btn-error"></button>
58
+ <!-- Ghost -->
59
+ <button class="btn btn-ghost btn-primary"></button>
60
+ <button class="btn btn-ghost btn-secondary"></button>
61
+ <button class="btn btn-ghost btn-accent"></button>
62
+ <button class="btn btn-ghost btn-info"></button>
63
+ <button class="btn btn-ghost btn-success"></button>
64
+ <button class="btn btn-ghost btn-warning"></button>
65
+ <button class="btn btn-ghost btn-error"></button>
66
+ <!-- Link -->
67
+ <button class="btn btn-link btn-primary"></button>
68
+ <button class="btn btn-link btn-secondary"></button>
69
+ <button class="btn btn-link btn-accent"></button>
70
+ <button class="btn btn-link btn-info"></button>
71
+ <button class="btn btn-link btn-success"></button>
72
+ <button class="btn btn-link btn-warning"></button>
73
+ <button class="btn btn-link btn-error"></button>
74
+ <!-- Shapes -->
75
+ <button class="btn btn-wide"></button>
76
+ <button class="btn btn-circle"></button>
77
+ <button class="btn btn-square"></button>
78
+ <button class="btn btn-block"></button>
79
+
80
+ <!-- Tabs -->
81
+ <div class="tabs tabs-border"></div>
82
+ <div class="tabs tabs-box"></div>
83
+ <div class="tabs tabs-lift"></div>
84
+
85
+ <!-- Tooltips -->
86
+ <button class="tooltip tooltip-primary"></button>
87
+ <button class="tooltip tooltip-secondary"></button>
88
+ <button class="tooltip tooltip-accent"></button>
89
+ <button class="tooltip tooltip-info"></button>
90
+ <button class="tooltip tooltip-success"></button>
91
+ <button class="tooltip tooltip-warning"></button>
92
+ <button class="tooltip tooltip-error"></button>
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: wagtail-tw-blocks
3
- Version: 0.2.6
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
  [![Demo](https://img.youtube.com/vi/0b0dZByyPok/maxresdefault.jpg)](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
- WAGTAIL_BLOCKS_PROGRAMMING_LANGUAGES = [
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
- WAGTAIL_BLOCKS_SHOW_PROGRAMMING_LANGUAGE = True # Default is True
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
- WAGTAIL_BLOCKS_SHOW_COPY_BUTTON = True # Default is True
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
- WAGTAIL_BLOCKS_SHOW_WINDOW_CONTROLS = True # Default is True
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
- <!-- If you already using TailwindCSS and daisyUI you can include -->
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
- 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 }}
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 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:
225
210
 
226
211
  ```python
227
212
  from wagtail_blocks import blocks
@@ -1,23 +1,23 @@
1
1
  wagtail_blocks/__init__.py,sha256=qGVWunorLY4__p9PZq4GO5tH3b2V0pm_Jevp17yMA00,1457
2
2
  wagtail_blocks/apps.py,sha256=tOZ8btDhg8nCbNbbjTr6N4MQUEuC600is3PN-ufHJcU,300
3
- wagtail_blocks/blocks.py,sha256=4-uIdXGNyLM_tJSO5Tc-pQa2ZD9qvzzuiNrkzYCZdtg,16284
4
- wagtail_blocks/locale/ar/LC_MESSAGES/django.po,sha256=3XbcsN_AfqrzToffVOJdYnLNfy7KgJtfZukH16YushQ,11267
5
- wagtail_blocks/locale/cn/LC_MESSAGES/django.po,sha256=OMrPVWyT_LKUIPVNF92-d1XgAZK7OVfn79B1v1KATzg,9747
6
- wagtail_blocks/locale/de/LC_MESSAGES/django.po,sha256=3I8I-_-3S6-hvpUReEfOVZR9OT1kt3floXoxSoboL_4,10083
7
- wagtail_blocks/locale/es/LC_MESSAGES/django.po,sha256=50iBTr4cZGt7JRCJbp0EnhH4TQXC6mJSihad5dlBspg,10430
8
- wagtail_blocks/locale/fr/LC_MESSAGES/django.po,sha256=ChjbzWjtWyV4kHo9jP0XcAvLPg6DhCYsMihLIWSBS6g,10501
9
- wagtail_blocks/locale/tr/LC_MESSAGES/django.po,sha256=_RWsr24ML53-48JE_i-yBeuIFVu1sQOB3kTjTE_oJSY,10247
3
+ wagtail_blocks/blocks.py,sha256=rQEu9bZHxNcQpno2Cp6GCP2fJWf3oN6zw2GzfS9h_IY,16759
4
+ wagtail_blocks/locale/ar/LC_MESSAGES/django.po,sha256=1OpxIFu1kc5qESVP6cY6jpNS6rS11XqI88qJPbXFBlg,11540
5
+ wagtail_blocks/locale/cn/LC_MESSAGES/django.po,sha256=bLLPanEQaTW-FYsznbTuOVd-FnWXizgvMjkGLU1N3M8,10180
6
+ wagtail_blocks/locale/de/LC_MESSAGES/django.po,sha256=1n_xdo9vlafI5tJC2eAF60uC0dmjiI4msbXyk5f4Nmk,10580
7
+ wagtail_blocks/locale/es/LC_MESSAGES/django.po,sha256=qaWdqiaNcbgj2Z710rT1ataO6jsFh63JFGlk46_U6U4,10910
8
+ wagtail_blocks/locale/fr/LC_MESSAGES/django.po,sha256=nHEp_ryP4ZgN2WmIJ9cjXqyJGpZC3VEYWOlMXLAX4Tw,11011
9
+ wagtail_blocks/locale/tr/LC_MESSAGES/django.po,sha256=Z-0ZP_vraffI4gk-QZgfQ5qAncBb0HFd1tO2ONk70CM,10776
10
10
  wagtail_blocks/static/wagtail_blocks/.prettierrc,sha256=GyU5YqXRkB3eeDxAGhpB3jYr_WU3MHW4p60vg_HmoUU,90
11
11
  wagtail_blocks/static/wagtail_blocks/README.md,sha256=8gnnrxo9Ex_Tsn_XqiO-S04CW9uMP5uFc_XWfem72h4,427
12
12
  wagtail_blocks/static/wagtail_blocks/css/app.css,sha256=Y0GHo4GTmQsQookSvtzn9FJSbcfVz96CFPcMA4LtL6I,77
13
- wagtail_blocks/static/wagtail_blocks/css/styles.css,sha256=oP5Ojy6D4_2Ls3a8_L9RauLUO-HSBHinNf6tPvwDjOE,103534
14
- wagtail_blocks/static/wagtail_blocks/package-lock.json,sha256=ivGOewgr-WulpEBmtlR77BdNjE-hwDIZAmQveasZczY,44828
15
- wagtail_blocks/static/wagtail_blocks/package.json,sha256=I5W_VgxuzetBjom6i4Ht3m65SOQUMucLnO-xE49cH0M,259
16
- wagtail_blocks/templates/wagtail_blocks/blocks/accordion.html,sha256=wYWmCIFLr7BVlyuLFk6dJIyY0KunpGUR8xe0cKE2U9U,742
17
- wagtail_blocks/templates/wagtail_blocks/blocks/alert.html,sha256=B12Q20tYj-xvEbggZ4YUoXuxrqNAe85oLnDAdmFXcak,800
13
+ wagtail_blocks/static/wagtail_blocks/css/styles.css,sha256=xo2m_t2Wjo9uKdBqeiXGUrYs0TFeeX1eJ-mb5qYVHhQ,117009
14
+ wagtail_blocks/static/wagtail_blocks/package-lock.json,sha256=OMukNRBK4nHD5_zsvfZeSagF6ieziZlbze13W2-Kk9Y,44825
15
+ wagtail_blocks/static/wagtail_blocks/package.json,sha256=-gAB7f7dh_wzjbNz6A6p_-LwOOU5eOZaLPVTX20DpbM,258
16
+ wagtail_blocks/templates/wagtail_blocks/blocks/accordion.html,sha256=a5qpl0QT-xrYrutXKaClQCrrbJzb4MYBQ0W0CWvGj1Y,1519
17
+ wagtail_blocks/templates/wagtail_blocks/blocks/alert.html,sha256=uxmkHskzqXvt5SdxP-L7vbNh7drceStSenpnxnRHPV0,796
18
18
  wagtail_blocks/templates/wagtail_blocks/blocks/browser.html,sha256=377dESgmWidAz-eKjz1PWBFQua7aCiE0tP1sbeXGHEo,400
19
19
  wagtail_blocks/templates/wagtail_blocks/blocks/carousel.html,sha256=PO2QF6L--I-YCUAVARrggqjztoisyhJnF76pc8ywX4A,2001
20
- wagtail_blocks/templates/wagtail_blocks/blocks/code.html,sha256=JfhEDn-kS-24RbK0CvCB24wzg357cDmljod_yhs5G8w,2116
20
+ wagtail_blocks/templates/wagtail_blocks/blocks/code.html,sha256=sNNNhsxR8qOzmB27wXQtrQlL9QPsWo70EWD97R7wq3Y,2162
21
21
  wagtail_blocks/templates/wagtail_blocks/blocks/code_mockup.html,sha256=ffl7vWFkR_hWh96GfsqIcl7dhcYj6wjgg8MbFviTwOo,637
22
22
  wagtail_blocks/templates/wagtail_blocks/blocks/diff.html,sha256=Z1QuQIEbS-D86Uvv2y607C0i_V3k6FYQAkJEx7a5zt8,419
23
23
  wagtail_blocks/templates/wagtail_blocks/blocks/fab.html,sha256=Brr-te1a99Lumj8yeNInaDGlX6XlNqE9p3Jn--hKsvk,1487
@@ -26,11 +26,12 @@ wagtail_blocks/templates/wagtail_blocks/blocks/image.html,sha256=7U3rz55K2Fy49uM
26
26
  wagtail_blocks/templates/wagtail_blocks/blocks/list.html,sha256=MnOJ7JY4dKTe6jeUZHD7xbLKmP_xgGy9fLxlOkVce1Q,1660
27
27
  wagtail_blocks/templates/wagtail_blocks/blocks/phone.html,sha256=28i0jvs0fSdxFIFSFdCODsiuYluk7rRdonmbtnAbva0,333
28
28
  wagtail_blocks/templates/wagtail_blocks/blocks/steps.html,sha256=tsyT1vQU0YM5tAoy0TRpqVnU4GReXxio10h6970Dh4o,406
29
- wagtail_blocks/templates/wagtail_blocks/blocks/tabs.html,sha256=e2NoRWPcNXewGsN2-c2Qk7bOefiaCjpl29e5kSflXPE,752
29
+ wagtail_blocks/templates/wagtail_blocks/blocks/tabs.html,sha256=raxO1nNfhVCG4bbCP5Ov1ilyNYWSXyUmj8AkEqaJ2EU,730
30
30
  wagtail_blocks/templates/wagtail_blocks/blocks/timeline.html,sha256=EcL0L6H1UZlMk0emMucNeLCPpkkhKBzQqFf0do2m9MM,853
31
31
  wagtail_blocks/templates/wagtail_blocks/blocks/toast.html,sha256=sE6bdgwgg15G-5qUsaA2T0ixfRcK5_bCzbfqKc0-WyU,192
32
32
  wagtail_blocks/templates/wagtail_blocks/blocks/window.html,sha256=sw6GqkU32J9pOZ5WQsLubSBicZBnjxNDKPK2Drx7aBQ,244
33
- wagtail_tw_blocks-0.2.6.dist-info/METADATA,sha256=2jDXA_R8zYyqPy8SmVdjbAllqEMVMYm0SGROk4Vg8ho,9133
34
- wagtail_tw_blocks-0.2.6.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
35
- wagtail_tw_blocks-0.2.6.dist-info/licenses/LICENSE,sha256=RkaGOqhDfc5U9-5mc3OHBMOo1VW7UOb8JQ614C0kqm4,1074
36
- wagtail_tw_blocks-0.2.6.dist-info/RECORD,,
33
+ wagtail_blocks/templates/wagtail_blocks/styles.html,sha256=PCecVvYDEUM8ooSjTbycswSrFIwEy208cpCfOhdOONs,3779
34
+ wagtail_tw_blocks-0.3.0.dist-info/METADATA,sha256=G40-Q2_AIUi91dBdKoESm6I8gboMPhuF2SpKeO6zCYc,8184
35
+ wagtail_tw_blocks-0.3.0.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
36
+ wagtail_tw_blocks-0.3.0.dist-info/licenses/LICENSE,sha256=RkaGOqhDfc5U9-5mc3OHBMOo1VW7UOb8JQ614C0kqm4,1074
37
+ wagtail_tw_blocks-0.3.0.dist-info/RECORD,,