{# ───────────────────────────────────────────── SPB Git — Personal Git Platform ───────────────────────────────────────────── Author : Simon-Pierre Boucher Contact : contact@spboucher.ai File : src/web/views/blob.njk Purpose : File view — sticky header, shiki code, line anchors License : MIT © Simon-Pierre Boucher ───────────────────────────────────────────── #}{% extends "layout.njk" %} {% block content %} {% include "partials/repo-header.njk" %}
{{ blobSize | bytes }} {% if view.lines %}· {{ view.lines | num }} lines{% endif %} {% if view.lang %}{{ view.lang }}{% endif %}
{% if view.isMarkdown %} {% if view.kind == 'markdown' %} View source {% else %} Rendered {% endif %} {% endif %} {% if view.kind == 'code' %} {% endif %} Raw Blame History
{% if view.notebookNote %}

Jupyter notebook shown as formatted JSON. Download the raw file to open it in Jupyter.

{% endif %} {% if view.kind == 'pdf' %}

Your browser cannot display PDFs inline.

Download {{ fileName }}
{% elif view.kind == 'binary' %} {% if view.isImage %}
{{ fileName }}
{% else %}

Binary file — {{ blobSize | bytes }}.

Download
{% endif %} {% elif view.kind == 'toolarge' %}

This file is {{ blobSize | bytes }} — too large to display.

View raw
{% elif view.kind == 'markdown' %}
{{ view.html | safe }}
{% else %}
{{ view.html | safe }}
{% endif %}
{% endblock %}