django-unfold 0.62.0__py3-none-any.whl → 0.64.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.
Files changed (71) hide show
  1. {django_unfold-0.62.0.dist-info → django_unfold-0.64.0.dist-info}/METADATA +15 -2
  2. {django_unfold-0.62.0.dist-info → django_unfold-0.64.0.dist-info}/RECORD +71 -62
  3. unfold/admin.py +1 -1
  4. unfold/contrib/constance/__init__.py +0 -0
  5. unfold/contrib/constance/apps.py +6 -0
  6. unfold/contrib/constance/settings.py +32 -0
  7. unfold/contrib/constance/templates/admin/constance/change_list.html +52 -0
  8. unfold/contrib/constance/templates/admin/constance/includes/results_list.html +71 -0
  9. unfold/contrib/filters/templates/unfold/filters/filters_numeric_slider.html +1 -1
  10. unfold/contrib/guardian/templates/admin/guardian/model/obj_perms_manage.html +0 -24
  11. unfold/contrib/guardian/templates/admin/guardian/model/obj_perms_manage_group.html +0 -26
  12. unfold/contrib/guardian/templates/admin/guardian/model/obj_perms_manage_user.html +0 -26
  13. unfold/contrib/import_export/templates/admin/import_export/export.html +0 -23
  14. unfold/contrib/import_export/templates/admin/import_export/import.html +0 -23
  15. unfold/contrib/simple_history/templates/simple_history/object_history_form.html +1 -33
  16. unfold/contrib/simple_history/templates/simple_history/object_history_list.html +0 -1
  17. unfold/dataclasses.py +8 -0
  18. unfold/fields.py +1 -1
  19. unfold/settings.py +28 -22
  20. unfold/sites.py +120 -43
  21. unfold/static/admin/js/inlines.js +42 -17
  22. unfold/static/unfold/css/styles.css +2 -2
  23. unfold/static/unfold/js/app.js +147 -9
  24. unfold/static/unfold/js/select2.init.js +4 -0
  25. unfold/styles.css +33 -33
  26. unfold/templates/admin/app_index.html +0 -18
  27. unfold/templates/admin/auth/user/change_password.html +1 -26
  28. unfold/templates/admin/base.html +0 -16
  29. unfold/templates/admin/change_form.html +7 -34
  30. unfold/templates/admin/change_list.html +0 -19
  31. unfold/templates/admin/change_list_results.html +2 -2
  32. unfold/templates/admin/delete_confirmation.html +0 -21
  33. unfold/templates/admin/delete_selected_confirmation.html +0 -22
  34. unfold/templates/admin/includes/fieldset.html +1 -1
  35. unfold/templates/admin/index.html +0 -2
  36. unfold/templates/admin/login.html +1 -1
  37. unfold/templates/admin/object_history.html +0 -24
  38. unfold/templates/registration/logged_out.html +12 -7
  39. unfold/templates/registration/password_change_done.html +0 -17
  40. unfold/templates/registration/password_change_form.html +0 -17
  41. unfold/templates/unfold/components/navigation.html +2 -2
  42. unfold/templates/unfold/components/table.html +55 -9
  43. unfold/templates/unfold/helpers/boolean.html +6 -6
  44. unfold/templates/unfold/helpers/command.html +53 -0
  45. unfold/templates/unfold/helpers/command_history.html +54 -0
  46. unfold/templates/unfold/helpers/command_results.html +50 -0
  47. unfold/templates/unfold/helpers/header_back_button.html +10 -2
  48. unfold/templates/unfold/helpers/header_title.html +11 -0
  49. unfold/templates/unfold/helpers/label.html +1 -1
  50. unfold/templates/unfold/helpers/navigation_header.html +2 -2
  51. unfold/templates/unfold/helpers/pagination_inline.html +28 -20
  52. unfold/templates/unfold/helpers/search.html +40 -22
  53. unfold/templates/unfold/helpers/search_results.html +2 -2
  54. unfold/templates/unfold/helpers/shortcut.html +1 -1
  55. unfold/templates/unfold/helpers/site_dropdown.html +1 -1
  56. unfold/templates/unfold/helpers/submit.html +1 -1
  57. unfold/templates/unfold/helpers/tab_items.html +15 -33
  58. unfold/templates/unfold/helpers/tab_list.html +1 -1
  59. unfold/templates/unfold/helpers/unauthenticated_header.html +2 -2
  60. unfold/templates/unfold/helpers/unauthenticated_title.html +1 -1
  61. unfold/templates/unfold/helpers/welcomemsg.html +6 -18
  62. unfold/templates/unfold/layouts/base_simple.html +0 -6
  63. unfold/templates/unfold/layouts/skeleton.html +4 -1
  64. unfold/templates/unfold/layouts/unauthenticated.html +0 -2
  65. unfold/templates/unfold/widgets/related_widget_wrapper.html +4 -4
  66. unfold/templatetags/unfold.py +141 -0
  67. unfold/utils.py +25 -10
  68. unfold/views.py +4 -1
  69. unfold/widgets.py +6 -1
  70. {django_unfold-0.62.0.dist-info → django_unfold-0.64.0.dist-info}/LICENSE.md +0 -0
  71. {django_unfold-0.62.0.dist-info → django_unfold-0.64.0.dist-info}/WHEEL +0 -0
