beeware.github.io/templates/project.html
2022-04-06 13:15:43 +08:00

85 lines
3.7 KiB
HTML

{% extends "layout.html" %}
{% from "macros/breadcrumbs.html" import breadcrumbs %}
{% from "macros/badge.html" import badge %}
{% from "macros/incomplete.html" import incomplete %}
{% from "macros/translation.html" import transbag %}
{% set t_project_support = transbag('translate', this.alt, 'project_support') %}
{% set t_project_help = transbag('translate', this.alt, 'project_help') %}
{% set t_contributors = transbag('translate', this.alt, 'contributors') %}
{% set t_pun_before = transbag('translate', this.alt, 'pun_before').strip() %}
{% set t_pun_after = transbag('translate', this.alt, 'pun_after').strip() %}
{% set t_attic_before = transbag('translate', this.alt, 'attic_before').strip() %}
{% set t_attic_link = transbag('translate', this.alt, 'attic_link').strip() %}
{% set t_attic_after = transbag('translate', this.alt, 'attic_after').strip() %}
{% set t_cookie_before = transbag('translate', this.alt, 'cookie_before').strip() %}
{% set t_cookie_after = transbag('translate', this.alt, 'cookie_after').strip() %}
{% set t_project_type = transbag('translate', this.alt, 'project_type').strip() %}
{% set t_maturity = transbag('translate', this.alt, 'maturity').strip() %}
{% set t_language = transbag('translate', this.alt, 'language').strip() %}
{% set t_platform = transbag('translate', this.alt, 'platform').strip() %}
{% set t_source_code = transbag('translate', this.alt, 'source_code').strip() %}
{% set t_documentation = transbag('translate', this.alt, 'documentation').strip() %}
{% block title %}{{ this.name }}{% endblock %}
{% block preamble %}
<div class="banner">
<div class="container">
<p>{{ breadcrumbs(this) }}</p>
<h1>{{ this.name }}</h1>
<p>{{ this.short_description }}</p>
</div>
</div>
{% endblock %}
{% block body %}
<div class="row">
<div class="col-sm-7 mr-auto">
{{ incomplete(this) }}
{% if this.attic or "attic" in this.maturity %}
<p><i>{{ t_attic_before }} <a href="{{ '/project/projects/attic'|url(alt=this.alt) }}">{{ t_attic_link }}</a>{{ t_attic_after }}</i></p>
<hr>
{% endif %}
{% if this.project_type == "template" %}
<p>{{ t_cookie_before }} <a href="https://github.com/audreyr/cookiecutter">CookieCutter</a> {{ t_cookie_after }}</p>
<hr>
{% endif %}
{% if this.project_type == "support" %}
<p>{{ t_project_support }}</p>
<hr>
{% endif %}
<p>{{ this.description }}</p>
{% if this.help_required %}
<h3>{{ t_project_help }}</h3>
<p>{{ this.help_required }}</p>
{% endif %}
{% if this.pun %}
<h3>{{ t_pun_before }} "{{ this.name }}"{{ t_pun_after }}</h3>
<p>{{ this.pun }}</p>
{% endif %}
</div>
<div class="col-sm-4">
<div class="sidebar-module sidebar-module-inset gutter">
<img class="img-fluid center-block" {% if this.image %}src="{{ site.get(this.path, alt='_primary')|url }}{{ this.image }}" {% else %} src="/static/images/defaultlogo.png"{% endif %}></div>
{% if this.github_repo or this.rtfd_name %}<br />{% endif %}
{% if this.github_repo %}<p><a href="https://github.com/{{ this.github_repo }}"><i class="fa fa-github fa-lg" aria-hidden="true"></i> {{ t_source_code }}</a></p>{% endif %}
{% if this.rtfd_name %}<p><a href="https://{{ this.rtfd_name }}.readthedocs.io/"><i class="fa fa-book fa-lg" aria-hidden="true"></i> {{ t_documentation }}</a></p>{% endif %}
<hr>
<dl>
{{ badge(t_project_type, this.project_type, this.alt) }}
{{ badge(t_maturity, this.maturity, this.alt) }}
{{ badge(t_language, this.languages, this.alt) }}
{{ badge(t_platform, this.platforms, this.alt) }}
</dl>
<hr>
<a href="https://labhr.github.io/hatrack/#repo=beeware/{{ this._id }}">{{ t_contributors }}</a>
</div>
</div>
{% endblock %}