-
Notifications
You must be signed in to change notification settings - Fork 935
/
index.html
109 lines (97 loc) · 4.84 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
{#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
-#}
{% extends "base.html" %}
{% block title_base %}{{ request.registry.settings['site.name'] }} · {% trans %}The Python Package Index{% endtrans %}{% endblock %}
{% block brand %}
<div>
<a class="site-header__logo" href="{{ request.route_path('index') }}">
<img alt="{{ request.registry.settings['site.name'] }}" src="{{ request.static_path('warehouse:static/dist/images/logo-small.svg') }}">
</a>
</div>
{% endblock %}
{% block mobile_search %}{% endblock %}
{% block content %}
{% if testPyPI %}
{% set banner = _("Test Python package publishing with the Test Python Package Index") %}
{% elif devPyPI %}
{% set banner = _("Develop the codebase behind PyPI with the Dev Python Package Index") %}
{% else %}
{% set banner = _("Find, install and publish Python packages with the Python Package Index") %}
{% endif %}
<div class="banner">
<div class="homepage-banner">
<h1 class="homepage-banner__title">{{ banner }}</h1>
<form class="search-form search-form--large search-form--fullwidth" action="{{ request.route_path('search') }}" role="search">
<label for="search" class="sr-only">{% trans %}Search PyPI{% endtrans %}</label>
<!-- The following input is intentionally not autofocused, see https://github.com/pypi/warehouse/issues/6088 for more details -->
<input id="search" class="search-form__search large-input" type="text" name="q" placeholder="{% trans %}Search projects{% endtrans %}" autocomplete="off" autocapitalize="off" spellcheck="false" data-controller="search-focus" data-action="keydown@window->search-focus#focusSearchField" data-search-focus-target="searchField">
<button type="submit" class="search-form__button">
<i class="fa fa-search" aria-hidden="true"></i>
<span class="sr-only">{% trans %}Search{% endtrans %}</span>
</button>
</form>
<p class="homepage-banner__browse">{% trans href=request.route_path('search') %}Or <a href="{{ href }}">browse projects</a>{% endtrans %}</p>
</div>
</div>
<div class="horizontal-section horizontal-section--grey horizontal-section--thin horizontal-section--statistics">
<div class="statistics-bar">
<p class="statistics-bar__statistic">
{% trans num_projects=num_projects, num_projects_formatted=num_projects|format_number %}
{{ num_projects_formatted }} project
{% pluralize num_projects %}
{{ num_projects_formatted }} projects
{% endtrans %}
</p>
<p class="statistics-bar__statistic">
{% trans num_releases=num_releases, num_releases_formatted=num_releases|format_number %}
{{ num_releases_formatted }} release
{% pluralize num_releases %}
{{ num_releases_formatted }} releases
{% endtrans %}
</p>
<p class="statistics-bar__statistic">
{% trans num_files=num_files, num_files_formatted=num_files|format_number %}
{{ num_files_formatted }} file
{% pluralize num_files %}
{{ num_files_formatted }} files
{% endtrans %}
</p>
<p class="statistics-bar__statistic">
{% trans num_users=num_users, num_users_formatted=num_users|format_number %}
{{ num_users_formatted }} user
{% pluralize num_users %}
{{ num_users_formatted }} users
{% endtrans %}
</p>
</div>
</div>
<div class="horizontal-section">
<div class="about-pypi">
<div class="about-pypi__logo">
<img alt="" src="{{ request.static_path('warehouse:static/dist/images/logo-large.svg') }}" loading="lazy">
</div>
<div class="about-pypi__text">
<p class="lede-paragraph">{% trans %}The Python Package Index (PyPI) is a repository of software for the Python programming language.{% endtrans %}</p>
<p>
{% trans %}PyPI helps you find and install software developed and shared by the Python community.{% endtrans %}
<a href="https://packaging.python.org/tutorials/installing-packages/" title="{% trans %}External link{% endtrans %}" target="_blank" rel="noopener">{% trans %}Learn about installing packages{% endtrans %}</a>.
</p>
<p>
{% trans %}Package authors use PyPI to distribute their software.{% endtrans %}
<a href="https://packaging.python.org/tutorials/packaging-projects/" title="{% trans %}External link{% endtrans %}" target="_blank" rel="noopener">{% trans %}Learn how to package your Python code for PyPI{% endtrans %}</a>.
</p>
</div>
</div>
</div>
{% endblock %}