replace slippers with django-cotton
main reason: slippers cannot pass request via context inside its components, making it annoying to use template takes that take request. more reasons: not actively worked on, no named slots, having to define components in components.yaml + new components do not get registered without restarting server
This commit is contained in:
16
games/templates/cotton/table_row.html
Normal file
16
games/templates/cotton/table_row.html
Normal file
@ -0,0 +1,16 @@
|
||||
<tr class="odd:bg-white odd:dark:bg-gray-900 even:bg-gray-50 even:dark:bg-gray-800 dark:border-gray-700 hover:bg-gray-50 dark:hover:bg-gray-600 border-b">
|
||||
{% if slot %}
|
||||
{{ slot }}
|
||||
{% else %}
|
||||
{% for td in data %}
|
||||
{% if forloop.first %}
|
||||
<th scope="row"
|
||||
class="px-6 py-4 font-medium text-gray-900 whitespace-nowrap dark:text-white">{{ td }}</th>
|
||||
{% else %}
|
||||
<c-table-td>
|
||||
{{ td }}
|
||||
</c-table-td>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</tr>
|
Reference in New Issue
Block a user