@@ -49,7 +49,7 @@ function searchForm() {
49
49
  *************************************************************/
50
50
  function searchDropdown() {
51
51
  return {
52
- openSearchResults: true,
52
+ openSearchResults: false,
53
53
  currentIndex: 0,
54
54
  applyShortcut(event) {
55
55
  if (
@@ -77,11 +77,151 @@ function searchDropdown() {
77
77
  .length;
78
78
  },
79
79
  selectItem() {
80
- const items = document
81
- .getElementById("search-results")
82
- .querySelectorAll("li");
80
+ const href = this.items[this.currentIndex - 1].querySelector("a").href;
81
+ window.location = href;
82
+ },
83
+ };
84
+ }
83
85
 
84
- window.location = items[this.currentIndex - 1].querySelector("a").href;
86
+ /*************************************************************
87
+ * Search command
88
+ *************************************************************/
89
+ function searchCommand() {
90
+ return {
91
+ el: document.getElementById("command-results"),
92
+ items: undefined,
93
+ hasResults: false,
94
+ openCommandResults: false,
95
+ currentIndex: 0,
96
+ commandHistory: JSON.parse(localStorage.getItem("commandHistory") || "[]"),
97
+ handleOpen() {
98
+ this.openCommandResults = true;
99
+ this.toggleBodyOverflow();
100
+ setTimeout(() => {
101
+ this.$refs.searchInputCommand.focus();
102
+ }, 20);
103
+
104
+ this.items = document.querySelectorAll("#command-history li");
105
+ },
106
+ handleShortcut(event) {
107
+ if (
108
+ event.key === "k" &&
109
+ (event.metaKey || event.ctrlKey) &&
110
+ document.activeElement.tagName.toLowerCase() !== "input" &&
111
+ document.activeElement.tagName.toLowerCase() !== "textarea" &&
112
+ !document.activeElement.isContentEditable
113
+ ) {
114
+ event.preventDefault();
115
+ this.handleOpen();
116
+ }
117
+ },
118
+ handleEscape() {
119
+ if (this.$refs.searchInputCommand.value === "") {
120
+ this.toggleBodyOverflow();
121
+ this.openCommandResults = false;
122
+ this.el.innerHTML = "";
123
+ this.items = undefined;
124
+ this.currentIndex = 0;
125
+ } else {
126
+ this.$refs.searchInputCommand.value = "";
127
+ }
128
+ },
129
+ handleContentLoaded(event) {
130
+ this.items = event.target.querySelectorAll("li");
131
+ this.currentIndex = 0;
132
+ this.hasResults = this.items.length > 0;
133
+
134
+ if (!this.hasResults) {
135
+ this.items = document.querySelectorAll("#command-history li");
136
+ }
137
+
138
+ new SimpleBar(event.target);
139
+ },
140
+ handleOutsideClick() {
141
+ this.$refs.searchInputCommand.value = "";
142
+ this.openCommandResults = false;
143
+ this.toggleBodyOverflow();
144
+ },
145
+ toggleBodyOverflow() {
146
+ document
147
+ .getElementsByTagName("body")[0]
148
+ .classList.toggle("overflow-hidden");
149
+ },
150
+ scrollToActiveItem() {
151
+ const item = this.items[this.currentIndex - 1];
152
+
153
+ if (item) {
154
+ item.scrollIntoView({
155
+ behavior: "smooth",
156
+ block: "nearest",
157
+ });
158
+ }
159
+ },
160
+ nextItem() {
161
+ if (this.currentIndex < this.items.length) {
162
+ this.currentIndex++;
163
+ this.scrollToActiveItem();
164
+ }
165
+ },
166
+ prevItem() {
167
+ if (this.currentIndex > 1) {
168
+ this.currentIndex--;
169
+ this.scrollToActiveItem();
170
+ }
171
+ },
172
+ selectItem(addHistory) {
173
+ const link = this.items[this.currentIndex - 1].querySelector("a");
174
+ const data = {
175
+ title: link.dataset.title,
176
+ description: link.dataset.description,
177
+ link: link.href,
178
+ favorite: false,
179
+ };
180
+
181
+ if (addHistory) {
182
+ this.addToHistory(data);
183
+ }
184
+
185
+ window.location = link.href;
186
+ },
187
+ addToHistory(data) {
188
+ let commandHistory = JSON.parse(
189
+ localStorage.getItem("commandHistory") || "[]"
190
+ );
191
+
192
+ for (const [index, item] of commandHistory.entries()) {
193
+ if (item.link === data.link) {
194
+ commandHistory.splice(index, 1);
195
+ }
196
+ }
197
+
198
+ commandHistory.unshift(data);
199
+ commandHistory = commandHistory.slice(0, 10);
200
+ this.commandHistory = commandHistory;
201
+ localStorage.setItem("commandHistory", JSON.stringify(commandHistory));
202
+ },
203
+ removeFromHistory(event, index) {
204
+ event.preventDefault();
205
+
206
+ const commandHistory = JSON.parse(
207
+ localStorage.getItem("commandHistory") || "[]"
208
+ );
209
+ commandHistory.splice(index, 1);
210
+ this.commandHistory = commandHistory;
211
+ localStorage.setItem("commandHistory", JSON.stringify(commandHistory));
212
+ },
213
+ toggleFavorite(event, index) {
214
+ event.preventDefault();
215
+
216
+ const commandHistory = JSON.parse(
217
+ localStorage.getItem("commandHistory") || "[]"
218
+ );
219
+
220
+ commandHistory[index].favorite = !commandHistory[index].favorite;
221
+ this.commandHistory = commandHistory.sort(
222
+ (a, b) => Number(b.favorite) - Number(a.favorite)
223
+ );
224
+ localStorage.setItem("commandHistory", JSON.stringify(commandHistory));
85
225
  },
86
226
  };
87
227
  }
@@ -324,9 +464,7 @@ const renderCharts = () => {
324
464
  .getPropertyValue("--color-base-300")
325
465
  .trim();
326
466
 
327
- const borderColor = hasDarkClass
328
- ? `rgb(${baseColorDark})`
329
- : `rgb(${baseColorLight})`;
467
+ const borderColor = hasDarkClass ? baseColorDark : baseColorLight;
330
468
 
331
469
  for (const chart of charts) {
332
470
  chart.options.scales.x.grid.color = borderColor;
@@ -355,7 +493,7 @@ const renderCharts = () => {
355
493
  const color = getComputedStyle(document.documentElement)
356
494
  .getPropertyValue(cssVar)
357
495
  .trim();
358
- dataset[colorProp] = `rgb(${color})`;
496
+ dataset[colorProp] = color;
359
497
  }
360
498
  };
361
499
 
@@ -8,6 +8,10 @@
8
8
  return;
9
9
  }
10
10
 
11
+ if ($(element).hasClass("select2-hidden-accessible")) {
12
+ return;
13
+ }
14
+
11
15
  $(element).select2();
12
16
  });
13
17
 
unfold/styles.css CHANGED
@@ -9,7 +9,7 @@
9
9
  }
