Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ a:hover {
position: relative;
}

.progress-bar-index {
.progress-bar {
display: inline-block;
color: white;
height: 100%;
Expand Down
79 changes: 40 additions & 39 deletions templates/index.html.jinja
Original file line number Diff line number Diff line change
@@ -1,48 +1,49 @@
{% extends "base.html.jinja" %}

{% block main %}
<div>
<div class="row">
{% for project in completion_progress | sort(attribute='completion') | reverse %}
<div class="col-12 col-sm-6 col-md-4 d-flex">
<div class="card shadow mb-3 w-100">
<div class="card-body">
<h3 class="card-title">{{ project.language.name }}</h3>
<h5 class="card-subtitle mb-2 text-muted">{{ project.translated_name }}</h5>
<p class="text-muted">Completion: <strong>{{ '{:.2f}%'.format(project.completion) }}</strong></p>
<p class="text-muted">30-day progress: {{ '{:.2f}%'.format(project.change) }}</p>
<p style="text-align: center;">
{% if project.built %}
<a href="https://docs.python.org/{{ project.language.code }}/3/" style="color: #1595fe;">View</a>
{% endif %}
{% if project.contribution_link %}
<a href="{{ project.contribution_link }}" style="color: #1595fe;">Contribute</a>
{% elif project.uses_platform %}
<a href="https://app.transifex.com/join/?o=python-doc&p=python-newest&t=opensource" style="color: #1595fe;">Contribute</a>
{% else %}
<a href="https://devguide.python.org/documentation/translations/translating/" style="color: #1595fe;">Contribute</a>
{% endif %}
</p>
<div class="progress-bar-container">
<div class="progress-bar-index" style="width: {{ project.completion }}%;
{% if project.change %}
background: linear-gradient(to left, #94cf96 {{ project.change * 100 / project.completion }}%, #4caf50 {{ project.change * 100 / project.completion }}%);
{% else %}
background-color: #4caf50;
{% endif %}">
</div>
</div>
<div>
<div class="row">
{% for project in completion_progress | sort(attribute='completion') | reverse %}
<div class="col-12 col-sm-6 col-md-4 d-flex">
<div class="card shadow mb-3 w-100">
<div class="card-body">
<h3 class="card-title">{{ project.language.name }}</h3>
<h5 class="card-subtitle mb-2 text-muted">{{ project.translated_name }}</h5>
<p class="text-muted">Completion: <strong>{{ '{:.2f}%'.format(project.completion) }}</strong></p>
<p class="text-muted">30-day progress: {{ '{:.2f}%'.format(project.change) }}</p>

<p style="text-align: center;">
{% if project.built %}
<a href="https://docs.python.org/{{ project.language.code }}/3/" style="color: #1595fe;">View</a>
{% endif %}
{% if project.contribution_link %}
<a href="{{ project.contribution_link }}" style="color: #1595fe;">Contribute</a>
{% elif project.uses_platform %}
<a href="https://app.transifex.com/join/?o=python-doc&p=python-newest&t=opensource" style="color: #1595fe;">Contribute</a>
{% else %}
<a href="https://devguide.python.org/documentation/translations/translating/" style="color: #1595fe;">Contribute</a>
{% endif %}
</p>
<div class="progress-bar-container">
<div class="progress-bar" style="width: {{ project.completion }}%;
{% if project.change %}
background: linear-gradient(to left, #94cf96 {{ project.change * 100 / project.completion }}%, #4caf50 {{ project.change * 100 / project.completion }}%);
{% else %}
background-color: #4caf50;
{% endif %}">
</div>
</div>
</div>
{% endfor %}
</div>
</div>
</div>
{% endfor %}
</div>
</div>

<p style="text-align: center;">
Last updated {{ generation_time.strftime('on %A %-d %B %Y at %-H:%M:%S %Z') }} (in {{ duration // 60 }} minutes and {{ duration % 60 }} seconds).<br/>
You can find the scripts used to generate this website <a href="https://github.com/python-docs-translations/dashboard/">on GitHub</a>.<br/>
You can download the data on this page in <a href="https://raw.githubusercontent.com/python-docs-translations/dashboard/refs/heads/gh-pages/index.json">JSON format</a>.
</p>
<p style="text-align: center;">
Last updated {{ generation_time.strftime('on %A %-d %B %Y at %-H:%M:%S %Z') }} (in {{ duration // 60 }} minutes and {{ duration % 60 }} seconds).<br/>
You can find the scripts used to generate this website <a href="https://github.com/python-docs-translations/dashboard/">on GitHub</a>.<br/>
You can download the data on this page in <a href="https://raw.githubusercontent.com/python-docs-translations/dashboard/refs/heads/gh-pages/index.json">JSON format</a>.
</p>
{% endblock %}
59 changes: 34 additions & 25 deletions templates/metadata.html.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,40 @@

{% block main %}
<table>
<thead>
<tr>
<th>language</th>
<th>branch</th>
<th>last updated</th>
<th>build warnings*</th>
<th>lint failures</th>
</tr>
</thead>
<tbody>
{% for project, metadata in metadata | sort(attribute='0.completion') | reverse %}
<tr>
<td data-label="language">{{ project.language.name }} ({{ project.language.code }})</td>
<td data-label="branch">{{ project.branch }}</td>
<td data-label="updated">{{ metadata[2].strftime('%Y/%m/%d %T') if metadata[2] else '' }}</td>
<td data-label="warnings">
{% if project.completion %}<a href="warnings-{{ project.language.code }}.txt">{{ metadata[0] }}</a>{% else %}{{ metadata[0] }}{% endif %}
</td>
<td data-label="lint">
{% if project.completion %}<a href="warnings-lint-{{ project.language.code }}.txt">{{ metadata[1] }}</a>{% else %}{{ metadata[1] }}{% endif %}
</td>
</tr>
{% endfor %}
</tbody>
<thead>
<tr>
<th>language</th>
<th>branch</th>
<th>last updated</th>
<th>build warnings*</th>
<th>lint failures</th>
</tr>
</thead>
<tbody>
{% for project, metadata in metadata | sort(attribute='0.completion') | reverse %}
<tr>
<td data-label="language">{{ project.language.name }} ({{ project.language.code }})</td>
<td data-label="branch">{{ project.branch }}</td>
<td data-label="updated">{{ metadata[2].strftime('%Y/%m/%d %T') if metadata[2] else '' }}</td>
<td data-label="warnings">
{% if project.completion %}
<a href="warnings-{{ project.language.code }}.txt">{{ metadata[0] }}</a>
{% else %}
{{ metadata[0] }}
{% endif %}
</td>
<td data-label="lint">
{% if project.completion %}
<a href="warnings-lint-{{ project.language.code }}.txt">{{ metadata[1] }}</a>
{% else %}
{{ metadata[1] }}
{% endif %}
</td>
</tr>
{% endfor %}
</tbody>
</table>

<p>* number of Sphinx build process warnings</p>
<p>Last updated at {{ generation_time.strftime('%A, %-d %B %Y, %-H:%M:%S %Z') }} (in {{ duration // 60 }}:{{ "{:02}".format(duration % 60) }} minutes).</p>
<p>Last updated at {{ generation_time.strftime('%A, %-d %B %Y, %-H:%M:%S %Z') }} (in {{ duration // 60 }}:{{ "{:02}".format(duration % 60) }} minutes).</p>
{% endblock %}
Loading