Viewing:
{% extends "base.html" %}
{% block title %}{{username}} repos{% endblock %}
{% block meta_description %}Git repositories of {{username}}{% endblock %}
{% block head %}
{% endblock %}
{% block content %}
<div class="UserRepos">
{% for repo_metadata in repos %}
<div class="UserRepos__repo">
<h2 class="UserRepos__repo-name">
<a href="/~{{username}}/{{repo_metadata.name}}">{{repo_metadata.name}}</a>
</h2>
{% if repo_metadata.description.len() != 0 -%}<div class="UserRepos__repo-description">{{repo_metadata.description}}</div>{% endif -%}
<div class="UserRepos__commits">{{repo_metadata.number_of_commits}} commit{% if repo_metadata.number_of_commits != 1 -%}s{% endif -%}
{% if repo_metadata.total_loc != 0 %}, {{repo_metadata.total_loc}} lines of code{% endif %}
</div>
<div class="UserRepos__repo-latest">
<div class="UserRepos__repo-latest">
<div class="UserRepos__repo-latest-message">Updated {{repo_metadata.last_commit_date}}: {{repo_metadata.last_commit_message}}</div>
</div>
</div>
{% match repo_metadata.languages %}
{% when Some with (languages) %}
<div class="Languages">
{% for language in languages.iter().take(5) %}
{% let color = language_colors.get(language.name).unwrap_or(default_color) %}
<div class="LanguageMarker">
{% include "swatch.html" %}
<span class="LanguageMarker__name">
{{language.name}} ({{ "{:.1}"|format(language.percentage*100.0)}}%)
</span>
</div>
{% endfor %}
</div>
{% when _ %}
{% endmatch %}
</div>
{% endfor %}
</div>
{% endblock %}