Spaces:
Running
Running
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Parsed Results - {{ filename }}</title> | |
<script src="https://cdn.tailwindcss.com"></script> | |
<style> | |
.table-container { overflow-x: auto; } | |
pre { white-space: pre-wrap; word-wrap: break-word; } | |
</style> | |
</head> | |
<body class="bg-gray-900 text-gray-200 min-h-screen p-8 font-sans"> | |
<div class="max-w-7xl mx-auto bg-gray-800 p-6 rounded-xl shadow-2xl"> | |
<h1 class="text-3xl font-bold text-blue-400 mb-6">Parsed Results: {{ filename }}</h1> | |
<div class="table-container"> | |
<table class="w-full border-collapse text-sm"> | |
<thead> | |
<tr class="bg-gray-700 text-blue-300"> | |
<th class="p-4 text-left font-semibold">Part</th> | |
<th class="p-4 text-left font-semibold">Category</th> | |
<th class="p-4 text-left font-semibold">Node ID</th> | |
<th class="p-4 text-left font-semibold">Parent Path</th> | |
<th class="p-4 text-left font-semibold">Level</th> | |
<th class="p-4 text-left font-semibold">Location</th> | |
<th class="p-4 text-left font-semibold">Vector</th> | |
<th class="p-4 text-left font-semibold">Source</th> | |
</tr> | |
</thead> | |
<tbody> | |
{% for part in parts %} | |
<tr class="border-b border-gray-700 hover:bg-gray-600 transition-colors"> | |
<td class="p-4">{{ part.index }}</td> | |
<td class="p-4">{{ part.category }}</td> | |
<td class="p-4">{{ part.node_id }}</td> | |
<td class="p-4">{{ part.parent_path }}</td> | |
<td class="p-4">{{ part.level }}</td> | |
<td class="p-4">Lines {{ part.location[0] }} to {{ part.location[1] }}</td> | |
<td class="p-4">[{{ part.vector|join(', ') }}]</td> | |
<td class="p-4"> | |
<pre class="text-xs text-gray-300" style="margin-left: {{ part.level * 1.5 }}rem;">{{ part.source }}</pre> | |
</td> | |
</tr> | |
{% endfor %} | |
</tbody> | |
</table> | |
</div> | |
<div class="mt-8"> | |
<h2 class="text-2xl font-bold text-blue-400 mb-4">Reconstructed Code</h2> | |
<pre class="bg-gray-900 p-4 rounded-lg text-gray-300 text-sm">{{ reconstructed_code }}</pre> | |
</div> | |
<a href="/" class="mt-6 inline-block bg-blue-500 text-white py-2 px-4 rounded-lg hover:bg-blue-600 transition-colors">Back to Upload</a> | |
</div> | |
</body> | |
</html> |