修复V1.0模板Jinja2 count过滤器Bug
This commit is contained in:
@@ -44,10 +44,12 @@
|
||||
</div>
|
||||
<div class="mt-3 text-xs text-gray-500">
|
||||
<span class="bg-green-100 text-green-700 px-2 py-1 rounded-full mr-1">
|
||||
静态: {{ project.slide_mapping.values() | list | count('static') }} 页
|
||||
{% set static_pages = project.slide_mapping.values() | list %}
|
||||
静态: {{ static_pages | count_item('static') }} 页
|
||||
</span>
|
||||
<span class="bg-orange-100 text-orange-700 px-2 py-1 rounded-full">
|
||||
动态: {{ project.total_slides - (project.slide_mapping.values() | list | count('static')) }} 页
|
||||
{% set static_count = static_pages | count_item('static') %}
|
||||
动态: {{ project.total_slides - static_count }} 页
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user