10
10
  }
11
11
 
12
- @source inline("h-3 w-3 h-[64px] w-[65px]! left-[65px] dark:hover:bg-white/[.06] translate-x-1/4 -translate-y-1/4");
12
+ @source inline("bg-white/[.06] border-white/40 h-3 w-3 h-[64px] w-[65px]! left-[65px] {dark:,}text-base-{50,{100..900},950} dark:hover:bg-white/[.06] translate-x-1/4 -translate-y-1/4");
13
13
  @source inline("{-,}{top,bottom,left,right}-{0..6}");
14
14
  @source inline("rounded rounded-{t,r,b,l} rounded-{t,r,b,l}-default");
15
15
  @source inline("{md:,lg:,2xl:,}relative {md:,lg:,2xl:,}flex {md:,lg:,2xl:,}absolute {md:,lg:,2xl:,}sticky");
@@ -35,43 +35,43 @@
35
35
 
36
36
  @theme {
37
37
  --font-sans: 'Inter', sans-serif;
38
- --shadow-raised: 0 2px 12px rgb(var(--color-base-300));
39
- --shadow-raised-dark: 0 2px 12px rgb(var(--color-base-700));
38
+ --shadow-raised: 0 2px 12px var(--color-base-300);
39
+ --shadow-raised-dark: 0 2px 12px var(--color-base-700);
40
40
  }
