wagtail-tw-blocks 0.3.1__py3-none-any.whl → 1.0.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 +6 -70
- wagtail_blocks/blocks.py +157 -536
- wagtail_blocks/constants.py +60 -0
- wagtail_blocks/static/wagtail_blocks/css/app.css +18 -2
- wagtail_blocks/static/wagtail_blocks/css/styles.css +2 -2
- wagtail_blocks/static/wagtail_blocks/package-lock.json +251 -420
- wagtail_blocks/static/wagtail_blocks/package.json +3 -3
- wagtail_blocks/templates/wagtail/blocks/accordion.html +21 -0
- wagtail_blocks/templates/wagtail/blocks/alert.html +12 -0
- wagtail_blocks/templates/wagtail/blocks/carousel.html +19 -0
- wagtail_blocks/templates/wagtail/blocks/code.html +32 -0
- wagtail_blocks/templates/{wagtail_blocks → wagtail}/blocks/diff.html +3 -3
- wagtail_blocks/templates/wagtail/blocks/document.html +65 -0
- wagtail_blocks/templates/wagtail/blocks/hover_gallery.html +11 -0
- wagtail_blocks/templates/wagtail/blocks/tabs.html +20 -0
- wagtail_blocks/templates/wagtail/components/breadcrumbs.html +12 -0
- wagtail_blocks/templates/wagtail/components/form.html +116 -0
- wagtail_blocks/templates/wagtail/components/languages.html +77 -0
- wagtail_blocks/templates/wagtail/components/messages.html +56 -0
- wagtail_blocks/templates/wagtail/components/next.html +22 -0
- wagtail_blocks/templates/wagtail/components/pagination.html +59 -0
- wagtail_blocks/templates/wagtail/components/prev.html +25 -0
- wagtail_blocks/templates/wagtail/components/prev_next.html +5 -0
- wagtail_blocks/templates/wagtail/components/themes.html +366 -0
- wagtail_blocks/templates/wagtail/components/tree.html +28 -0
- wagtail_blocks/templates/wagtail/styles.html +29 -0
- wagtail_tw_blocks-1.0.0.dist-info/METADATA +451 -0
- wagtail_tw_blocks-1.0.0.dist-info/RECORD +39 -0
- {wagtail_tw_blocks-0.3.1.dist-info → wagtail_tw_blocks-1.0.0.dist-info}/WHEEL +1 -1
- wagtail_blocks/templates/wagtail_blocks/blocks/accordion.html +0 -49
- wagtail_blocks/templates/wagtail_blocks/blocks/alert.html +0 -24
- wagtail_blocks/templates/wagtail_blocks/blocks/browser.html +0 -15
- wagtail_blocks/templates/wagtail_blocks/blocks/carousel.html +0 -64
- wagtail_blocks/templates/wagtail_blocks/blocks/code.html +0 -66
- wagtail_blocks/templates/wagtail_blocks/blocks/code_mockup.html +0 -20
- wagtail_blocks/templates/wagtail_blocks/blocks/fab.html +0 -43
- wagtail_blocks/templates/wagtail_blocks/blocks/hover_gallery.html +0 -18
- wagtail_blocks/templates/wagtail_blocks/blocks/image.html +0 -19
- wagtail_blocks/templates/wagtail_blocks/blocks/list.html +0 -56
- wagtail_blocks/templates/wagtail_blocks/blocks/phone.html +0 -11
- wagtail_blocks/templates/wagtail_blocks/blocks/steps.html +0 -12
- wagtail_blocks/templates/wagtail_blocks/blocks/tabs.html +0 -24
- wagtail_blocks/templates/wagtail_blocks/blocks/timeline.html +0 -30
- wagtail_blocks/templates/wagtail_blocks/blocks/toast.html +0 -9
- wagtail_blocks/templates/wagtail_blocks/blocks/window.html +0 -9
- wagtail_blocks/templates/wagtail_blocks/styles.html +0 -92
- wagtail_tw_blocks-0.3.1.dist-info/METADATA +0 -237
- wagtail_tw_blocks-0.3.1.dist-info/RECORD +0 -37
- {wagtail_tw_blocks-0.3.1.dist-info → wagtail_tw_blocks-1.0.0.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
{% load i18n %}
|
|
2
|
-
|
|
3
|
-
<div class="my-4 not-prose">
|
|
4
|
-
<div
|
|
5
|
-
class="card card-sm lg:card-md 2xl:card-lg border border-base-300 bg-base-200"
|
|
6
|
-
>
|
|
7
|
-
{% if self.show_header %}
|
|
8
|
-
<div class="flex items-center justify-between gap-4 p-2">
|
|
9
|
-
{% if self.show_window_btns %}
|
|
10
|
-
<div class="flex items-center gap-2">
|
|
11
|
-
<div class="size-5 rounded-full bg-green-500"></div>
|
|
12
|
-
<div class="size-5 rounded-full bg-yellow-500"></div>
|
|
13
|
-
<div class="size-5 rounded-full bg-red-500"></div>
|
|
14
|
-
</div>
|
|
15
|
-
{% endif %}
|
|
16
|
-
|
|
17
|
-
<div
|
|
18
|
-
class="tooltip tooltip-bottom tooltip-primary"
|
|
19
|
-
data-tip="{% trans 'File name' %}"
|
|
20
|
-
>
|
|
21
|
-
<span
|
|
22
|
-
class="badge font-mono font-semibold badge-soft badge-sm badge-primary lg:badge-md"
|
|
23
|
-
>
|
|
24
|
-
<span class="sr-only">{% trans 'File name: ' %}</span>
|
|
25
|
-
<span>{{ self.file_name }}</span>
|
|
26
|
-
</span>
|
|
27
|
-
</div>
|
|
28
|
-
|
|
29
|
-
<div class="flex items-center justify-between gap-4">
|
|
30
|
-
{% if self.show_language %}
|
|
31
|
-
<div
|
|
32
|
-
class="tooltip tooltip-left rtl:tooltip-right"
|
|
33
|
-
data-tip="{% trans 'Programming language' %}"
|
|
34
|
-
>
|
|
35
|
-
<span class="btn btn-xs btn-copy btn-ghost lg:btn-sm">
|
|
36
|
-
<i data-lucide="terminal" class="size-4 lg:size-5"></i>
|
|
37
|
-
<span class="sr-only">{% trans 'Programming language' %}:</span>
|
|
38
|
-
{{ self.language|title }}
|
|
39
|
-
</span>
|
|
40
|
-
</div>
|
|
41
|
-
{% endif %}
|
|
42
|
-
|
|
43
|
-
<!---->
|
|
44
|
-
{% if self.show_copy_btn %}
|
|
45
|
-
<div
|
|
46
|
-
class="tooltip tooltip-left rtl:tooltip-right"
|
|
47
|
-
data-tip="{% trans 'Copy' %}"
|
|
48
|
-
>
|
|
49
|
-
<button
|
|
50
|
-
class="btn btn-xs btn-copy btn-ghost btn-square lg:btn-sm"
|
|
51
|
-
data-clipboard-text="{{ self.code }}"
|
|
52
|
-
>
|
|
53
|
-
<span class="sr-only">{% trans 'Copy' %}</span>
|
|
54
|
-
<i data-lucide="copy" class="size-4 lg:size-5"></i>
|
|
55
|
-
</button>
|
|
56
|
-
</div>
|
|
57
|
-
{% endif %}
|
|
58
|
-
</div>
|
|
59
|
-
</div>
|
|
60
|
-
{% endif %}
|
|
61
|
-
|
|
62
|
-
<pre
|
|
63
|
-
class="overflow-x-auto max-w-full rounded-box overflow-clip"
|
|
64
|
-
><code class="bg-transparent language-{{ self.language }}">{{ self.code }}</code></pre>
|
|
65
|
-
</div>
|
|
66
|
-
</div>
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
{% load i18n %}
|
|
2
|
-
|
|
3
|
-
<div class="my-4 not-prose">
|
|
4
|
-
<div class="mockup-code w-full relative">
|
|
5
|
-
<div class="absolute top-4 right-4">
|
|
6
|
-
<div
|
|
7
|
-
class="tooltip tooltip-left rtl:tooltip-right"
|
|
8
|
-
data-tip="{% trans 'Programming language' %}"
|
|
9
|
-
>
|
|
10
|
-
<span class="btn btn-xs btn-copy btn-ghost lg:btn-sm">
|
|
11
|
-
<i data-lucide="terminal" class="size-4 lg:size-5"></i>
|
|
12
|
-
<span class="sr-only">{% trans 'Programming language' %}:</span>
|
|
13
|
-
{{ self.language|title }}
|
|
14
|
-
</span>
|
|
15
|
-
</div>
|
|
16
|
-
</div>
|
|
17
|
-
|
|
18
|
-
<pre><code class="language-{{ self.language }}">{{ self.code }}</code></pre>
|
|
19
|
-
</div>
|
|
20
|
-
</div>
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
{% load wagtailcore_tags %}
|
|
2
|
-
|
|
3
|
-
<div class="fab items-center {% if self.is_flower %} fab-flower {% endif %}">
|
|
4
|
-
<div
|
|
5
|
-
tabindex="0"
|
|
6
|
-
class="tooltip tooltip-left tooltip-{{ self.toggle.color }} rtl:tooltip-right"
|
|
7
|
-
data-tip="{{ self.toggle.label }}"
|
|
8
|
-
>
|
|
9
|
-
<div
|
|
10
|
-
role="button"
|
|
11
|
-
class="btn btn-circle btn-sm btn-{{ self.toggle.color }} sm:btn-md lg:btn-lg xl:btn-xl"
|
|
12
|
-
>
|
|
13
|
-
<span class="sr-only">{{ self.toggle.label }}</span>
|
|
14
|
-
<i data-lucide="{{ self.toggle.icon }}" class="size-4 lg:size-6"></i>
|
|
15
|
-
</div>
|
|
16
|
-
</div>
|
|
17
|
-
|
|
18
|
-
{% if self.main %}
|
|
19
|
-
<a
|
|
20
|
-
href="{% if self.main.page %}{% pageurl self.main.page %}{% elif self.main.url %}{{ self.main.url }}{% else %}#{% endif %}"
|
|
21
|
-
class="fab-main-action btn btn-circle btn-sm btn-{{ self.main.color }} sm:btn-md lg:btn-lg xl:btn-xl"
|
|
22
|
-
>
|
|
23
|
-
<span class="sr-only">{{ self.main.label }}</span>
|
|
24
|
-
<i data-lucide="{{ self.main.icon }}" class="size-4 lg:size-6"></i>
|
|
25
|
-
</a>
|
|
26
|
-
{% endif %}
|
|
27
|
-
|
|
28
|
-
<!---->
|
|
29
|
-
{% for item in self.items %}
|
|
30
|
-
<div
|
|
31
|
-
class="tooltip tooltip-left tooltip-{{ item.color }} rtl:tooltip-right"
|
|
32
|
-
data-tip="{{ item.label }}"
|
|
33
|
-
>
|
|
34
|
-
<a
|
|
35
|
-
href="{% if item.page %}{% pageurl item.page %}{% elif item.url %}{{ item.url }}{% else %}#{% endif %}"
|
|
36
|
-
class="btn btn-circle btn-xs btn-{{ item.color }} sm:btn-sm xl:btn-lg 2xl:btn-xl"
|
|
37
|
-
>
|
|
38
|
-
<span class="sr-only">{{ item.label }}</span>
|
|
39
|
-
<i data-lucide="{{ item.icon }}" class="size-4 lg:size-6"></i>
|
|
40
|
-
</a>
|
|
41
|
-
</div>
|
|
42
|
-
{% endfor %}
|
|
43
|
-
</div>
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
{% load wagtailimages_tags %}
|
|
2
|
-
|
|
3
|
-
<div class="not-prose my-4">
|
|
4
|
-
<ol class="hover-gallery">
|
|
5
|
-
{% for item in self.items %}
|
|
6
|
-
<li>
|
|
7
|
-
<figure>
|
|
8
|
-
{% image item.image fill-1920x1080 %}
|
|
9
|
-
|
|
10
|
-
<!---->
|
|
11
|
-
{% if item.caption %}
|
|
12
|
-
<figcaption>{{ item.caption }}</figcaption>
|
|
13
|
-
{% endif %}
|
|
14
|
-
</figure>
|
|
15
|
-
</li>
|
|
16
|
-
{% endfor %}
|
|
17
|
-
</ol>
|
|
18
|
-
</div>
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
{% load wagtailimages_tags %}
|
|
2
|
-
|
|
3
|
-
<figure>
|
|
4
|
-
{% image self.image fill-1920x1080 loading="lazy" %}
|
|
5
|
-
|
|
6
|
-
<!---->
|
|
7
|
-
{% if self.caption %}
|
|
8
|
-
<figcaption class="text-xs md:text-sm xl:text-base">
|
|
9
|
-
{{ self.caption }}
|
|
10
|
-
|
|
11
|
-
<!---->
|
|
12
|
-
{% if self.attribution %}
|
|
13
|
-
<!---->
|
|
14
|
-
- {{ self.attribution }}
|
|
15
|
-
<!---->
|
|
16
|
-
{% endif %}
|
|
17
|
-
</figcaption>
|
|
18
|
-
{% endif %}
|
|
19
|
-
</figure>
|
|
@@ -1,56 +0,0 @@
|
|
|
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 %}
|
|
15
|
-
<a href="{% pageurl item.page %}" class="absolute inset-0">
|
|
16
|
-
<span class="sr-only">{% trans 'View' %}</span>
|
|
17
|
-
</a>
|
|
18
|
-
{% elif item.url %}
|
|
19
|
-
<a href="{{ item.url }}" class="absolute inset-0">
|
|
20
|
-
<span class="sr-only">{% trans 'View' %}</span>
|
|
21
|
-
</a>
|
|
22
|
-
{% endif %}
|
|
23
|
-
|
|
24
|
-
<!---->
|
|
25
|
-
{% if item.image %}
|
|
26
|
-
<figure class="size-12 overflow-clip rounded-field">
|
|
27
|
-
{% image item.image fill-1080x1080 %}
|
|
28
|
-
</figure>
|
|
29
|
-
{% endif %}
|
|
30
|
-
|
|
31
|
-
<div>
|
|
32
|
-
<h2>{{ item.title }}</h2>
|
|
33
|
-
|
|
34
|
-
{% if item.description %}
|
|
35
|
-
<p class="text-xs opacity-60">{{ item.description }}</p>
|
|
36
|
-
{% endif %}
|
|
37
|
-
</div>
|
|
38
|
-
|
|
39
|
-
{% for action in item.actions %}
|
|
40
|
-
<div
|
|
41
|
-
class="tooltip tooltip-left tooltip-{{ action.color }} rtl:tooltip-right"
|
|
42
|
-
data-tip="{{ action.title }}"
|
|
43
|
-
>
|
|
44
|
-
<a
|
|
45
|
-
href="{% if action.page %}{% pageurl action.page %}{% elif action.url %}{{ action.url }}{% else %}#{% endif %}"
|
|
46
|
-
class="btn btn-xs btn-square btn-{{ action.color }} md:btn-sm lg:btn-md"
|
|
47
|
-
>
|
|
48
|
-
<span class="sr-only">{{ action.title }}</span>
|
|
49
|
-
<i data-lucide="{{ action.icon }}" class="size-4 lg:size-6"></i>
|
|
50
|
-
</a>
|
|
51
|
-
</div>
|
|
52
|
-
{% endfor %}
|
|
53
|
-
</li>
|
|
54
|
-
{% endfor %}
|
|
55
|
-
</ol>
|
|
56
|
-
</div>
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
{% load wagtailimages_tags %}
|
|
2
|
-
|
|
3
|
-
<div class="flex items-center justify-center my-4 not-prose">
|
|
4
|
-
<div class="mx-auto mockup-phone border-primary">
|
|
5
|
-
{% if self.show_camera %}
|
|
6
|
-
<div class="mockup-phone-camera"></div>
|
|
7
|
-
{% endif %}
|
|
8
|
-
|
|
9
|
-
<div class="mockup-phone-display">{% image self.wallpaper scale-100 %}</div>
|
|
10
|
-
</div>
|
|
11
|
-
</div>
|
|
@@ -1,12 +0,0 @@
|
|
|
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>
|
|
@@ -1,24 +0,0 @@
|
|
|
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
|
-
{% if item.is_selected %}checked{% 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>
|
|
@@ -1,30 +0,0 @@
|
|
|
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,92 +0,0 @@
|
|
|
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,237 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: wagtail-tw-blocks
|
|
3
|
-
Version: 0.3.1
|
|
4
|
-
Summary: A collection of reusable, production-ready content blocks for Wagtail CMS, styled with Tailwind CSS and daisyUI.
|
|
5
|
-
License: MIT
|
|
6
|
-
License-File: LICENSE
|
|
7
|
-
Author: Yousef Abu Shanab
|
|
8
|
-
Author-email: josephyousef249@gmail.com
|
|
9
|
-
Requires-Python: >=3.11
|
|
10
|
-
Classifier: License :: OSI Approved :: MIT License
|
|
11
|
-
Classifier: Programming Language :: Python :: 3
|
|
12
|
-
Classifier: Programming Language :: Python :: 3.11
|
|
13
|
-
Classifier: Programming Language :: Python :: 3.12
|
|
14
|
-
Classifier: Programming Language :: Python :: 3.13
|
|
15
|
-
Classifier: Programming Language :: Python :: 3.14
|
|
16
|
-
Requires-Dist: django (>=5.2.1)
|
|
17
|
-
Requires-Dist: wagtail (>=7.2)
|
|
18
|
-
Project-URL: Documentation, https://github.com/youzarsiph/wagtail-tw-blocks
|
|
19
|
-
Project-URL: Homepage, https://github.com/youzarsiph/wagtail-tw-blocks
|
|
20
|
-
Project-URL: Repository, https://github.com/youzarsiph/wagtail-tw-blocks
|
|
21
|
-
Description-Content-Type: text/markdown
|
|
22
|
-
|
|
23
|
-
# wagtail-tw-blocks
|
|
24
|
-
|
|
25
|
-
[](https://github.com/youzarsiph/wagtail-tw-blocks/actions/workflows/ci.yml)
|
|
26
|
-
[](https://github.com/youzarsiph/wagtail-tw-blocks/actions/workflows/cd.yml)
|
|
27
|
-
[](https://github.com/youzarsiph/wagtail-tw-blocks/actions/workflows/black.yml)
|
|
28
|
-
[](https://github.com/youzarsiph/wagtail-tw-blocks/actions/workflows/ruff.yml)
|
|
29
|
-
[](https://pypi.org/project/wagtail-tw-blocks/)
|
|
30
|
-
[](https://pypi.org/project/wagtail-tw-blocks/)
|
|
31
|
-
[](https://pypi.org/project/wagtail-tw-blocks/)
|
|
32
|
-
|
|
33
|
-
## Overview
|
|
34
|
-
|
|
35
|
-
**wagtail-tw-blocks** is a collection of reusable, production-ready content blocks for Wagtail CMS, styled with Tailwind CSS and daisyUI. It provides a set of common UI components—ready to drop into your `StreamField`—so you can build rich, modern page layouts without reinventing the wheel.
|
|
36
|
-
|
|
37
|
-
---
|
|
38
|
-
|
|
39
|
-
## Key features
|
|
40
|
-
|
|
41
|
-
- **Modern design:** Tailwind CSS + daisyUI styling for clean, responsive layouts.
|
|
42
|
-
- **Multiple themes:** All daisyUI themes included, with easy customization.
|
|
43
|
-
- **CI/CD:** GitHub Actions pipelines for automated testing and deployment.
|
|
44
|
-
|
|
45
|
-
---
|
|
46
|
-
|
|
47
|
-
## Demo
|
|
48
|
-
|
|
49
|
-
[](https://youtu.be/0b0dZByyPok)
|
|
50
|
-
|
|
51
|
-
---
|
|
52
|
-
|
|
53
|
-
## Available blocks
|
|
54
|
-
|
|
55
|
-
- **Accordion (Collapse):** Expandable/collapsible sections for FAQs or structured content.
|
|
56
|
-
- **Alert:** Highlight important messages or status updates.
|
|
57
|
-
- **Carousel:** Image or content slider with responsive design.
|
|
58
|
-
- **Code:** Syntax-highlighted code snippets for technical content (Requires `highlight.js` and `clipboard.js` to be included in your page).
|
|
59
|
-
- **Diff:** Side-by-side or inline difference highlighting for image comparisons.
|
|
60
|
-
- **FAB:** Floating Action Button with multiple action items.
|
|
61
|
-
- **Hover Gallery:** Image gallery with hover effects.
|
|
62
|
-
- **List:** Ordered lists with custom styling.
|
|
63
|
-
- **Steps:** Step-by-step process indicators.
|
|
64
|
-
- **Tabs:** Tabbed content sections.
|
|
65
|
-
- **Timeline:** Chronological event listings.
|
|
66
|
-
- **Toast:** Temporary notification messages.
|
|
67
|
-
- **Image:** Responsive images with optional captions.
|
|
68
|
-
- **Browser Mockup:** Browser window frame for screenshots or web content.
|
|
69
|
-
- **Phone Mockup:** Mobile phone frame for app screenshots or mobile content.
|
|
70
|
-
- **Window Mockup:** Desktop window frame for application screenshots or desktop content.
|
|
71
|
-
|
|
72
|
-
---
|
|
73
|
-
|
|
74
|
-
## Installation
|
|
75
|
-
|
|
76
|
-
```bash
|
|
77
|
-
pip install wagtail-tw-blocks
|
|
78
|
-
```
|
|
79
|
-
|
|
80
|
-
---
|
|
81
|
-
|
|
82
|
-
## Configuration
|
|
83
|
-
|
|
84
|
-
Add `wagtail_blocks` to your `INSTALLED_APPS` **after** configuring your Wagtail settings:
|
|
85
|
-
|
|
86
|
-
```python
|
|
87
|
-
# project/settings.py
|
|
88
|
-
|
|
89
|
-
INSTALLED_APPS = [
|
|
90
|
-
"wagtail_blocks",
|
|
91
|
-
# ...
|
|
92
|
-
]
|
|
93
|
-
```
|
|
94
|
-
|
|
95
|
-
### Available settings
|
|
96
|
-
|
|
97
|
-
You can customize the behavior of `wagtail-tw-blocks` by adding the following settings to your Django settings file:
|
|
98
|
-
|
|
99
|
-
```python
|
|
100
|
-
# project/settings.py
|
|
101
|
-
|
|
102
|
-
# Extend or override the default programming languages for the CodeBlock
|
|
103
|
-
WB_CODE_BLOCK_PROGRAMMING_LANGUAGES = [
|
|
104
|
-
('python', 'Python'),
|
|
105
|
-
('javascript', 'JavaScript'),
|
|
106
|
-
('html', 'HTML'),
|
|
107
|
-
('css', 'CSS'),
|
|
108
|
-
('java', 'Java'),
|
|
109
|
-
('csharp', 'C#'),
|
|
110
|
-
('cpp', 'C++'),
|
|
111
|
-
('ruby', 'Ruby'),
|
|
112
|
-
('go', 'Go'),
|
|
113
|
-
('php', 'PHP'),
|
|
114
|
-
# ...
|
|
115
|
-
]
|
|
116
|
-
|
|
117
|
-
# Show or hide the header the CodeBlock
|
|
118
|
-
WB_CODE_BLOCK_SHOW_HEADER = True # Default is True
|
|
119
|
-
|
|
120
|
-
# Show or hide the programming language label in the CodeBlock
|
|
121
|
-
WB_CODE_BLOCK_SHOW_PROGRAMMING_LANGUAGE = True # Default is True
|
|
122
|
-
|
|
123
|
-
# Show or hide the copy button in the CodeBlock
|
|
124
|
-
WB_CODE_BLOCK_SHOW_COPY_BUTTON = True # Default is True
|
|
125
|
-
|
|
126
|
-
# Show or hide window control buttons in the CodeBlock
|
|
127
|
-
WB_CODE_BLOCK_SHOW_WINDOW_CONTROLS = True # Default is True
|
|
128
|
-
```
|
|
129
|
-
|
|
130
|
-
---
|
|
131
|
-
|
|
132
|
-
## Usage example
|
|
133
|
-
|
|
134
|
-
```python
|
|
135
|
-
# blog/models.py
|
|
136
|
-
|
|
137
|
-
from wagtail_blocks import blocks
|
|
138
|
-
from wagtail.admin.panels import FieldPanel
|
|
139
|
-
from wagtail.fields import StreamField
|
|
140
|
-
from wagtail.models import Page
|
|
141
|
-
from django.utils.translation import gettext_lazy as _
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
class Article(Page):
|
|
145
|
-
content = StreamField(
|
|
146
|
-
[
|
|
147
|
-
("accordion", blocks.AccordionBlock()),
|
|
148
|
-
("alert", blocks.AlertBlock()),
|
|
149
|
-
("carousel", blocks.CarouselBlock()),
|
|
150
|
-
("code", blocks.CodeBlock()),
|
|
151
|
-
("diff", blocks.DiffBlock()),
|
|
152
|
-
# ...
|
|
153
|
-
],
|
|
154
|
-
help_text=_("Article content"),
|
|
155
|
-
)
|
|
156
|
-
|
|
157
|
-
content_panels = Page.content_panels + [
|
|
158
|
-
FieldPanel("content"),
|
|
159
|
-
# ...
|
|
160
|
-
]
|
|
161
|
-
```
|
|
162
|
-
|
|
163
|
-
```html
|
|
164
|
-
<!-- blog/base.html -->
|
|
165
|
-
<!doctype html>
|
|
166
|
-
<html>
|
|
167
|
-
<head>
|
|
168
|
-
<meta charset="UTF-8" />
|
|
169
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
170
|
-
<title>Wagtail Blocks Usage Example</title>
|
|
171
|
-
|
|
172
|
-
<!-- Code highlighting for CodeBlock -->
|
|
173
|
-
<link
|
|
174
|
-
rel="stylesheet"
|
|
175
|
-
href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.11.1/styles/github-dark.min.css"
|
|
176
|
-
/>
|
|
177
|
-
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.11.1/highlight.min.js"></script>
|
|
178
|
-
<script>hljs.highlightAll();</script>
|
|
179
|
-
|
|
180
|
-
<!-- Include stylesheet -->
|
|
181
|
-
{% load static %}
|
|
182
|
-
<link href="{% static 'wagtail_blocks/css/styles.css' %}" rel="stylesheet" type="text/css" />
|
|
183
|
-
</head>
|
|
184
|
-
|
|
185
|
-
<body>
|
|
186
|
-
<main>
|
|
187
|
-
<h1>{{ article.title }}</h1>
|
|
188
|
-
|
|
189
|
-
<div>{{ article.content }}</div>
|
|
190
|
-
</main>
|
|
191
|
-
|
|
192
|
-
<!-- Lucide icons: https://lucide.dev/icons/ -->
|
|
193
|
-
<script src="https://unpkg.com/lucide@latest"></script>
|
|
194
|
-
<script>lucide.createIcons();</script>
|
|
195
|
-
|
|
196
|
-
<!-- For copy buttons in CodeBlock -->
|
|
197
|
-
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.11/clipboard.min.js"></script>
|
|
198
|
-
<script>const btns = new ClipboardJS(".btn-copy");</script>
|
|
199
|
-
</body>
|
|
200
|
-
</html>
|
|
201
|
-
```
|
|
202
|
-
|
|
203
|
-
---
|
|
204
|
-
|
|
205
|
-
## Extending
|
|
206
|
-
|
|
207
|
-
You can easily extend or customize the provided blocks by sub-classing them. For example, to create a custom alert block with additional styles:
|
|
208
|
-
|
|
209
|
-
```python
|
|
210
|
-
from wagtail_blocks import blocks
|
|
211
|
-
|
|
212
|
-
class CustomAlertBlock(blocks.AlertBlock):
|
|
213
|
-
|
|
214
|
-
class Meta:
|
|
215
|
-
template = "path/to/your/custom_alert_template.html"
|
|
216
|
-
icon = "warning"
|
|
217
|
-
label = "Custom Alert"
|
|
218
|
-
```
|
|
219
|
-
|
|
220
|
-
---
|
|
221
|
-
|
|
222
|
-
## Contributing
|
|
223
|
-
|
|
224
|
-
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.
|
|
225
|
-
|
|
226
|
-
---
|
|
227
|
-
|
|
228
|
-
## Support
|
|
229
|
-
|
|
230
|
-
For questions, bug reports, or feature requests, open an issue or join the conversation in [GitHub Discussions](https://github.com/youzarsiph/wagtail-tw-blocks/discussions).
|
|
231
|
-
|
|
232
|
-
---
|
|
233
|
-
|
|
234
|
-
## License
|
|
235
|
-
|
|
236
|
-
Licensed under the MIT License. See the [LICENSE](LICENSE) file for details.
|
|
237
|
-
|