{% import "pypi_ds/components/forms.html" as forms %} {% import "pypi_ds/components/navigation.html" as navigation %} {% macro site_header( brand_name="PyPI", brand_href="/", search_action="/search", search_query="", search_placeholder="Type '/' to search projects", nav_items=None, secondary_items=None, site_state="production", asset_base="/static/pypi_ds" ) -%} {% if nav_items is none %} {% set nav_items = [ {"label": "Help", "href": "/help"}, {"label": "Docs", "href": "/docs"}, {"label": "Sponsors", "href": "/sponsors"} ] %} {% endif %} {% if secondary_items is none %} {% set secondary_items = [ {"label": "Log in", "href": "/login"}, {"label": "Register", "href": "/register"} ] %} {% endif %}
{{ forms.search_form( field_id="site-search", action=search_action, query=search_query, placeholder=search_placeholder, label="Search packages", variant="primary" ) }}
{{ navigation.horizontal_menu(nav_items, aria_label="Primary navigation", light=True, tall=True) }} {{ navigation.horizontal_menu(secondary_items, aria_label="Account navigation", light=True, tall=True, extra_classes="header-navigation__secondary") }}
{%- endmacro %} {% macro hero(title, summary=None, browse_href=None, browse_label="browse projects") -%} {%- endmacro %} {% macro horizontal_section(modifiers="", container_class="site-container") -%}
{{ caller() }}
{%- endmacro %} {% macro sidebar_section(title, extra_classes="") -%} {%- endmacro %} {% macro card(title=None, extra_classes="") -%}
{% if title %}

{{ title }}

{% endif %} {{ caller() }}
{%- endmacro %} {% macro site_footer( footer_menus=None, footer_note=None, supporting_note=None, asset_base="/static/pypi_ds" ) -%} {% if footer_menus is none %} {% set footer_menus = [ { "title": "Help", "links": [ {"label": "Installing packages", "href": "https://packaging.python.org/tutorials/installing-packages/"}, {"label": "Publishing packages", "href": "https://packaging.python.org/tutorials/packaging-projects/"}, {"label": "User guide", "href": "https://packaging.python.org/"}, {"label": "FAQs", "href": "/help"} ] }, { "title": "About", "links": [ {"label": "Project blog", "href": "/blog"}, {"label": "Statistics", "href": "/stats"}, {"label": "Brand assets", "href": "/brand"}, {"label": "Sponsors", "href": "/sponsors"} ] }, { "title": "Community", "links": [ {"label": "Issues and feedback", "href": "https://github.com/pypi/warehouse"}, {"label": "Contribute", "href": "https://github.com/pypi/warehouse"}, {"label": "Translate", "href": "https://hosted.weblate.org/projects/pypa/warehouse/"}, {"label": "Support the service", "href": "/support"} ] }, { "title": "Policies", "links": [ {"label": "Terms of Service", "href": "/terms"}, {"label": "Privacy Notice", "href": "/privacy"}, {"label": "Code of conduct", "href": "/conduct"}, {"label": "Security", "href": "/security"} ] } ] %} {% endif %} {%- endmacro %}