41
41
 
42
42
  @theme inline{
43
43
  --radius-default: var(--border-radius, 6px);
44
44
 
45
- --color-primary-50: rgb(var(--color-primary-50));
46
- --color-primary-100: rgb(var(--color-primary-100));
47
- --color-primary-200: rgb(var(--color-primary-200));
48
- --color-primary-300: rgb(var(--color-primary-300));
49
- --color-primary-400: rgb(var(--color-primary-400));
50
- --color-primary-500: rgb(var(--color-primary-500));
51
- --color-primary-600: rgb(var(--color-primary-600));
52
- --color-primary-700: rgb(var(--color-primary-700));
53
- --color-primary-800: rgb(var(--color-primary-800));
54
- --color-primary-900: rgb(var(--color-primary-900));
55
- --color-primary-950: rgb(var(--color-primary-950));
56
-
57
- --color-base-50: rgb(var(--color-base-50));
58
- --color-base-100: rgb(var(--color-base-100));
59
- --color-base-200: rgb(var(--color-base-200));
60
- --color-base-300: rgb(var(--color-base-300));
61
- --color-base-400: rgb(var(--color-base-400));
62
- --color-base-500: rgb(var(--color-base-500));
63
- --color-base-600: rgb(var(--color-base-600));
64
- --color-base-700: rgb(var(--color-base-700));
65
- --color-base-800: rgb(var(--color-base-800));
66
- --color-base-900: rgb(var(--color-base-900));
67
- --color-base-950: rgb(var(--color-base-950));
68
-
69
- --color-font-subtle-light: rgb(var(--color-font-subtle-light));
70
- --color-font-subtle-dark: rgb(var(--color-font-subtle-dark));
71
- --color-font-default-light: rgb(var(--color-font-default-light));
72
- --color-font-default-dark: rgb(var(--color-font-default-dark));
73
- --color-font-important-light: rgb(var(--color-font-important-light));
74
- --color-font-important-dark: rgb(var(--color-font-important-dark));
45
+ --color-primary-50: var(--color-primary-50);
46
+ --color-primary-100: var(--color-primary-100);
47
+ --color-primary-200: var(--color-primary-200);
48
+ --color-primary-300: var(--color-primary-300);
49
+ --color-primary-400: var(--color-primary-400);
50
+ --color-primary-500: var(--color-primary-500);
51
+ --color-primary-600: var(--color-primary-600);
52
+ --color-primary-700: var(--color-primary-700);
53
+ --color-primary-800: var(--color-primary-800);
54
+ --color-primary-900: var(--color-primary-900);
55
+ --color-primary-950: var(--color-primary-950);
56
+
57
+ --color-base-50: var(--color-base-50);
58
+ --color-base-100: var(--color-base-100);
59
+ --color-base-200: var(--color-base-200);
60
+ --color-base-300: var(--color-base-300);
61
+ --color-base-400: var(--color-base-400);
62
+ --color-base-500: var(--color-base-500);
63
+ --color-base-600: var(--color-base-600);
64
+ --color-base-700: var(--color-base-700);
65
+ --color-base-800: var(--color-base-800);
66
+ --color-base-900: var(--color-base-900);
67
+ --color-base-950: var(--color-base-950);
68
+
69
+ --color-font-subtle-light: var(--color-font-subtle-light);
70
+ --color-font-subtle-dark: var(--color-font-subtle-dark);
71
+ --color-font-default-light: var(--color-font-default-light);
72
+ --color-font-default-dark: var(--color-font-default-dark);
73
+ --color-font-important-light: var(--color-font-important-light);
74
+ --color-font-important-dark: var(--color-font-important-dark);
75
75
  }
76
76
 
