text/html
•
2.59 KB
•
67 lines
<!DOCTYPE html>
<html>
<head>
<title>{{ owner.name }}/{{ project.name }}</title>
</head>
<body>
<section>
<div class="page-header">
<h1 class="project-header">
<a href="{{ owner.uri() }}">{{ owner.name }}</a>/<a href="{{ project.uri() }}">{{ project.name }}</a>
</h1>
{% if access_level == AccessType::Admin %}
<a class="btn" href="{{ project.uri_settings() }}">Edit project</a>
{% endif %}
</div>
<div class="card">
<div class="repo-bar">
{% if summary.branches.len() > 0 %}
<select name="branch-name" class="branch-switcher" data-main-branch="{{ project.main_branch }}" data-base-href="{{ project.uri() }}">
{% for branch in summary.branches %}
<option value="{{ branch }}" {% if branch==selected_branch.as_str() %}selected{% endif %}>{{ branch
}}</option>
{% endfor %}
</select>
{% else %}
<select name="branch-name" disabled>
<option selected>Empty Repo</option>
</select>
{% endif %}
<span class="repo-branches">{{ summary.branches.len() }} Branch{% if summary.branches.len() != 1
%}es{% endif %}</span>
<span class="repo-tags">{{ summary.tags.len() }} Tag{% if summary.tags.len() != 1
%}s{% endif %}</span>
<div class="flex-gap"> </div>
<rubhub-clone-url value="{{ ssh_clone_url }}"></rubhub-clone-url>
</div>
{% if let Some(info) = info %}
<div class="commit-bar">
{% if let Some(commit) = info.commits.first() %}
<div class="commit">
<span class="commit-author" title="{{ commit.author }}">{{ commit.author }}</span>
<span class="commit-message" title="{{ commit.message }}">{{ commit.message }}</span>
<span class="commit-id">{{ commit.id }}</span>
<span class="commit-time">{{ commit.relative_time() }}</span>
<a href="{{ project.uri_commits(selected_branch) }}" class="commit-count">{{ info.commit_count }} Commit{% if info.commit_count != 1 %}s{% endif %}</a>
</div>
{% endif %}
</div>
{% endif %}
{% if let Some(readme_html) = readme_html %}
<br/>
<div class="markdown">{{- readme_html|safe -}}</div>
{% endif %}
</div>
</section>
</body>
</html>