up wiki land

This commit is contained in:
Tykayn 2025-08-22 18:19:20 +02:00 committed by tykayn
parent 391a212034
commit e533c273b2
10 changed files with 1116 additions and 182 deletions

View file

@ -58,7 +58,13 @@
<div class="card h-100">
<div class="card-header bg-primary text-white">
<h3>Sections en anglais</h3>
<span class="badge bg-light text-dark">{{ en_page.sections }} sections</span>
<span class="badge bg-light text-dark">
{% if detailed_comparison.adjusted_en_section_count is defined %}
{{ detailed_comparison.adjusted_en_section_count }} sections ({{ en_page.sections }} avec "Contents")
{% else %}
{{ en_page.sections }} sections
{% endif %}
</span>
</div>
<div class="card-body">
<h4>Sections alignées par hiérarchie</h4>
@ -67,6 +73,9 @@
<li class="list-group-item title-level-{{ section.en.level }}">
{# <span class="badge bg-secondary">h{{ section.en.level }}</span> #}
{{ section.en.title }}
{% if detailed_comparison.en_hierarchy_errors is defined and loop.index0 in detailed_comparison.en_hierarchy_errors %}
<span class="badge bg-danger ms-2" title="Hiérarchie incorrecte">!</span>
{% endif %}
</li>
{% endfor %}
@ -74,6 +83,9 @@
<li class="list-group-item list-group-item-warning title-level-{{ section.level }}">
{# <span class="badge bg-secondary">h{{ section.level }}</span> #}
{{ section.title }}
{% if detailed_comparison.en_hierarchy_errors is defined and (detailed_comparison.section_comparison.common|length + loop.index0) in detailed_comparison.en_hierarchy_errors %}
<span class="badge bg-danger ms-2" title="Hiérarchie incorrecte">!</span>
{% endif %}
</li>
{% endfor %}
</ul>
@ -84,7 +96,13 @@
<div class="card h-100">
<div class="card-header bg-info text-white">
<h3>Sections en français</h3>
<span class="badge bg-light text-dark">{{ fr_page.sections }} sections</span>
<span class="badge bg-light text-dark">
{% if detailed_comparison.adjusted_fr_section_count is defined %}
{{ detailed_comparison.adjusted_fr_section_count }} sections ({{ fr_page.sections }} avec "Sommaire")
{% else %}
{{ fr_page.sections }} sections
{% endif %}
</span>
</div>
<div class="card-body">
<h4>Sections alignées par hiérarchie</h4>
@ -93,6 +111,9 @@
<li class="list-group-item title-level-{{ section.fr.level }}">
{# <span class="badge bg-secondary">h{{ section.fr.level }}</span> #}
{{ section.fr.title }}
{% if detailed_comparison.fr_hierarchy_errors is defined and loop.index0 in detailed_comparison.fr_hierarchy_errors %}
<span class="badge bg-danger ms-2" title="Hiérarchie incorrecte">!</span>
{% endif %}
</li>
{% endfor %}
@ -100,7 +121,9 @@
<li class="list-group-item list-group-item-info title-level-{{ section.level }}">
{# <span class="badge bg-secondary">h{{ section.level }}</span> #}
{{ section.title }}
{% if detailed_comparison.fr_hierarchy_errors is defined and (detailed_comparison.section_comparison.common|length + loop.index0) in detailed_comparison.fr_hierarchy_errors %}
<span class="badge bg-danger ms-2" title="Hiérarchie incorrecte">!</span>
{% endif %}
</li>
{% endfor %}
</ul>
@ -227,59 +250,41 @@
<div class="card-body">
<h4>Liens uniquement en anglais
({{ detailed_comparison.link_comparison.en_only|length }})</h4>
<h4>Comparaison des liens côte à côte</h4>
<div class="table-responsive">
<table class="table table-sm table-warning">
<table class="table table-sm">
<thead>
<tr>
<th>Texte</th>
<th>URL</th>
<th class="bg-primary text-white">Texte EN</th>
<th class="bg-primary text-white">URL EN</th>
<th class="bg-info text-white">Texte FR</th>
<th class="bg-info text-white">URL FR</th>
</tr>
</thead>
<tbody>
{% for link in detailed_comparison.link_comparison.en_only %}
{% set en_links = detailed_comparison.link_comparison.en_only %}
{% set fr_links = detailed_comparison.link_comparison.fr_only %}
{% set max_links = max(en_links|length, fr_links|length) %}
{% for i in 0..(max_links - 1) %}
<tr>
<td>{{ link.text }}</td>
<td><a href="{{ link.href }}" target="_blank"
class="small">{{ link.href|slice(0, 30) }}...</a></td>
{% if i < en_links|length %}
<td class="bg-light">{{ en_links[i].text }}</td>
<td class="bg-light"><a href="{{ en_links[i].href }}" target="_blank" class="small">{{ en_links[i].href|slice(0, 30) }}...</a></td>
{% else %}
<td class="bg-light"></td>
<td class="bg-light"></td>
{% endif %}
{% if i < fr_links|length %}
<td>{{ fr_links[i].text }}</td>
<td><a href="{{ fr_links[i].href }}" target="_blank" class="small">{{ fr_links[i].href|slice(0, 30) }}...</a></td>
{% else %}
<td></td>
<td></td>
{% endif %}
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
</div>
</div>
<div class="col-md-6">
<div class="card h-100">
<div class="card-header bg-info text-white">
<h3>Liens en français</h3>
<span class="badge bg-light text-dark">{{ fr_page.link_count }} liens</span>
</div>
<div class="card-body">
<h4>Liens uniquement en français
({{ detailed_comparison.link_comparison.fr_only|length }})</h4>
<div class="table-responsive">
<table class="table table-sm table-info">
<thead>
<tr>
<th>Texte</th>
<th>URL</th>
</tr>
</thead>
<tbody>
{% for link in detailed_comparison.link_comparison.fr_only %}
<tr>
<td>{{ link.text }}</td>
<td><a href="{{ link.href }}" target="_blank"
class="small">{{ link.href|slice(0, 30) }}...</a></td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
@ -377,7 +382,13 @@
<ul class="list-group mb-3">
<li class="list-group-item d-flex justify-content-between align-items-center">
Sections
<span class="badge bg-primary rounded-pill">{{ en_page.sections }}</span>
<span class="badge bg-primary rounded-pill">
{% if detailed_comparison.adjusted_en_section_count is defined %}
{{ detailed_comparison.adjusted_en_section_count }}
{% else %}
{{ en_page.sections }}
{% endif %}
</span>
</li>
<li class="list-group-item d-flex justify-content-between align-items-center">
Mots
@ -510,7 +521,13 @@
<ul class="list-group mb-3">
<li class="list-group-item d-flex justify-content-between align-items-center">
Sections
<span class="badge bg-primary rounded-pill">{{ en_page.sections }}</span>
<span class="badge bg-primary rounded-pill">
{% if detailed_comparison.adjusted_en_section_count is defined %}
{{ detailed_comparison.adjusted_en_section_count }}
{% else %}
{{ en_page.sections }}
{% endif %}
</span>
</li>
<li class="list-group-item d-flex justify-content-between align-items-center">
Mots
@ -547,7 +564,13 @@
<ul class="list-group mb-3">
<li class="list-group-item d-flex justify-content-between align-items-center">
Sections
<span class="badge bg-info rounded-pill">{{ fr_page.sections }}</span>
<span class="badge bg-info rounded-pill">
{% if detailed_comparison.adjusted_fr_section_count is defined %}
{{ detailed_comparison.adjusted_fr_section_count }}
{% else %}
{{ fr_page.sections }}
{% endif %}
</span>
</li>
<li class="list-group-item d-flex justify-content-between align-items-center">
Mots