77
77
  @utility field-sizing-content {
@@ -6,24 +6,6 @@
6
6
 
7
7
  {% block bodyclass %}{{ block.super }} app-{{ app_label }}{% endblock %}
8
8
 
9
- {% if not is_popup %}
10
- {% block breadcrumbs %}
11
- <div class="px-12">
12
- <div class="container mb-12 mx-auto -my-3">
13
- <ul class="flex flex-wrap">
14
- {% url 'admin:index' as link %}
15
- {% trans 'Home' as name %}
16
- {% include 'unfold/helpers/breadcrumb_item.html' with link=link name=name %}
17
-
18
- {% for app in app_list %}
19
- {% include 'unfold/helpers/breadcrumb_item.html' with link='' name=app.name|capfirst %}
20
- {% endfor %}
21
- </ul>
22
- </div>
23
- </div>
24
- {% endblock %}
25
- {% endif %}
26
-
27
9
  {% block branding %}
28
10
  {% include "unfold/helpers/site_branding.html" %}
29
11
  {% endblock %}
@@ -2,33 +2,8 @@
2
2
  {% load admin_urls i18n static %}
3
3
 
4
4
  {% block extrastyle %}{{ block.super }}{% endblock %}
5
- {% block bodyclass %}{{ block.super }} {{ opts.app_label }}-{{ opts.model_name }} change-form{% endblock %}
6
5
 
7
- {% if not is_popup %}
8
- {% block breadcrumbs %}
9
- <div class="px-12">
10
- <div class="container mb-12 mx-auto -my-3">
11
- <ul class="flex flex-wrap">
12
- {% url 'admin:index' as link %}
13
- {% trans 'Home' as name %}
14
- {% include 'unfold/helpers/breadcrumb_item.html' with link=link name=name %}
15
-
16
- {% url 'admin:app_list' app_label=opts.app_label as link %}
17
- {% include 'unfold/helpers/breadcrumb_item.html' with link=link name=opts.app_config.verbose_name %}
18
-
19
- {% url opts|admin_urlname:'changelist' as link %}
20
- {% include 'unfold/helpers/breadcrumb_item.html' with link=link name=opts.verbose_name_plural|capfirst %}
21
-
22
- {% url opts|admin_urlname:'change' original.pk|admin_urlquote as link %}
23
- {% include 'unfold/helpers/breadcrumb_item.html' with link=link name=original|truncatewords:"18" %}
24
-
25
- {% translate 'Change password' as breadcrumb_name %}
26
- {% include 'unfold/helpers/breadcrumb_item.html' with link='' name=breadcrumb_name %}
27
- </ul>
28
- </div>
29
- </div>
30
- {% endblock %}
31
- {% endif %}
6
+ {% block bodyclass %}{{ block.super }} {{ opts.app_label }}-{{ opts.model_name }} change-form{% endblock %}
32
7
 
33
8
  {% block content %}
34
9
  <div id="content-main">
@@ -13,22 +13,6 @@
13
13
  <div id="main" class="bg-white flex flex-col grow min-w-0 dark:bg-base-900 {% element_classes 'main' %}">
14
14
  {% include "unfold/helpers/header.html" %}
15
15
 
16
- {% if not is_popup %}
17
- {% spaceless %}
18
- {% block breadcrumbs %}
19
- <div class="px-4">
20
- <div class="container mb-12 mx-auto -my-3">
21
- <ul class="flex flex-wrap">
22
- {% url 'admin:index' as link %}
23
- {% trans 'Home' as name %}
24
- {% include 'unfold/helpers/breadcrumb_item.html' with link=link name=name %}
25
- {% block custom_breadcrumbs %}{% endblock %}
26
- </ul>
27
- </div>
28
- </div>
29
- {% endblock %}
30
- {% endspaceless %}
31
- {% endif %}
32
16
 
33
17
  {% block messages %}
34
18
  <div class="px-4">
@@ -9,39 +9,6 @@
9
9
 
10
10
  {% block bodyclass %}{{ block.super }} app-{{ opts.app_label }} model-{{ opts.model_name }} change-form{% endblock %}
11
11
 
12
- {% if not is_popup %}
13
- {% block breadcrumbs %}
14
- <div class="px-4">
15
- <div class="container mb-6 mx-auto -my-3 lg:mb-12">
16
- <ul class="flex flex-wrap">
17
- {% url 'admin:index' as link %}
18
- {% trans 'Home' as name %}
19
- {% include 'unfold/helpers/breadcrumb_item.html' with link=link name=name %}
20
-
21
- {% url 'admin:app_list' app_label=opts.app_label as link %}
22
- {% include 'unfold/helpers/breadcrumb_item.html' with link=link name=opts.app_config.verbose_name %}
23
-
24
- {% if has_view_permission %}
25
- {% url opts|admin_urlname:'changelist' as link %}
26
- {% include 'unfold/helpers/breadcrumb_item.html' with link=link name=opts.verbose_name_plural|capfirst %}
27
- {% else %}
28
- {% include 'unfold/helpers/breadcrumb_item.html' with link='' name=opts.verbose_name_plural|capfirst %}
29
- {% endif %}
30
-
31
- {% if add %}
32
- {% blocktranslate trimmed with name=opts.verbose_name asvar breadcrumb_name %}
33
- Add {{ name }}
34
- {% endblocktranslate %}
35
-
36
- {% include 'unfold/helpers/breadcrumb_item.html' with link='' name=breadcrumb_name %}
37
- {% else %}
38
- {% include 'unfold/helpers/breadcrumb_item.html' with link='' name=original|truncatewords:'18' %}
39
- {% endif %}
40
- </ul>
41
- </div>
42
- </div>
43
- {% endblock %}
44
- {% endif %}
45
12
 
46
13
  {% block nav-global %}{% spaceless %}
47
14
  {% if change and not is_popup %}
@@ -104,7 +71,13 @@
104
71
 
105
72
  {% block inline_field_sets %}
106
73
  {% for inline_admin_formset in inline_admin_formsets %}
107
- {% include inline_admin_formset.opts.template %}
74
+ {% if request.headers.hx_request %}
75
+ {% if inline_admin_formset.formset.get_pagination_key in request.GET %}
76
+ {% include inline_admin_formset.opts.template %}
77
+ {% endif %}
78
+ {% else %}
79
+ {% include inline_admin_formset.opts.template %}
80
+ {% endif %}
108
81
  {% endfor %}
109
82
  {% endblock %}
110
83
 
@@ -22,25 +22,6 @@
22
22
 
23
23
  {% block bodyclass %}{{ block.super }} app-{{ opts.app_label }} model-{{ opts.model_name }} change-list{% endblock %}
24
24
 
25
- {% if not is_popup %}
26
- {% block breadcrumbs %}
27
- <div class="px-4">
28
- <div class="{% if not cl.model_admin.list_fullwidth %}container{% endif %} mb-6 mx-auto -my-3 lg:mb-12">
29
- <ul class="flex flex-wrap">
30
- {% url 'admin:index' as link %}
31
- {% trans 'Home' as name %}
32
- {% include 'unfold/helpers/breadcrumb_item.html' with link=link name=name %}
33
-
34
- {% url 'admin:app_list' app_label=cl.opts.app_label as link %}
35
- {% include 'unfold/helpers/breadcrumb_item.html' with link=link name=cl.opts.app_config.verbose_name %}
36
-
37
- {% include 'unfold/helpers/breadcrumb_item.html' with link='' name=cl.opts.verbose_name_plural|capfirst %}
38
- </ul>
39
- </div>
40
- </div>
41
- {% endblock %}
42
- {% endif %}
43
-
44
25
  {% block coltype %}{% endblock %}
45
26
 
46
27
  {% block nav-global-side %}
@@ -84,8 +84,8 @@
84
84
  <td class="align-middle cursor-pointer flex border-b border-base-200 font-normal px-2.5 py-2 relative text-left before:font-semibold before:text-font-important-light before:block before:capitalize before:content-[attr(data-label)] before:mr-auto lg:before:hidden lg:border-b-0 lg:border-t lg:pl-3 lg:pr-0 lg:py-3 lg:table-cell dark:border-base-800 dark:lg:border-base-800 dark:before:text-font-important-dark lg:w-px"
85
85
  data-label="{% trans "Expand row" %}"
86
86
  x-on:click="rowOpen = !rowOpen">
87
- <div class="absolute bg-primary-600 -bottom-px hidden left-0 top-0 w-0.5 z-10 lg:block" x-show="rowOpen"></div>
88
- <span class="material-symbols-outlined select-none block! -rotate-90 transition-all" x-bind:class="rowOpen && 'rotate-0'">
87
+ <div class="absolute bg-primary-600 -bottom-px hidden left-0 top-0 w-0.5 z-[50] lg:block" x-show="rowOpen"></div>
88
+ <span class="material-symbols-outlined select-none block! h-[18px] w-[18px] -rotate-90 transition-all" x-bind:class="rowOpen && 'rotate-0'">
89
89
  expand_more
90
90
  </span>
91
91
  </td>
@@ -9,27 +9,6 @@
9
9
 
10
10
  {% block bodyclass %}{{ block.super }} app-{{ opts.app_label }} model-{{ opts.model_name }} delete-confirmation{% endblock %}
11
11
 
12
- {% block breadcrumbs %}
13
- <div class="px-4">
14
- <div class="container mb-6 mx-auto -my-3 lg:mb-12">
15
- <ul class="flex flex-wrap">
16
- {% url 'admin:index' as link %}
17
- {% trans 'Home' as name %}
18
- {% include 'unfold/helpers/breadcrumb_item.html' with link=link name=name %}
19
-
20
- {% url 'admin:app_list' app_label=opts.app_label as link %}
21
- {% include 'unfold/helpers/breadcrumb_item.html' with link=link name=opts.app_config.verbose_name %}
22
-
23
- {% url opts|admin_urlname:'changelist' as link %}
24
- {% include 'unfold/helpers/breadcrumb_item.html' with link=link name=opts.verbose_name_plural|capfirst %}
25
-
26
- {% url opts|admin_urlname:'change' object.pk|admin_urlquote as link %}
27
- {% include 'unfold/helpers/breadcrumb_item.html' with link='' name=object|truncatewords:"18" %}
28
- </ul>
29
- </div>
30
- </div>
31
- {% endblock %}
32
-
33
12
  {% block content %}
34
13
  {% if perms_lacking %}
35
14
  <div class="border border-base-200 rounded-default shadow-xs dark:border-base-800">
@@ -9,28 +9,6 @@
9
9
 
10
10
  {% block bodyclass %}{{ block.super }} app-{{ opts.app_label }} model-{{ opts.model_name }} delete-confirmation delete-selected-confirmation{% endblock %}
11
11
 
12
- {% block breadcrumbs %}
13
- <div class="px-4">
14
- <div class="container mb-6 mx-auto -my-3 lg:mb-12">
15
- <ul class="flex flex-wrap">
16
- {% url 'admin:index' as link %}
17
- {% trans 'Home' as name %}
18
- {% include 'unfold/helpers/breadcrumb_item.html' with link=link name=name %}
19
-
20
- {% url 'admin:app_list' app_label=opts.app_label as link %}
21
- {% include 'unfold/helpers/breadcrumb_item.html' with link=link name=opts.app_config.verbose_name %}
22
-
23
- {% url opts|admin_urlname:'changelist' as link %}
24
- {% include 'unfold/helpers/breadcrumb_item.html' with link=link name=opts.verbose_name_plural|capfirst %}
25
-
26
- {% url opts|admin_urlname:'changelist' as link %}
27
- {% translate 'Delete multiple objects' as name %}
28
- {% include 'unfold/helpers/breadcrumb_item.html' with link='' name=name %}
29
- </ul>
30
- </div>
31
- </div>
32
- {% endblock %}
33
-
34
12
  {% block content %}
35
13
  {% if perms_lacking %}
36
14
  <p class="font-semibold p-4 text-font-important-light dark:text-font-important-dark">
@@ -9,7 +9,7 @@
9
9
  {{ fieldset.name }}
10
10
  </h2>
11
11
  {% else %}
12
- <h2 class="bg-base-100 font-semibold mb-6 px-4 py-3 rounded-default text-font-important-light text-sm 2xl:-mx-4 dark:bg-white/[.02] dark:text-font-important-dark {% if fieldset.is_collapsible %}cursor-pointer{% endif %}">
12
+ <h2 class="bg-base-100 font-semibold mb-6 px-4 py-3 rounded-default text-font-important-light text-sm @min-[1570px]:-mx-4 dark:bg-white/[.02] dark:text-font-important-dark {% if fieldset.is_collapsible %}cursor-pointer{% endif %}">
13
13
  {{ fieldset.name }}
14
14
  </h2>
15
15
  {% endif %}
@@ -2,8 +2,6 @@
2
2
 
3
3
  {% load i18n %}
4
4
 
5
- {% block breadcrumbs %}{% endblock %}
6
-
7
5
  {% block title %}{% if subtitle %}{{ subtitle }} | {% endif %}{{ title }} | {{ site_title|default:_('Django site admin') }}{% endblock %}
8
6
 
9
7
  {% block branding %}
@@ -44,7 +44,7 @@
44
44
 
45
45
  <div class="flex flex-col gap-3 mt-6">
46
46
  {% component "unfold/components/button.html" with submit=1 variant="primary" class="submit-row w-full" %}
47
- {% translate 'Log in' %} <span class="material-symbols-outlined ml-2 relative right-0 transition-all group-hover:-right-1">arrow_forward</span>
47
+ {% translate 'Log in' %} <span class="material-symbols-outlined relative right-0 transition-all group-hover:-right-1 text-sm">arrow_forward</span>
48
48
  {% endcomponent %}
49
49
 
50
50
  {% url 'admin_password_reset' as password_reset_url %}
@@ -1,30 +1,6 @@
1
1
  {% extends "admin/base_site.html" %}
2
2
  {% load i18n admin_urls %}
3
3
 
4
- {% block breadcrumbs %}
5
- <div class="px-4">
6
- <div class="container mb-12 mx-auto -my-3">
7
- <ul class="flex flex-wrap">
8
- {% url 'admin:index' as link %}
9
- {% trans 'Home' as name %}
10
- {% include 'unfold/helpers/breadcrumb_item.html' with link=link name=name %}
11
-
12
- {% url 'admin:app_list' app_label=opts.app_label as link %}
13
- {% include 'unfold/helpers/breadcrumb_item.html' with link=link name=opts.app_config.verbose_name %}
14
-
15
- {% url opts|admin_urlname:'changelist' as link %}
16
- {% include 'unfold/helpers/breadcrumb_item.html' with link=link name=opts.verbose_name_plural|capfirst %}
17
-
18
- {% url opts|admin_urlname:'change' object.pk|admin_urlquote as link %}
19
- {% include 'unfold/helpers/breadcrumb_item.html' with link=link name=object|truncatewords:"18" %}
20
-
21
- {% trans 'History' as name %}
22
- {% include 'unfold/helpers/breadcrumb_item.html' with link='' name=name %}
23
- </ul>
24
- </div>
25
- </div>
26
- {% endblock %}
27
-
28
4
  {% block content %}
29
5
  {% if action_list %}
30
6
  <table class="border-base-200 border-spacing-none border-separate mb-6 w-full lg:border lg:rounded-default lg:shadow-xs lg:dark:border-base-800">
@@ -1,8 +1,12 @@
1
- {% extends "unfold/layouts/skeleton.html" %}
1
+ {% extends 'unfold/layouts/unauthenticated.html' %}
2
2
 
3
- {% load i18n %}
3
+ {% load i18n unfold %}
4
4
 
5
- {% block base %}
5
+ {% block title %}
6
+ {{ title }} | {{ site_title }}
7
+ {% endblock %}
8
+
9
+ {% block content %}
6
10
  <div id="page" class="bg-white flex min-h-screen dark:bg-base-900 ">
7
11
  <div class="flex grow items-center justify-center mx-auto px-4">
8
12
  <div class="w-full sm:w-96">
@@ -11,12 +15,13 @@
11
15
  </h1>
12
16
 
13
17
  <p class="leading-relaxed mb-10">
14
- {% translate "Thanks for spending some quality time with the web site today." %}
18
+ {% trans "Thanks for spending some quality time with the web site today." %}
15
19
  </p>
16
20
 
17
- <a href="{% url "admin:index" %}" class="bg-primary-600 block border border-transparent font-semibold py-2 rounded-default text-sm text-center text-white w-full">
18
- {% translate "Log in again" %}
19
- </a>
21
+ {% url "admin:index" as login_url %}
22
+ {% component "unfold/components/button.html" with href=login_url variant="primary" class="w-full" %}
23
+ {% trans "Log in again" %} <span class="material-symbols-outlined relative right-0 transition-all group-hover:-right-1 text-sm">arrow_forward</span>
24
+ {% endcomponent %}
20
25
  </div>
21
26
  </div>
22
27
  </div>
@@ -3,23 +3,6 @@
3
3
 
4
4
  {% block extrastyle %}{{ block.super }}">{% endblock %}
5
5
 
6
- {% if not is_popup %}
7
- {% block breadcrumbs %}
8
- <div class="px-12">
9
- <div class="container mb-12 mx-auto -my-3">
10
- <ul class="flex flex-wrap">
11
- {% url 'admin:index' as link %}
12
- {% trans 'Home' as name %}
13
- {% include 'unfold/helpers/breadcrumb_item.html' with link=link name=name %}
14
-
15
- {% translate 'Change password' as breadcrumb_name %}
16
- {% include 'unfold/helpers/breadcrumb_item.html' with link='' name=breadcrumb_name %}
17
- </ul>
18
- </div>
19
- </div>
20
- {% endblock %}
21
- {% endif %}
22
-
23
6
  {% block content %}
24
7
  <div id="content-main">
25
8
  <p class="bg-primary-100 mb-8 text-primary-600 px-3 py-3 rounded-default text-sm">