|
|
@@ -14,9 +14,9 @@ eleventyComputed:
|
|
|
<a href="/" style="color: #3498db; text-decoration: none;">← Back to home</a>
|
|
|
</div>
|
|
|
|
|
|
- <h1>Document {{ doc.document_number }}</h1>
|
|
|
+ <h1 style="margin-bottom: 1rem;">Document {{ doc.document_number }}</h1>
|
|
|
|
|
|
- <div class="metadata">
|
|
|
+ <div class="metadata-box">
|
|
|
<div class="metadata-grid">
|
|
|
<div class="metadata-item">
|
|
|
<strong>Document Type</strong>
|
|
|
@@ -49,76 +49,113 @@ eleventyComputed:
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
- <h2>Full Text</h2>
|
|
|
- <div class="full-text">{{ doc.full_text }}</div>
|
|
|
+ <div class="doc-layout">
|
|
|
+ <aside class="doc-sidebar">
|
|
|
+ {% if doc.page_count > 1 %}
|
|
|
+ <nav class="doc-toc">
|
|
|
+ <h3>Table of Contents</h3>
|
|
|
+ <ul class="toc-list">
|
|
|
+ <li><a href="#full-text">Full Document</a></li>
|
|
|
+ {% for page in doc.pages %}
|
|
|
+ <li><a href="#page-{{ loop.index }}">Page {{ page.document_metadata.page_number or loop.index }}</a></li>
|
|
|
+ {% endfor %}
|
|
|
+ </ul>
|
|
|
+ </nav>
|
|
|
+ {% endif %}
|
|
|
|
|
|
- <h2>Referenced Entities</h2>
|
|
|
- <div class="entities">
|
|
|
- {% if doc.entities.people.length > 0 %}
|
|
|
- <div class="entity-group">
|
|
|
- <h4>People ({{ doc.entities.people.length }})</h4>
|
|
|
- <ul>
|
|
|
- {% for person in doc.entities.people %}
|
|
|
- <li><a href="/people/#{{ person | slugify }}">{{ person }}</a></li>
|
|
|
- {% endfor %}
|
|
|
- </ul>
|
|
|
- </div>
|
|
|
- {% endif %}
|
|
|
+ <div class="doc-entities">
|
|
|
+ <h3>Referenced Entities</h3>
|
|
|
|
|
|
- {% if doc.entities.organizations.length > 0 %}
|
|
|
- <div class="entity-group">
|
|
|
- <h4>Organizations ({{ doc.entities.organizations.length }})</h4>
|
|
|
- <ul>
|
|
|
- {% for org in doc.entities.organizations %}
|
|
|
- <li><a href="/organizations/#{{ org | slugify }}">{{ org }}</a></li>
|
|
|
- {% endfor %}
|
|
|
- </ul>
|
|
|
- </div>
|
|
|
- {% endif %}
|
|
|
+ {% if doc.entities.people.length > 0 %}
|
|
|
+ <div class="entity-section">
|
|
|
+ <h4>People ({{ doc.entities.people.length }})</h4>
|
|
|
+ <ul>
|
|
|
+ {% for person in doc.entities.people | slice(0, 10) %}
|
|
|
+ <li><a href="/people/#{{ person | slugify }}">{{ person }}</a></li>
|
|
|
+ {% endfor %}
|
|
|
+ {% if doc.entities.people.length > 10 %}
|
|
|
+ <li style="color: #888; font-style: italic;">+{{ doc.entities.people.length - 10 }} more</li>
|
|
|
+ {% endif %}
|
|
|
+ </ul>
|
|
|
+ </div>
|
|
|
+ {% endif %}
|
|
|
|
|
|
- {% if doc.entities.locations.length > 0 %}
|
|
|
- <div class="entity-group">
|
|
|
- <h4>Locations ({{ doc.entities.locations.length }})</h4>
|
|
|
- <ul>
|
|
|
- {% for loc in doc.entities.locations %}
|
|
|
- <li><a href="/locations/#{{ loc | slugify }}">{{ loc }}</a></li>
|
|
|
- {% endfor %}
|
|
|
- </ul>
|
|
|
- </div>
|
|
|
- {% endif %}
|
|
|
+ {% if doc.entities.organizations.length > 0 %}
|
|
|
+ <div class="entity-section">
|
|
|
+ <h4>Organizations ({{ doc.entities.organizations.length }})</h4>
|
|
|
+ <ul>
|
|
|
+ {% for org in doc.entities.organizations | slice(0, 10) %}
|
|
|
+ <li><a href="/organizations/#{{ org | slugify }}">{{ org }}</a></li>
|
|
|
+ {% endfor %}
|
|
|
+ {% if doc.entities.organizations.length > 10 %}
|
|
|
+ <li style="color: #888; font-style: italic;">+{{ doc.entities.organizations.length - 10 }} more</li>
|
|
|
+ {% endif %}
|
|
|
+ </ul>
|
|
|
+ </div>
|
|
|
+ {% endif %}
|
|
|
|
|
|
- {% if doc.entities.dates.length > 0 %}
|
|
|
- <div class="entity-group">
|
|
|
- <h4>Dates ({{ doc.entities.dates.length }})</h4>
|
|
|
- <ul>
|
|
|
- {% for date in doc.entities.dates %}
|
|
|
- <li>{{ date }}</li>
|
|
|
- {% endfor %}
|
|
|
- </ul>
|
|
|
- </div>
|
|
|
- {% endif %}
|
|
|
+ {% if doc.entities.locations.length > 0 %}
|
|
|
+ <div class="entity-section">
|
|
|
+ <h4>Locations ({{ doc.entities.locations.length }})</h4>
|
|
|
+ <ul>
|
|
|
+ {% for loc in doc.entities.locations %}
|
|
|
+ <li><a href="/locations/#{{ loc | slugify }}">{{ loc }}</a></li>
|
|
|
+ {% endfor %}
|
|
|
+ </ul>
|
|
|
+ </div>
|
|
|
+ {% endif %}
|
|
|
+
|
|
|
+ {% if doc.entities.dates.length > 0 %}
|
|
|
+ <div class="entity-section">
|
|
|
+ <h4>Dates ({{ doc.entities.dates.length }})</h4>
|
|
|
+ <ul>
|
|
|
+ {% for date in doc.entities.dates | slice(0, 5) %}
|
|
|
+ <li>{{ date }}</li>
|
|
|
+ {% endfor %}
|
|
|
+ {% if doc.entities.dates.length > 5 %}
|
|
|
+ <li style="color: #888; font-style: italic;">+{{ doc.entities.dates.length - 5 }} more</li>
|
|
|
+ {% endif %}
|
|
|
+ </ul>
|
|
|
+ </div>
|
|
|
+ {% endif %}
|
|
|
|
|
|
- {% if doc.entities.reference_numbers.length > 0 %}
|
|
|
- <div class="entity-group">
|
|
|
- <h4>Reference Numbers ({{ doc.entities.reference_numbers.length }})</h4>
|
|
|
- <ul>
|
|
|
- {% for ref in doc.entities.reference_numbers %}
|
|
|
- <li>{{ ref }}</li>
|
|
|
+ {% if doc.entities.reference_numbers.length > 0 %}
|
|
|
+ <div class="entity-section">
|
|
|
+ <h4>Reference Numbers</h4>
|
|
|
+ <ul>
|
|
|
+ {% for ref in doc.entities.reference_numbers | slice(0, 5) %}
|
|
|
+ <li>{{ ref }}</li>
|
|
|
+ {% endfor %}
|
|
|
+ {% if doc.entities.reference_numbers.length > 5 %}
|
|
|
+ <li style="color: #888; font-style: italic;">+{{ doc.entities.reference_numbers.length - 5 }} more</li>
|
|
|
+ {% endif %}
|
|
|
+ </ul>
|
|
|
+ </div>
|
|
|
+ {% endif %}
|
|
|
+ </div>
|
|
|
+ </aside>
|
|
|
+
|
|
|
+ <main class="doc-main">
|
|
|
+ <div id="full-text" class="full-text-container">
|
|
|
+ <h2>Full Text</h2>
|
|
|
+ <div class="full-text">{{ doc.full_text }}</div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ {% if doc.page_count > 1 %}
|
|
|
+ <div class="page-details">
|
|
|
+ <h2 style="margin-bottom: 1.5rem;">Individual Pages</h2>
|
|
|
+ {% for page in doc.pages %}
|
|
|
+ <details class="page-detail" id="page-{{ loop.index }}">
|
|
|
+ <summary class="page-summary">
|
|
|
+ Page {{ page.document_metadata.page_number or loop.index }} - {{ page.filename }}
|
|
|
+ </summary>
|
|
|
+ <div class="page-content">
|
|
|
+ <div class="full-text">{{ page.full_text }}</div>
|
|
|
+ </div>
|
|
|
+ </details>
|
|
|
{% endfor %}
|
|
|
- </ul>
|
|
|
- </div>
|
|
|
- {% endif %}
|
|
|
+ </div>
|
|
|
+ {% endif %}
|
|
|
+ </main>
|
|
|
</div>
|
|
|
-
|
|
|
- <h2>Page Details</h2>
|
|
|
- {% for page in doc.pages %}
|
|
|
- <details style="margin-bottom: 1rem;">
|
|
|
- <summary style="cursor: pointer; padding: 1rem; background: #f8f9fa; border-radius: 4px;">
|
|
|
- Page {{ page.document_metadata.page_number }} - {{ page.filename }}
|
|
|
- </summary>
|
|
|
- <div style="padding: 1rem; background: white; border: 1px solid #e0e0e0; border-top: none;">
|
|
|
- <div class="full-text">{{ page.full_text }}</div>
|
|
|
- </div>
|
|
|
- </details>
|
|
|
- {% endfor %}
|
|
|
</div>
|