|
1 | 1 | {% load i18n %} |
2 | 2 |
|
3 | 3 | {% if inlines_list or tabs_list %} |
4 | | - <nav class="bg-base-100 flex flex-col font-medium gap-1 p-1 rounded-default w-full dark:border-base-700 md:flex-row md:w-auto dark:bg-white/[.04]"> |
| 4 | + <nav class="bg-base-100 flex flex-col font-medium gap-1 p-1 rounded-default w-full dark:border-base-700 md:flex-row md:w-auto dark:bg-white/[.04] *:flex *:flex-row *:font-medium *:items-center *:px-2.5 *:py-[5px] *:rounded-default *:transition-colors *:hover:bg-base-700/[.04] *:dark:hover:bg-white/[.04] [&>.active]:bg-white [&>.active]:shadow-xs [&>.active]:text-font-important-light [&>.active]:hover:bg-white [&>.active]:dark:bg-base-900 [&>.active]:dark:hover:bg-base-900 [&>.active]:dark:text-font-important-dark"> |
5 | 5 | {% for item in tabs_list %} |
6 | 6 | {% if item.has_permission %} |
7 | | - <a href="{% if item.link_callback %}{{ item.link_callback }}{% else %}{{ item.link }}{% endif %}{% if item.inline %}#{{ item.inline|slugify }}{% endif %}" |
8 | | - class="flex flex-row font-medium items-center px-2.5 py-[5px] rounded-default transition-colors |
9 | | - {% if item.active and not item.inline %} |
10 | | - bg-white shadow-xs text-font-important-light hover:bg-white dark:bg-base-900 dark:hover:bg-base-900 dark:text-font-important-dark |
11 | | - {% else %} |
12 | | - hover:bg-base-700/[.04] dark:hover:bg-white/[.04] |
13 | | - {% endif %}" |
14 | | - {% if item.inline %} |
15 | | - x-on:click="activeTab = '{{ item.inline|slugify }}'" |
16 | | - x-bind:class="{'bg-base-100 text-primary-600 hover:text-primary-500 dark:text-primary-500 dark:bg-white/[.06]': activeTab == '{{ item.inline|slugify }}'}" |
17 | | - {% endif %} |
18 | | - > |
| 7 | + <a href="{% if item.link_callback %}{{ item.link_callback }}{% else %}{{ item.link }}{% endif %}{% if item.inline %}#{{ item.inline|slugify }}{% endif %}" class="{% if item.active and not item.inline %}active{% endif %}" {% if item.inline %}x-on:click="activeTab = '{{ item.inline|slugify }}'" x-bind:class="{'active': activeTab == '{{ item.inline|slugify }}'}"{% endif %}> |
19 | 8 | {{ item.title }} |
20 | 9 | </a> |
21 | 10 | {% endif %} |
22 | 11 | {% endfor %} |
23 | 12 |
|
24 | 13 | {% if inlines_list %} |
25 | | - <a class="flex flex-row items-center px-2.5 py-[5px] rounded-default transition-colors" |
26 | | - href="#general" |
27 | | - x-on:click="activeTab = 'general'" |
28 | | - x-bind:class="{'bg-white shadow-xs text-font-important-light hover:bg-white dark:bg-base-900 dark:hover:bg-base-900 dark:text-font-important-dark': activeTab == 'general', 'hover:bg-base-700/[.04] dark:hover:bg-white/[.04]': activeTab != 'general'}"> |
| 14 | + <a href="#general" x-on:click="activeTab = 'general'" x-bind:class="{'active': activeTab == 'general'}"> |
29 | 15 | {% trans "General" %} |
30 | 16 | </a> |
31 | 17 |
|
32 | 18 | {% for inline in inlines_list %} |
33 | | - <a class="flex flex-row items-center px-2.5 py-[5px] rounded-default transition-colors" |
34 | | - href="#{{ inline.formset.prefix|slugify }}" |
35 | | - x-on:click="activeTab = '{{ inline.formset.prefix|slugify }}'" |
36 | | - x-bind:class="{'bg-white shadow-xs text-font-important-light hover:bg-white dark:bg-base-900 dark:hover:bg-base-900 dark:text-font-important-dark': activeTab == '{{ inline.formset.prefix|slugify }}', 'hover:bg-base-700/[.04] dark:hover:bg-white/[.04]': activeTab != '{{ inline.formset.prefix|slugify }}'}"> |
| 19 | + <a href="#{{ inline.formset.prefix|slugify }}" x-on:click="activeTab = '{{ inline.formset.prefix|slugify }}'" x-bind:class="{'active': activeTab == '{{ inline.formset.prefix|slugify }}'}"> |
37 | 20 | {% if inline.formset.max_num == 1 %} |
38 | 21 | {{ inline.opts.verbose_name|capfirst }} |
39 | 22 | {% else %} |
|
0 commit comments