wagtail-tw-blocks 0.1.2__py3-none-any.whl → 0.2.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.
- wagtail_blocks/__init__.py +18 -2
- wagtail_blocks/blocks.py +339 -27
- wagtail_blocks/static/wagtail_blocks/css/styles.css +1 -1
- wagtail_blocks/templates/wagtail_blocks/blocks/accordion.html +9 -4
- wagtail_blocks/templates/wagtail_blocks/blocks/alert.html +3 -3
- wagtail_blocks/templates/wagtail_blocks/blocks/carousel.html +3 -3
- wagtail_blocks/templates/wagtail_blocks/blocks/code.html +36 -23
- wagtail_blocks/templates/wagtail_blocks/blocks/diff.html +4 -7
- wagtail_blocks/templates/wagtail_blocks/blocks/fab.html +43 -0
- wagtail_blocks/templates/wagtail_blocks/blocks/hover_gallery.html +18 -0
- wagtail_blocks/templates/wagtail_blocks/blocks/list.html +55 -0
- wagtail_blocks/templates/wagtail_blocks/blocks/steps.html +12 -0
- wagtail_blocks/templates/wagtail_blocks/blocks/tabs.html +24 -0
- wagtail_blocks/templates/wagtail_blocks/blocks/timeline.html +30 -0
- wagtail_blocks/templates/wagtail_blocks/blocks/toast.html +9 -0
- {wagtail_tw_blocks-0.1.2.dist-info → wagtail_tw_blocks-0.2.0.dist-info}/METADATA +26 -2
- wagtail_tw_blocks-0.2.0.dist-info/RECORD +25 -0
- wagtail_blocks/templates/wagtail_blocks/styles.html +0 -20
- wagtail_tw_blocks-0.1.2.dist-info/RECORD +0 -19
- {wagtail_tw_blocks-0.1.2.dist-info → wagtail_tw_blocks-0.2.0.dist-info}/WHEEL +0 -0
- {wagtail_tw_blocks-0.1.2.dist-info → wagtail_tw_blocks-0.2.0.dist-info}/licenses/LICENSE +0 -0
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
{% load i18n wagtailcore_tags wagtailimages_tags %}
|
|
2
|
+
|
|
3
|
+
<div class="not-prose my-4">
|
|
4
|
+
<ol class="list bg-base-100 rounded-box shadow-sm">
|
|
5
|
+
<li
|
|
6
|
+
role="heading"
|
|
7
|
+
aria-level="1"
|
|
8
|
+
class="p-4 pb-2 text-xs opacity-60 tracking-wide"
|
|
9
|
+
>
|
|
10
|
+
{{ self.title }}
|
|
11
|
+
</li>
|
|
12
|
+
{% for item in self.items %}
|
|
13
|
+
<li class="list-row relative">
|
|
14
|
+
{% if item.page or item.url %}
|
|
15
|
+
<a
|
|
16
|
+
href="{% if item.page %}{% pageurl item.page %}{% else %}{{ item.url }}{% endif %}"
|
|
17
|
+
class="absolute inset-0"
|
|
18
|
+
>
|
|
19
|
+
<span class="sr-only">{% trans 'View' %}</span>
|
|
20
|
+
</a>
|
|
21
|
+
{% endif %}
|
|
22
|
+
|
|
23
|
+
<!---->
|
|
24
|
+
{% if item.image %}
|
|
25
|
+
<figure class="size-12 overflow-clip rounded-field">
|
|
26
|
+
{% image item.image fill-1080x1080 %}
|
|
27
|
+
</figure>
|
|
28
|
+
{% endif %}
|
|
29
|
+
|
|
30
|
+
<div>
|
|
31
|
+
<h2>{{ item.title }}</h2>
|
|
32
|
+
|
|
33
|
+
{% if item.description %}
|
|
34
|
+
<p class="text-xs opacity-60">{{ item.description }}</p>
|
|
35
|
+
{% endif %}
|
|
36
|
+
</div>
|
|
37
|
+
|
|
38
|
+
{% for action in item.actions %}
|
|
39
|
+
<div
|
|
40
|
+
class="tooltip tooltip-left tooltip-{{ action.color }} rtl:tooltip-right"
|
|
41
|
+
data-tip="{{ action.title }}"
|
|
42
|
+
>
|
|
43
|
+
<a
|
|
44
|
+
href="{% if action.page %}{% pageurl action.page %}{% else %}{{ action.url }}{% endif %}"
|
|
45
|
+
class="btn btn-xs btn-square btn-{{ action.color }} md:btn-sm lg:btn-md"
|
|
46
|
+
>
|
|
47
|
+
<span class="sr-only">{{ action.title }}</span>
|
|
48
|
+
<i data-lucide="{{ action.icon }}" class="size-4 lg:size-6"></i>
|
|
49
|
+
</a>
|
|
50
|
+
</div>
|
|
51
|
+
{% endfor %}
|
|
52
|
+
</li>
|
|
53
|
+
{% endfor %}
|
|
54
|
+
</ol>
|
|
55
|
+
</div>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<div class="my-4 not-prose overflow-x-auto">
|
|
2
|
+
<ol class="steps {% if self.is_vertical %} steps-vertical {% endif %}">
|
|
3
|
+
{% for item in self.items %}
|
|
4
|
+
<li class="step {% if item.color %}step-{{ item.color }}{% endif %}">
|
|
5
|
+
<span class="step-icon">
|
|
6
|
+
<i data-lucide="{{ item.icon }}" class="size-4 lg:size-6"></i>
|
|
7
|
+
</span>
|
|
8
|
+
{{ item.name }}
|
|
9
|
+
</li>
|
|
10
|
+
{% endfor %}
|
|
11
|
+
</ol>
|
|
12
|
+
</div>
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
<div class="my-4 not-prose">
|
|
2
|
+
<div
|
|
3
|
+
class="tabs {% if self.is_reversed %} tabs-bottom {% endif %} tabs-xs tabs-{{ self.style }} sm:tabs-sm lg:tabs-md xl:tabs-lg 2xl:tabs-xl"
|
|
4
|
+
>
|
|
5
|
+
{% for item in self.items %}
|
|
6
|
+
<input
|
|
7
|
+
class="tab"
|
|
8
|
+
type="radio"
|
|
9
|
+
aria-label="{{ item.title }}"
|
|
10
|
+
name="{{ self.name|slugify }}"
|
|
11
|
+
checked="{% if item.is_selected %}true{% else %}false{% endif %}"
|
|
12
|
+
/>
|
|
13
|
+
<div
|
|
14
|
+
class="tab-content bg-base-100 border-base-300 p-4 {% if self.style != 'lift' %} rounded-field {% endif %}"
|
|
15
|
+
>
|
|
16
|
+
<div
|
|
17
|
+
class="prose mx-auto prose-sm xl:prose-lg 2xl:prose-xl prose-img:w-full prose-img:rounded-field"
|
|
18
|
+
>
|
|
19
|
+
{{ item.content }}
|
|
20
|
+
</div>
|
|
21
|
+
</div>
|
|
22
|
+
{% endfor %}
|
|
23
|
+
</div>
|
|
24
|
+
</div>
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{% load wagtailcore_tags %}
|
|
2
|
+
|
|
3
|
+
<div class="my-4 not-prose">
|
|
4
|
+
<ol
|
|
5
|
+
class="timeline {% if self.snap_to_icon %} timeline-snap-icon {% endif %}{% if self.is_compact %} timeline-compact {% endif %}{% if self.is_vertical %} timeline-vertical {% endif %}"
|
|
6
|
+
>
|
|
7
|
+
{% for item in self.items %}
|
|
8
|
+
<li>
|
|
9
|
+
{% if not forloop.first %}
|
|
10
|
+
<hr class="bg-primary" />
|
|
11
|
+
{% endif %}
|
|
12
|
+
|
|
13
|
+
<time datetime="{{ item.date|date }}" class="timeline-start text-xs">
|
|
14
|
+
{{ item.date|date }}
|
|
15
|
+
</time>
|
|
16
|
+
<div class="timeline-middle">
|
|
17
|
+
<i
|
|
18
|
+
data-lucide="{{ item.icon }}"
|
|
19
|
+
class="size-4 text-primary lg:size-6"
|
|
20
|
+
></i>
|
|
21
|
+
</div>
|
|
22
|
+
<p class="timeline-end timeline-box">{{ item.content }}</p>
|
|
23
|
+
|
|
24
|
+
{% if not forloop.last %}
|
|
25
|
+
<hr class="bg-primary" />
|
|
26
|
+
{% endif %}
|
|
27
|
+
</li>
|
|
28
|
+
{% endfor %}
|
|
29
|
+
</ol>
|
|
30
|
+
</div>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: wagtail-tw-blocks
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.2.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
|
|
@@ -44,6 +44,13 @@ Description-Content-Type: text/markdown
|
|
|
44
44
|
- **Carousel:** Image or content slider with responsive design.
|
|
45
45
|
- **Code:** Syntax-highlighted code snippets for technical content (Requires `highlight.js` and `clipboard.js` to be included in your page).
|
|
46
46
|
- **Diff:** Side-by-side or inline difference highlighting for image comparisons.
|
|
47
|
+
- **FAB:** Floating Action Button with multiple action items.
|
|
48
|
+
- **Hover Gallery:** Image gallery with hover effects.
|
|
49
|
+
- **List:** Ordered lists with custom styling.
|
|
50
|
+
- **Steps:** Step-by-step process indicators.
|
|
51
|
+
- **Tabs:** Tabbed content sections.
|
|
52
|
+
- **Timeline:** Chronological event listings.
|
|
53
|
+
- **Toast:** Temporary notification messages.
|
|
47
54
|
|
|
48
55
|
---
|
|
49
56
|
|
|
@@ -122,6 +129,7 @@ class Article(Page):
|
|
|
122
129
|
("carousel", blocks.CarouselBlock()),
|
|
123
130
|
("code", blocks.CodeBlock()),
|
|
124
131
|
("diff", blocks.DiffBlock()),
|
|
132
|
+
# ...
|
|
125
133
|
],
|
|
126
134
|
help_text=_("Article content"),
|
|
127
135
|
)
|
|
@@ -147,7 +155,6 @@ class Article(Page):
|
|
|
147
155
|
Do not use in production.
|
|
148
156
|
See:
|
|
149
157
|
- https://tailwindcss.com/docs/installation
|
|
150
|
-
- https://daisyui.com/docs/install/
|
|
151
158
|
-->
|
|
152
159
|
<link href="https://cdn.jsdelivr.net/npm/daisyui@5" rel="stylesheet" type="text/css" />
|
|
153
160
|
<link href="https://cdn.jsdelivr.net/npm/daisyui@5/themes.css" rel="stylesheet" type="text/css" />
|
|
@@ -201,6 +208,23 @@ class Article(Page):
|
|
|
201
208
|
|
|
202
209
|
---
|
|
203
210
|
|
|
211
|
+
## Extending
|
|
212
|
+
|
|
213
|
+
You can easily extend or customize the provided blocks by subclassing them. For example, to create a custom alert block with additional styles:
|
|
214
|
+
|
|
215
|
+
```python
|
|
216
|
+
from wagtail_blocks import blocks
|
|
217
|
+
|
|
218
|
+
class CustomAlertBlock(blocks.AlertBlock):
|
|
219
|
+
|
|
220
|
+
class Meta:
|
|
221
|
+
template = "path/to/your/custom_alert_template.html"
|
|
222
|
+
icon = "warning"
|
|
223
|
+
label = "Custom Alert"
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
---
|
|
227
|
+
|
|
204
228
|
## Contributing
|
|
205
229
|
|
|
206
230
|
We welcome community contributions. See the [CONTRIBUTING](CONTRIBUTING.md) guide for setup instructions, coding standards, and workflow. Opening an issue before major changes helps align on scope and direction.
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
wagtail_blocks/__init__.py,sha256=JQzaL6a4XFDFjpRjFrXBLHwCAphFA39o4aaP0ioYJeA,1432
|
|
2
|
+
wagtail_blocks/apps.py,sha256=tOZ8btDhg8nCbNbbjTr6N4MQUEuC600is3PN-ufHJcU,300
|
|
3
|
+
wagtail_blocks/blocks.py,sha256=IQA0h304qYq1wWjQfR-53t6ynl-YRn5SlVcXMX8GKqo,13774
|
|
4
|
+
wagtail_blocks/static/wagtail_blocks/.prettierrc,sha256=GyU5YqXRkB3eeDxAGhpB3jYr_WU3MHW4p60vg_HmoUU,90
|
|
5
|
+
wagtail_blocks/static/wagtail_blocks/README.md,sha256=8gnnrxo9Ex_Tsn_XqiO-S04CW9uMP5uFc_XWfem72h4,427
|
|
6
|
+
wagtail_blocks/static/wagtail_blocks/css/app.css,sha256=Y0GHo4GTmQsQookSvtzn9FJSbcfVz96CFPcMA4LtL6I,77
|
|
7
|
+
wagtail_blocks/static/wagtail_blocks/css/styles.css,sha256=RWWHzD42A4o1i0f5zufWfDDJUQGGWsxkEgG0zqFew40,94091
|
|
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=t7GAR2USLnGsmX6UiQ1mrcu2VUznTt2Ij1lIr8ZDVD8,712
|
|
11
|
+
wagtail_blocks/templates/wagtail_blocks/blocks/alert.html,sha256=ofo68-C4iYxgggxHPcZimmcPl1qEc1SoeW8usFWWtQQ,715
|
|
12
|
+
wagtail_blocks/templates/wagtail_blocks/blocks/carousel.html,sha256=PO2QF6L--I-YCUAVARrggqjztoisyhJnF76pc8ywX4A,2001
|
|
13
|
+
wagtail_blocks/templates/wagtail_blocks/blocks/code.html,sha256=JfhEDn-kS-24RbK0CvCB24wzg357cDmljod_yhs5G8w,2116
|
|
14
|
+
wagtail_blocks/templates/wagtail_blocks/blocks/diff.html,sha256=Z1QuQIEbS-D86Uvv2y607C0i_V3k6FYQAkJEx7a5zt8,419
|
|
15
|
+
wagtail_blocks/templates/wagtail_blocks/blocks/fab.html,sha256=o86drITG1RnyL8pI9X2DLTr-vh1xCuB_gDuLv1OqAMA,1442
|
|
16
|
+
wagtail_blocks/templates/wagtail_blocks/blocks/hover_gallery.html,sha256=ce0IgV_ZDmCkYSM6N3Du6-2ikP6TZYo6seGWpF9myWQ,369
|
|
17
|
+
wagtail_blocks/templates/wagtail_blocks/blocks/list.html,sha256=qbjE4GV_OSD1XMspOJXbjZVcDmyXrpFhynvt84MSzzM,1576
|
|
18
|
+
wagtail_blocks/templates/wagtail_blocks/blocks/steps.html,sha256=tsyT1vQU0YM5tAoy0TRpqVnU4GReXxio10h6970Dh4o,406
|
|
19
|
+
wagtail_blocks/templates/wagtail_blocks/blocks/tabs.html,sha256=e2NoRWPcNXewGsN2-c2Qk7bOefiaCjpl29e5kSflXPE,752
|
|
20
|
+
wagtail_blocks/templates/wagtail_blocks/blocks/timeline.html,sha256=EcL0L6H1UZlMk0emMucNeLCPpkkhKBzQqFf0do2m9MM,853
|
|
21
|
+
wagtail_blocks/templates/wagtail_blocks/blocks/toast.html,sha256=sE6bdgwgg15G-5qUsaA2T0ixfRcK5_bCzbfqKc0-WyU,192
|
|
22
|
+
wagtail_tw_blocks-0.2.0.dist-info/METADATA,sha256=VFDcKyEXMMv9aJly0qY_WXjje7Bbs_fseYupnP9hSLk,8900
|
|
23
|
+
wagtail_tw_blocks-0.2.0.dist-info/WHEEL,sha256=M5asmiAlL6HEcOq52Yi5mmk9KmTVjY2RDPtO4p9DMrc,88
|
|
24
|
+
wagtail_tw_blocks-0.2.0.dist-info/licenses/LICENSE,sha256=RkaGOqhDfc5U9-5mc3OHBMOo1VW7UOb8JQ614C0kqm4,1074
|
|
25
|
+
wagtail_tw_blocks-0.2.0.dist-info/RECORD,,
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
<div
|
|
2
|
-
class="alert alert-soft alert-outline alert-dashed alert-info alert-success alert-error alert-warning"
|
|
3
|
-
></div>
|
|
4
|
-
|
|
5
|
-
<button
|
|
6
|
-
class="btn btn-circle btn-square btn-xs btn-ghost btn-soft btn-outlined btn-primary btn-secondary btn-accent btn-success btn-info btn-warning btn-error sm:btn-sm md:btn-md xl:btn-lg 2xl:btn-xl"
|
|
7
|
-
></button>
|
|
8
|
-
|
|
9
|
-
<span class="badge badge-info badge-warning badge-success badge-error"></span>
|
|
10
|
-
|
|
11
|
-
<div
|
|
12
|
-
class="card card-side card-xs sm:card-sm md:card-md xl:card-lg 2xl:card-xl"
|
|
13
|
-
>
|
|
14
|
-
<div class="card-body">
|
|
15
|
-
<div class="card-title"></div>
|
|
16
|
-
<div class="card-actions"></div>
|
|
17
|
-
</div>
|
|
18
|
-
</div>
|
|
19
|
-
|
|
20
|
-
<div class="collapse-plus collapse-arrow collapse-open"></div>
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
wagtail_blocks/__init__.py,sha256=Qaa4yiI8rnKiLXuApV3gCKkurIYNSi5Nmg2yvKrZ0Ac,1123
|
|
2
|
-
wagtail_blocks/apps.py,sha256=tOZ8btDhg8nCbNbbjTr6N4MQUEuC600is3PN-ufHJcU,300
|
|
3
|
-
wagtail_blocks/blocks.py,sha256=OvXPpIDyReMWaFkZLuyVNciHZyp4EJ0Jih0dQXCTUrk,5775
|
|
4
|
-
wagtail_blocks/static/wagtail_blocks/.prettierrc,sha256=GyU5YqXRkB3eeDxAGhpB3jYr_WU3MHW4p60vg_HmoUU,90
|
|
5
|
-
wagtail_blocks/static/wagtail_blocks/README.md,sha256=8gnnrxo9Ex_Tsn_XqiO-S04CW9uMP5uFc_XWfem72h4,427
|
|
6
|
-
wagtail_blocks/static/wagtail_blocks/css/app.css,sha256=Y0GHo4GTmQsQookSvtzn9FJSbcfVz96CFPcMA4LtL6I,77
|
|
7
|
-
wagtail_blocks/static/wagtail_blocks/css/styles.css,sha256=F3oym2HTClBOwz3JA7p9PHpSO3dDwJuH13hzmDrnEfo,65811
|
|
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=Um7_kiliVeUH8FdSosmmWjhD7KVVhOaQk-dO0xh_d0o,560
|
|
11
|
-
wagtail_blocks/templates/wagtail_blocks/blocks/alert.html,sha256=mv98_KRuib09mKth9zjSwcnMYq88YxZ-kw4eaUuKzxA,719
|
|
12
|
-
wagtail_blocks/templates/wagtail_blocks/blocks/carousel.html,sha256=eYRrgHJnVQJqKSWrsIclDGdk_pKF0fPx2OGJ-woKcck,2010
|
|
13
|
-
wagtail_blocks/templates/wagtail_blocks/blocks/code.html,sha256=gTRrJJkE2Opbm1jWJ_Lj56OQXxliQqAegQfEDOlWUh4,1669
|
|
14
|
-
wagtail_blocks/templates/wagtail_blocks/blocks/diff.html,sha256=if3aSNPzwiQY0xg_R_zYN0tWsyD-D376xBMo5b3boDw,420
|
|
15
|
-
wagtail_blocks/templates/wagtail_blocks/styles.html,sha256=4Dn2Ovsn8gxOoE3cXAgk07vYKAYu2IEexS83SHlPdRs,678
|
|
16
|
-
wagtail_tw_blocks-0.1.2.dist-info/METADATA,sha256=fMmf-6kojUSx-BeaUOwPkDV8uRa-dG-8unTMztKVgQA,8196
|
|
17
|
-
wagtail_tw_blocks-0.1.2.dist-info/WHEEL,sha256=M5asmiAlL6HEcOq52Yi5mmk9KmTVjY2RDPtO4p9DMrc,88
|
|
18
|
-
wagtail_tw_blocks-0.1.2.dist-info/licenses/LICENSE,sha256=RkaGOqhDfc5U9-5mc3OHBMOo1VW7UOb8JQ614C0kqm4,1074
|
|
19
|
-
wagtail_tw_blocks-0.1.2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|