{% extends "base.html" %}
{% block title %}{{ file_name }} · {{ project_name }}{% endblock %}
{% block head %}
<link rel="stylesheet" href="{{ url_for('static', filename='css/file_viewer_page.css') }}">
<!-- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@highlightjs/[email protected]/styles/github.min.css"> -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@highlightjs/[email protected]/styles/atom-one-dark.min.css">
<script src="https://cdn.jsdelivr.net/npm/@highlightjs/[email protected]/highlight.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/highlightjs-line-numbers.min.js"></script>
{% endblock %}
{% block content %}
<div class="file-header">
<h1 class="page-title">{{ file_name }}</h1>
<a class="back-link" href="{{ url_for('project_detail', project_name=project_name) }}">← Back to explorer</a>
<div class="path mono">{{ file_path }}</div>
</div>
{% if image_data_url %}
<div class="panel image-panel">
<img src="{{ image_data_url }}" alt="{{ file_name }}">
</div>
{% else %}
<div class="panel code-panel">
<pre><code class="language-{{ file_ext|lower }}">{{ file_content }}</code></pre>
</div>
{% endif %}
<script src="{{ url_for('static', filename='js/file_viewer_page.js') }}"></script>
{% endblock %}