django-cotton-bs5 0.3.0__py3-none-any.whl → 0.5.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.
- cotton_bs5/templates/cotton/badge.html +6 -6
- cotton_bs5/templates/cotton/breadcrumbs/index.html +6 -2
- cotton_bs5/templates/cotton/button_group.html +4 -6
- cotton_bs5/templates/cotton/card/index.html +2 -2
- cotton_bs5/templates/cotton/dropdown/index.html +0 -1
- cotton_bs5/templates/cotton/pagination/index.html +91 -6
- cotton_bs5/templates/cotton/pagination/link.html +13 -3
- cotton_bs5/templates/cotton/pagination/wrapper.html +9 -0
- {django_cotton_bs5-0.3.0.dist-info → django_cotton_bs5-0.5.0.dist-info}/METADATA +2 -2
- {django_cotton_bs5-0.3.0.dist-info → django_cotton_bs5-0.5.0.dist-info}/RECORD +12 -11
- {django_cotton_bs5-0.3.0.dist-info → django_cotton_bs5-0.5.0.dist-info}/LICENSE +0 -0
- {django_cotton_bs5-0.3.0.dist-info → django_cotton_bs5-0.5.0.dist-info}/WHEEL +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
<c-vars variant="primary"
|
|
2
|
-
|
|
3
|
-
{
|
|
4
|
-
{{ class }}" {{ attrs }}>
|
|
5
|
-
{
|
|
6
|
-
|
|
1
|
+
<c-vars variant="primary" pill text />
|
|
2
|
+
{% with element=href|yesno:"a,span" %}
|
|
3
|
+
{# djlint:off #}
|
|
4
|
+
<{{ element }} class="badge text-bg-{{ variant }}{% if pill %} rounded-pill{% endif %}{% if class %} {{ class }}{% endif %}" {{ attrs }}>{{ text }}{{ slot }}</{{ element }}>
|
|
5
|
+
{# djlint:on #}
|
|
6
|
+
{% endwith %}
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
{% load i18n %}
|
|
2
|
-
<c-vars ol_class
|
|
2
|
+
<c-vars ol_class divider="/" items class />
|
|
3
3
|
<nav aria-label="{% trans "breadcrumb" %}"
|
|
4
4
|
style="--bs-breadcrumb-divider: '{{ divider }}'"
|
|
5
5
|
{{ attrs }}>
|
|
6
6
|
<ol class="breadcrumb {{ ol_class }}">
|
|
7
|
-
{
|
|
7
|
+
{% if items %}
|
|
8
|
+
{% for item in items %}<c-breadcrumbs.item :attrs="item" />{% endfor %}
|
|
9
|
+
{% else %}
|
|
10
|
+
{{ slot }}
|
|
11
|
+
{% endif %}
|
|
8
12
|
</ol>
|
|
9
13
|
</nav>
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
{% load i18n %}
|
|
2
2
|
<c-vars size
|
|
3
3
|
vertical
|
|
4
|
+
gap
|
|
4
5
|
class
|
|
5
6
|
label='{% trans "Button group" %}' />
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
{{ attrs }}>
|
|
10
|
-
{{ slot }}
|
|
11
|
-
</div>
|
|
7
|
+
{# djlint:off #}
|
|
8
|
+
<div class="{% if gap %}d-flex gap-{{ gap }}{% if vertical %} flex-column{% endif %}{% else %}btn-group{% if vertical %}-vertical{% endif %}{% endif %} {% if size %} btn-group-{{ size }}{% endif %} {{ class }}" role="group" aria-label="{{ label }}" {{ attrs }}>{{ slot }}</div>
|
|
9
|
+
{# djlint:on #}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
<c-vars class header title minimal />
|
|
1
|
+
<c-vars class header title minimal body_class />
|
|
2
2
|
<div class="card {{ class }}" {{ attrs }}>
|
|
3
3
|
{% if header %}<c-card.header text="{{ header }}" />{% endif %}
|
|
4
4
|
{% if minimal %}
|
|
5
5
|
{{ slot }}
|
|
6
6
|
{% else %}
|
|
7
|
-
<c-card.body>
|
|
7
|
+
<c-card.body class="{{ body_class }}" only>
|
|
8
8
|
{% if title %}<c-card.title text="{{ title }}" />{% endif %}
|
|
9
9
|
{% if subtitle %}<c-card.subtitle text="{{ subtitle }}" />{% endif %}
|
|
10
10
|
{{ slot }}
|
|
@@ -1,6 +1,91 @@
|
|
|
1
|
-
|
|
2
|
-
<
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
{% load i18n %}
|
|
2
|
+
<c-vars label
|
|
3
|
+
page_obj
|
|
4
|
+
page_window="5"
|
|
5
|
+
use_icons
|
|
6
|
+
show_first_and_last />
|
|
7
|
+
{% if page_obj.paginator.num_pages > 1 %}
|
|
8
|
+
<c-pagination.wrapper :attrs="attrs">
|
|
9
|
+
{# --- First page --- #}
|
|
10
|
+
{% if not show_first_and_last %}
|
|
11
|
+
<c-pagination.link :page="1"
|
|
12
|
+
:disabled="{{ page_obj.has_previous|yesno:"False,True" }}"
|
|
13
|
+
text="{% trans "First" %}">
|
|
14
|
+
{% if use_icons %}
|
|
15
|
+
<svg height="1em"
|
|
16
|
+
style="vertical-align: -0.175em"
|
|
17
|
+
fill="currentColor"
|
|
18
|
+
viewBox="0 0 16 16">
|
|
19
|
+
<path fill-rule="evenodd" d="M8.354 1.646a.5.5 0 0 1 0 .708L2.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0" />
|
|
20
|
+
<path fill-rule="evenodd" d="M12.354 1.646a.5.5 0 0 1 0 .708L6.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0" />
|
|
21
|
+
</svg>
|
|
22
|
+
{% else %}
|
|
23
|
+
{% trans "First" %}
|
|
24
|
+
{% endif %}
|
|
25
|
+
</c-pagination.link>
|
|
26
|
+
{% endif %}
|
|
27
|
+
{# --- Previous page --- #}
|
|
28
|
+
<c-pagination.link :page="{% if page_obj.has_previous %}{{ page_obj.previous_page_number }}{% endif %}"
|
|
29
|
+
:disabled="{{ page_obj.has_previous|yesno:"False,True" }}"
|
|
30
|
+
text="{% trans "Previous" %}">
|
|
31
|
+
{% if use_icons %}
|
|
32
|
+
<svg height="1em"
|
|
33
|
+
style="vertical-align: -0.175em"
|
|
34
|
+
fill="currentColor"
|
|
35
|
+
viewBox="0 0 16 16">
|
|
36
|
+
<path fill-rule="evenodd" d="M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0" />
|
|
37
|
+
</svg>
|
|
38
|
+
{% else %}
|
|
39
|
+
{% trans "Previous" %}
|
|
40
|
+
{% endif %}
|
|
41
|
+
</c-pagination.link>
|
|
42
|
+
{% with "-"|add:page_window as negative_window %}
|
|
43
|
+
{% for num in page_obj.paginator.page_range %}
|
|
44
|
+
{% if forloop.first or forloop.last and show_first_and_last %}
|
|
45
|
+
<c-pagination.link page="{{ num }}"
|
|
46
|
+
text="{{ num }}"
|
|
47
|
+
:active="{% if num == page_obj.number %}True{% endif %}" />
|
|
48
|
+
{% elif num >= page_obj.number|add:negative_window and num <= page_obj.number|add:page_window %}
|
|
49
|
+
<c-pagination.link page="{{ num }}"
|
|
50
|
+
text="{{ num }}"
|
|
51
|
+
:active="{% if num == page_obj.number %}True{% endif %}" />
|
|
52
|
+
{% elif num == page_obj.number|add:negative_window|add:"-1" or num == page_obj.number|add:page_window|add:"1" %}
|
|
53
|
+
<c-pagination.link text="..." disabled />
|
|
54
|
+
{% endif %}
|
|
55
|
+
{% endfor %}
|
|
56
|
+
{% endwith %}
|
|
57
|
+
{# --- Next page --- #}
|
|
58
|
+
<c-pagination.link :page="{% if page_obj.has_next %}{{ page_obj.next_page_number }}{% endif %}"
|
|
59
|
+
:disabled="{{ page_obj.has_next|yesno:"False,True" }}"
|
|
60
|
+
text="{% trans "Next" %}">
|
|
61
|
+
{% if use_icons %}
|
|
62
|
+
<svg height="1em"
|
|
63
|
+
style="vertical-align: -0.175em"
|
|
64
|
+
fill="currentColor"
|
|
65
|
+
viewBox="0 0 16 16">
|
|
66
|
+
<path fill-rule="evenodd" d="M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708" />
|
|
67
|
+
</svg>
|
|
68
|
+
{% else %}
|
|
69
|
+
{% trans "Next" %}
|
|
70
|
+
{% endif %}
|
|
71
|
+
</c-pagination.link>
|
|
72
|
+
{% if not show_first_and_last %}
|
|
73
|
+
{# --- Last page --- #}
|
|
74
|
+
<c-pagination.link :page="{{ page_obj.paginator.num_pages }}"
|
|
75
|
+
:disabled="{{ page_obj.has_next|yesno:"False,True" }}"
|
|
76
|
+
text="{% trans "Last" %}">
|
|
77
|
+
{% if use_icons %}
|
|
78
|
+
<svg height="1em"
|
|
79
|
+
style="vertical-align: -0.175em"
|
|
80
|
+
fill="currentColor"
|
|
81
|
+
viewBox="0 0 16 16">
|
|
82
|
+
<path fill-rule="evenodd" d="M3.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L9.293 8 3.646 2.354a.5.5 0 0 1 0-.708" />
|
|
83
|
+
<path fill-rule="evenodd" d="M7.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L13.293 8 7.646 2.354a.5.5 0 0 1 0-.708" />
|
|
84
|
+
</svg>
|
|
85
|
+
{% else %}
|
|
86
|
+
{% trans "Last" %}
|
|
87
|
+
{% endif %}
|
|
88
|
+
</c-pagination.link>
|
|
89
|
+
{% endif %}
|
|
90
|
+
</c-pagination.wrapper>
|
|
91
|
+
{% endif %}
|
|
@@ -1,14 +1,24 @@
|
|
|
1
1
|
<c-vars page text active disabled class />
|
|
2
2
|
<li class="page-item{% if active %} active{% endif %}{% if disabled %} disabled{% endif %}">
|
|
3
3
|
{% if disabled %}
|
|
4
|
-
<span class="page-link {{ class }}" {{ attrs }}>
|
|
4
|
+
<span class="page-link {{ class }}" {{ attrs }}>
|
|
5
|
+
{% if slot %}
|
|
6
|
+
{{ slot }}
|
|
7
|
+
{% else %}
|
|
8
|
+
{{ text }}
|
|
9
|
+
{% endif %}
|
|
10
|
+
</span>
|
|
5
11
|
{% else %}
|
|
6
12
|
<a class="page-link {{ class }}"
|
|
7
|
-
href="?page={{ page }}"
|
|
13
|
+
href="?{{ page_param|default:"page" }}={{ page }}"
|
|
8
14
|
{% if active %}aria-current="page"{% endif %}
|
|
9
15
|
{% if disabled %}tabindex="-1" aria-disabled="true"{% endif %}
|
|
10
16
|
{{ attrs }}>
|
|
11
|
-
{
|
|
17
|
+
{% if slot %}
|
|
18
|
+
{{ slot }}
|
|
19
|
+
{% else %}
|
|
20
|
+
{{ text }}
|
|
21
|
+
{% endif %}
|
|
12
22
|
</a>
|
|
13
23
|
{% endif %}
|
|
14
24
|
</li>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: django-cotton-bs5
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.5.0
|
|
4
4
|
Summary: Bootstrap 5 components for use with Django Cotton.
|
|
5
5
|
License: MIT
|
|
6
6
|
Author: Sam
|
|
@@ -13,7 +13,7 @@ Classifier: Programming Language :: Python :: 3.11
|
|
|
13
13
|
Classifier: Programming Language :: Python :: 3.12
|
|
14
14
|
Provides-Extra: django-compressor
|
|
15
15
|
Requires-Dist: django-compressor (>=4.5.1,<5.0.0) ; extra == "django-compressor"
|
|
16
|
-
Requires-Dist: django-cotton (
|
|
16
|
+
Requires-Dist: django-cotton (>=2.3.1)
|
|
17
17
|
Requires-Dist: django-libsass (>=0.9,<0.10)
|
|
18
18
|
Description-Content-Type: text/markdown
|
|
19
19
|
|
|
@@ -99,16 +99,16 @@ cotton_bs5/templates/cotton/accordion/header.html,sha256=B38j90UQ_Q5PXKRduFfCToO
|
|
|
99
99
|
cotton_bs5/templates/cotton/accordion/index.html,sha256=JDmnwJLGYcbDOqUSVP9EvONiQVbjwnJJ69btdxUkf9c,163
|
|
100
100
|
cotton_bs5/templates/cotton/accordion/item.html,sha256=lsaDkKDGA5bfgb0ER7Z9nsS5M43dKyg-ip-01z8SE7E,276
|
|
101
101
|
cotton_bs5/templates/cotton/alert.html,sha256=PfRSBUW4cFvx6lmTXzpP8R0JDGvPX7k1i5jMjD1YiuY,386
|
|
102
|
-
cotton_bs5/templates/cotton/badge.html,sha256=
|
|
103
|
-
cotton_bs5/templates/cotton/breadcrumbs/index.html,sha256=
|
|
102
|
+
cotton_bs5/templates/cotton/badge.html,sha256=7B84yZIZWhtjdNsoeM6-FMiZEsTyTtauzIzMSws3fXU,303
|
|
103
|
+
cotton_bs5/templates/cotton/breadcrumbs/index.html,sha256=Z4UHmU84mu121otLHUy7GBasmgvryG_ioBrEB9E-lMw,376
|
|
104
104
|
cotton_bs5/templates/cotton/breadcrumbs/item.html,sha256=h0_RmjgC35XQ-3cJ3MgPcVCRwUN6ors2UzJX--JwjxE,397
|
|
105
105
|
cotton_bs5/templates/cotton/button/dismiss.html,sha256=Q1pBNnh8mFACc73XmQzLD9TgmPToZ374sW26SNALnCI,253
|
|
106
106
|
cotton_bs5/templates/cotton/button/index.html,sha256=bW8yrGFxJk-lkbla9RgM3vaUyxyDnwWVoMiZncBPQv4,440
|
|
107
|
-
cotton_bs5/templates/cotton/button_group.html,sha256=
|
|
107
|
+
cotton_bs5/templates/cotton/button_group.html,sha256=HuS7PDniLkVCXovonzRqFVQrGqYfezyQfq0ihTVbwM0,429
|
|
108
108
|
cotton_bs5/templates/cotton/card/body.html,sha256=V7_erMPFbYfCWeMeI9BCtiqrKpr4Qr2LGd4uxrQhkA4,162
|
|
109
109
|
cotton_bs5/templates/cotton/card/footer.html,sha256=5wop-wWc-Pj5HU8cZLNY4L7t-cEXskyz6WiECAKvOs8,87
|
|
110
110
|
cotton_bs5/templates/cotton/card/header.html,sha256=MWK3s26XYMhPTPGXpUg8P6KJ2jLSkeQjEU6oTovmPRw,103
|
|
111
|
-
cotton_bs5/templates/cotton/card/index.html,sha256=
|
|
111
|
+
cotton_bs5/templates/cotton/card/index.html,sha256=MGQm-CoSsO13MZ7qR6GXXApM6ClzO3wGmqdhqsbLfAk,453
|
|
112
112
|
cotton_bs5/templates/cotton/card/subtitle.html,sha256=u7XKXndYL-Nyp5HBl51D6TXqBsLvFPVcUurxqaWGm0s,68
|
|
113
113
|
cotton_bs5/templates/cotton/card/title.html,sha256=qBEY1EsHhgVsOAX1V_C-zAdX5DOKRE6Tn5gJfa-9txE,110
|
|
114
114
|
cotton_bs5/templates/cotton/carousel/button.html,sha256=bvvqn1Hw-qMI1G1kKuulUBiuV4hMhVfPPaOCK8ws5DY,317
|
|
@@ -118,7 +118,7 @@ cotton_bs5/templates/cotton/carousel/item.html,sha256=Q_kpQa7_uyi0_0BUxTH5_tuqzF
|
|
|
118
118
|
cotton_bs5/templates/cotton/collapse.html,sha256=N9lcZgBa9OxcgCHgNolmU17CM5uTbxkx6kNcY-BGvlc,344
|
|
119
119
|
cotton_bs5/templates/cotton/dropdown/divider.html,sha256=EuKZtrn23FJSIXy1VNb96Ft1aZTNzAzEoSrehZsiGtI,32
|
|
120
120
|
cotton_bs5/templates/cotton/dropdown/header.html,sha256=vi27RD2jKOvJCdLqceQtB1PaJLDkrRoikpkue0DGA-A,83
|
|
121
|
-
cotton_bs5/templates/cotton/dropdown/index.html,sha256=
|
|
121
|
+
cotton_bs5/templates/cotton/dropdown/index.html,sha256=tana4NotkE2h3Q0tRNS94TMc8NcgDlLMO5EdgyyH9FI,290
|
|
122
122
|
cotton_bs5/templates/cotton/dropdown/item.html,sha256=8hVy3gl_ZPkO4r07NjQKQ9T0NdKJjIDpw7wLAgjCysM,554
|
|
123
123
|
cotton_bs5/templates/cotton/dropdown/toggle.html,sha256=cZDrs80yuwyMk3bCV2hGn5XycyC1WT6k7NeMYxxi0Mk,447
|
|
124
124
|
cotton_bs5/templates/cotton/grid/col.html,sha256=nIcLePAN8BJs7rlz5UJdCknIxEq2uOFpZbKSlPlI47s,255
|
|
@@ -140,8 +140,9 @@ cotton_bs5/templates/cotton/offcanvas/footer.html,sha256=vgAIGcMzTkgdUeWkPzMngyj
|
|
|
140
140
|
cotton_bs5/templates/cotton/offcanvas/header.html,sha256=AOuxvVaTUM8gz9LVR61nBvt12jJnWGHMmkgX-h7xFsg,167
|
|
141
141
|
cotton_bs5/templates/cotton/offcanvas/index.html,sha256=PaGgaQmy3X5aZPrzfRRYMw22WLGY9j0CjhpPC3K1u-g,289
|
|
142
142
|
cotton_bs5/templates/cotton/offcanvas/title.html,sha256=eigDuIXB4fRpby8YpjdodAsqsFmNc7lXNsOMB_yr1yg,91
|
|
143
|
-
cotton_bs5/templates/cotton/pagination/index.html,sha256=
|
|
144
|
-
cotton_bs5/templates/cotton/pagination/link.html,sha256=
|
|
143
|
+
cotton_bs5/templates/cotton/pagination/index.html,sha256=5CygBkW6QitQrCoZrdne3gTF2qxOHgiUIX3gXDcIIQ0,4262
|
|
144
|
+
cotton_bs5/templates/cotton/pagination/link.html,sha256=UF8eSakqD79XB2cRUb5DCp0fy9O1EFS2Kvy5bdAiYTo,687
|
|
145
|
+
cotton_bs5/templates/cotton/pagination/wrapper.html,sha256=798t9lf8gKX4N3uXZf-U--xOGV58LOifnIDKLaEj474,263
|
|
145
146
|
cotton_bs5/templates/cotton/placeholder.html,sha256=fxvSk_X03S2dQWDo1VT27vAppeSWZEnJUCVPaUocmsU,309
|
|
146
147
|
cotton_bs5/templates/cotton/progress.html,sha256=jPmfL3cStIbvoCz1Rg-ljlJz64edtlkjz7TFWePM4EY,672
|
|
147
148
|
cotton_bs5/templates/cotton/ratio.html,sha256=yarrtDic-Eooy1O1C_mfOOJ1-spUscSs403N9zMB5AY,209
|
|
@@ -155,7 +156,7 @@ cotton_bs5/templates/cotton/toast/activate.html,sha256=D-qh8lfEWoJWMKdUG0PT4jdNA
|
|
|
155
156
|
cotton_bs5/templates/cotton/toast/body.html,sha256=cneCr26QtF48gYR7kW5wa_QO0Qv5nGJDlXR6PjVueMU,71
|
|
156
157
|
cotton_bs5/templates/cotton/toast/header.html,sha256=izlXp-D5cKEIeIj297pma9XYgGNo6lkrgvHw1QscOR8,115
|
|
157
158
|
cotton_bs5/templates/cotton/toast/index.html,sha256=av7EWcLGcB90KUBCru6qwtl78PkM228n5OxuJewc4OI,304
|
|
158
|
-
django_cotton_bs5-0.
|
|
159
|
-
django_cotton_bs5-0.
|
|
160
|
-
django_cotton_bs5-0.
|
|
161
|
-
django_cotton_bs5-0.
|
|
159
|
+
django_cotton_bs5-0.5.0.dist-info/LICENSE,sha256=jAcYHTznehUzk6dbbjLdSq9Xo2S_OmscgUKA94hUoMo,1072
|
|
160
|
+
django_cotton_bs5-0.5.0.dist-info/METADATA,sha256=mG0iOvYWEuJHeFQWKpmHhT9dNO1RWtBJ838DXu0qAcU,3223
|
|
161
|
+
django_cotton_bs5-0.5.0.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
|
162
|
+
django_cotton_bs5-0.5.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|