{% extends "master.html" %}
{% block title %}Home{% endblock %}
{%block tag %}home{% endblock %}
{% block content %}
<h2>
{% if '/fork/' in request.url %}
<a href="{{ url_for('view_fork_repo', username=username, repo=repo.name)}}">
{% else %}
<a href="{{ url_for('view_repo', repo=repo.name)}}">
{% endif %}
{{ repo.name }}
</a>
:
{% if '/fork/' in request.url %}
<a href="{{ url_for('view_fork_tree', username=username,
repo=repo.name, identifier=branchname) }}">
{% else %}
<a href="{{ url_for('view_tree',
repo=repo.name, identifier=branchname) }}">
{% endif %}
{{ branchname }}</a>/{%
for file in filename.split('/') %}
{% if loop.first %}
{% set path = file %}
{% else %}
{% set path = path + '/' + file %}
{% endif %}
{% if loop.index != loop.length %}
{% if '/fork/' in request.url
%}<a href="{{ url_for('view_fork_file', username=username,
repo=repo.name, identifier=branchname,
filename=path)}}"
>{{ file }}</a>/
{%
else %}<a href="{{ url_for('view_file',
repo=repo.name, identifier=branchname,
filename=path)}}"
>{{ file }}</a>/{% endif %}{%
else %}
{{ file }}
{% endif %}
{% endfor %}
</h2>
<h3>Tree</h3>
<section class="repos_list">
{% if output_type=='file' %}
{% autoescape false %}
{{ content }}
{% endautoescape %}
{% else %}
<ul>
{% for entry in content %}
<li>
{% if entry.filemode == 16384 %}
[ ]
{% endif %}
{% if '/fork/' in request.url %}
<a href="{{ url_for('view_fork_file', username=username,
repo=repo.name, identifier=branchname,
filename=filename + '/' + entry.name if filename else entry.name) }}">
{% else %}
<a href="{{ url_for('view_file',
repo=repo.name,
identifier=branchname,
filename=filename + '/' + entry.name if filename else entry.name) }}">
{% endif %}
{{ entry.name }}
</a>
{{ entry.hex }}
{{ entry.id }}
</li>
{% endfor %}
</ul>
{% endif %}
</section>
{% endblock %}