wagtail-tw-blocks 0.2.5__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.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
@@ -1,17 +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=IMF3UWeP1kgbHqHp0dZLFyUT5pocNLXVean1Oe73hHo,16278
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
4
10
  wagtail_blocks/static/wagtail_blocks/.prettierrc,sha256=GyU5YqXRkB3eeDxAGhpB3jYr_WU3MHW4p60vg_HmoUU,90
5
11
  wagtail_blocks/static/wagtail_blocks/README.md,sha256=8gnnrxo9Ex_Tsn_XqiO-S04CW9uMP5uFc_XWfem72h4,427
6
12
  wagtail_blocks/static/wagtail_blocks/css/app.css,sha256=Y0GHo4GTmQsQookSvtzn9FJSbcfVz96CFPcMA4LtL6I,77
7
- wagtail_blocks/static/wagtail_blocks/css/styles.css,sha256=oP5Ojy6D4_2Ls3a8_L9RauLUO-HSBHinNf6tPvwDjOE,103534
8
- wagtail_blocks/static/wagtail_blocks/package-lock.json,sha256=ivGOewgr-WulpEBmtlR77BdNjE-hwDIZAmQveasZczY,44828
9
- wagtail_blocks/static/wagtail_blocks/package.json,sha256=I5W_VgxuzetBjom6i4Ht3m65SOQUMucLnO-xE49cH0M,259
10
- wagtail_blocks/templates/wagtail_blocks/blocks/accordion.html,sha256=wYWmCIFLr7BVlyuLFk6dJIyY0KunpGUR8xe0cKE2U9U,742
11
- 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
12
18
  wagtail_blocks/templates/wagtail_blocks/blocks/browser.html,sha256=377dESgmWidAz-eKjz1PWBFQua7aCiE0tP1sbeXGHEo,400
13
19
  wagtail_blocks/templates/wagtail_blocks/blocks/carousel.html,sha256=PO2QF6L--I-YCUAVARrggqjztoisyhJnF76pc8ywX4A,2001
14
- 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
15
21
  wagtail_blocks/templates/wagtail_blocks/blocks/code_mockup.html,sha256=ffl7vWFkR_hWh96GfsqIcl7dhcYj6wjgg8MbFviTwOo,637
16
22
  wagtail_blocks/templates/wagtail_blocks/blocks/diff.html,sha256=Z1QuQIEbS-D86Uvv2y607C0i_V3k6FYQAkJEx7a5zt8,419
17
23
  wagtail_blocks/templates/wagtail_blocks/blocks/fab.html,sha256=Brr-te1a99Lumj8yeNInaDGlX6XlNqE9p3Jn--hKsvk,1487
@@ -20,11 +26,12 @@ wagtail_blocks/templates/wagtail_blocks/blocks/image.html,sha256=7U3rz55K2Fy49uM
20
26
  wagtail_blocks/templates/wagtail_blocks/blocks/list.html,sha256=MnOJ7JY4dKTe6jeUZHD7xbLKmP_xgGy9fLxlOkVce1Q,1660
21
27
  wagtail_blocks/templates/wagtail_blocks/blocks/phone.html,sha256=28i0jvs0fSdxFIFSFdCODsiuYluk7rRdonmbtnAbva0,333
22
28
  wagtail_blocks/templates/wagtail_blocks/blocks/steps.html,sha256=tsyT1vQU0YM5tAoy0TRpqVnU4GReXxio10h6970Dh4o,406
23
- wagtail_blocks/templates/wagtail_blocks/blocks/tabs.html,sha256=e2NoRWPcNXewGsN2-c2Qk7bOefiaCjpl29e5kSflXPE,752
29
+ wagtail_blocks/templates/wagtail_blocks/blocks/tabs.html,sha256=raxO1nNfhVCG4bbCP5Ov1ilyNYWSXyUmj8AkEqaJ2EU,730
24
30
  wagtail_blocks/templates/wagtail_blocks/blocks/timeline.html,sha256=EcL0L6H1UZlMk0emMucNeLCPpkkhKBzQqFf0do2m9MM,853
25
31
  wagtail_blocks/templates/wagtail_blocks/blocks/toast.html,sha256=sE6bdgwgg15G-5qUsaA2T0ixfRcK5_bCzbfqKc0-WyU,192
26
32
  wagtail_blocks/templates/wagtail_blocks/blocks/window.html,sha256=sw6GqkU32J9pOZ5WQsLubSBicZBnjxNDKPK2Drx7aBQ,244
27
- wagtail_tw_blocks-0.2.5.dist-info/METADATA,sha256=ftEw0bxyQTFlwE9la0jxBoBu2mHSLQ0qunSxCCERb4k,9531
28
- wagtail_tw_blocks-0.2.5.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
29
- wagtail_tw_blocks-0.2.5.dist-info/licenses/LICENSE,sha256=RkaGOqhDfc5U9-5mc3OHBMOo1VW7UOb8JQ614C0kqm4,1074
30
- wagtail_tw_blocks-0.2.5.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,,