Skip to content

Commit d515419

Browse files
committed
Use HTML base tag in head to specify default anchors target
1 parent b99fd95 commit d515419

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

template.html.jinja

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
<title>Python Docs Translation Dashboard</title>
44
<link rel="stylesheet" href="style.css">
55
<meta charset="UTF-8">
6+
<base target="_blank">
67
</head>
78
<body>
89
<h1>Python Docs Translation Dashboard</h1>
@@ -23,32 +24,32 @@
2324
<tr>
2425
<td data-label="language">{{ project.language.name }} ({{ project.language.code }})</td>
2526
<td data-label="contribute">
26-
{% if project.contribution_link %}<a href="{{ project.contribution_link }}" target="_blank">{% endif %}
27+
{% if project.contribution_link %}<a href="{{ project.contribution_link }}">{% endif %}
2728
{% if project.uses_platform %}platform{% else %}repository{% endif %}
2829
{% if project.contribution_link %}</a>{% endif %}
2930
</td>
3031
<td data-label="build">
3132
{% if project.built %}
32-
<a href="https://docs.python.org/{{ project.language.code }}/" target="_blank">✓{% if project.in_switcher %} in switcher{% endif %}</a>
33+
<a href="https://docs.python.org/{{ project.language.code }}/">✓{% if project.in_switcher %} in switcher{% endif %}</a>
3334
{% else %}
3435
3536
{% endif %}
3637
</td>
3738
<td data-label="visitors">
3839
{% if project.built %}
39-
<a href="https://plausible.io/docs.python.org?filters=((contains,page,(/{{ project.language.code }}/)))" target="_blank">
40+
<a href="https://plausible.io/docs.python.org?filters=((contains,page,(/{{ project.language.code }}/)))">
4041
{{ '{:,}'.format(project.visitors) }}
4142
</a>
4243
{% else %}
4344
{{ '{:,}'.format(project.visitors) }}
4445
{% endif %}
4546
</td>
4647
<td data-label="translators">
47-
{% if project.translators.link %}<a href="{{ project.translators.link }}" target="_blank">{% endif %}
48+
{% if project.translators.link %}<a href="{{ project.translators.link }}">{% endif %}
4849
{{ project.translators.number }}
4950
{% if project.translators.link %}</a>{% endif %}
5051
</td>
51-
<td data-label="warnings"><a href="warnings-{{ project.language.code }}.txt" target="_blank">{{ project.warnings }}</a></td>
52+
<td data-label="warnings"><a href="warnings-{{ project.language.code }}.txt">{{ project.warnings }}</a></td>
5253
<td data-label="completion">
5354
<div class="progress-bar" style="width: {{ project.completion }}%;">{{ "{:.2f}".format(project.completion) }}%</div>
5455
<div class="progress-bar-outer-label">{{ "{:.2f}".format(project.completion) }}%</div>
@@ -57,9 +58,9 @@
5758
{% endfor %}
5859
</tbody>
5960
</table>
60-
<p>¹ sum of <a href="https://plausible.io/data-policy#how-we-count-unique-users-without-cookies" target="_blank">daily unique visitors</a> since 8 June 2024</p>
61+
<p>¹ sum of <a href="https://plausible.io/data-policy#how-we-count-unique-users-without-cookies">daily unique visitors</a> since 8 June 2024</p>
6162
<p>² number of Sphinx build process warnings</p>
62-
<p>For more information about translations, see the <a href="https://devguide.python.org/documentation/translating/" target="_blank">Python Developer’s Guide</a>.</p>
63+
<p>For more information about translations, see the <a href="https://devguide.python.org/documentation/translating/">Python Developer’s Guide</a>.</p>
6364
<p>Last updated at {{ generation_time.strftime('%A, %-d %B %Y, %-H:%M:%S %Z') }} (in {{ duration // 60 }}:{{ "{:02}".format(duration % 60) }} minutes).</p>
6465
</body>
6566
<script>

0 commit comments

Comments
 (0)