{% extends "base.html" %} {% import "repo_tabs.html" as m %} {% block title %}{{ f.path }} at {{ f.target.label|short }} · {{ repo.owner }}/{{ repo.name }}{% endblock %} {% block bodyattrs %} data-repo="{{ repo.url }}" data-ref="{{ f.target.label }}"{% endblock %} {% block tabs %}{% call m::tabs(repo, "code") %}{% endblock %} {% block mainclass %} class="wide"{% endblock %} {% block content %}
{% if f.target.kind == crate::repos::view::RefKind::Change %}# {{ f.target.label|short }}{% else %}◆ {{ f.target.label }}{% endif %} {{ repo.name }}{% for (n, p) in f.crumbs %} / {% if loop.last %}{{ n }}{% else %}{{ n }}{% endif %}{% endfor %}
{{ f.size|bytes }}{% if let Some(l) = language %} · {{ l }}{% endif %}{% if f.exec %} · executable{% endif %}{% if f.kind == crate::repos::view::EntryKind::Symlink %} · symlink{% endif %}{% if f.kind == crate::repos::view::EntryKind::Subrepo %} · subrepository pin{% endif %}{% if let Some(c) = f.last_change %} · last changed {{ c.title }} {{ c.when_ms|ago }}{% endif %} {% if is_markdown %}renderedsource {% else %}source{% endif %} blame history raw {% if repo.can(crate::auth::Access::Write) %}edit{% endif %}
{% if f.conflicted %}
This file is in conflict in this state; the markers below are the conflict. All conflicts
{% endif %} {% if is_image %}

{{ f.name }}

{% else %} {% match f.body %} {% when crate::repos::view::FileBody::TooLarge %}

This file is larger than the render limit. Download it.

{% when crate::repos::view::FileBody::Binary %}

Binary file, {{ f.size|bytes }}. Download it.

{% when crate::repos::view::FileBody::Text(_) %} {% if let Some(html) = markdown_html %}
{{ html|safe }}
{% else %} {% for line in lines %} {% let n = loop.index %} {% if let Some(b) = blame %}{% let r = b[loop.index0] %} {% if r.first %}{% endif %} {% endif %} {% endfor %}
{{ r.short }} {{ r.author }} {{ n }}
{{ line|safe }}
{% endif %} {% endmatch %} {% endif %}
{% endblock %}