Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to rinja 0.3.3 and more templates cleanup #2600

Merged
merged 2 commits into from
Sep 14, 2024
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
12 changes: 6 additions & 6 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ tempfile = "3.1.0"
fn-error-context = "0.2.0"

# Templating
rinja = "0.3.2"
rinja = "0.3.3"
walkdir = "2"

# Date and Time utilities
Expand Down
1 change: 0 additions & 1 deletion templates/about-base.html
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ <h1 id="crate-title" class="no-description">Docs.rs documentation</h1>
{% endblock %}

{%- block topbar -%}
{% set is_latest_version = true %}
{% let search_query = Some(String::new()) %}
{%- include "header/topbar.html" -%}
{%- endblock topbar -%}
1 change: 0 additions & 1 deletion templates/core/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
{%- endblock body_classes -%}

{%- block topbar -%}
{% set is_latest_version = true %}
{% set search_query = Some(String::new()) %}
{%- include "header/topbar.html" -%}
{%- endblock topbar -%}
Expand Down
1 change: 0 additions & 1 deletion templates/crate/build_details.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

{%- block topbar -%}
{%- set inner_path = metadata.target_name_url() -%}
{%- set is_latest_version = true -%}
{%- set is_prerelease = false -%}
{%- set has_crate = false %}
{%- include "rustdoc/topbar.html" -%}
Expand Down
1 change: 0 additions & 1 deletion templates/crate/builds.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@

{%- block topbar -%}
{%- set inner_path = metadata.target_name_url() -%}
{%- set is_latest_version = true -%}
{%- include "rustdoc/topbar.html" -%}
{%- endblock topbar -%}

Expand Down
1 change: 0 additions & 1 deletion templates/crate/details.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

{%- block topbar -%}
{%- set inner_path = metadata.target_name_url() -%}
{%- set is_latest_version = true -%}
{%- include "rustdoc/topbar.html" -%}
{%- endblock topbar -%}

Expand Down
1 change: 0 additions & 1 deletion templates/crate/features.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

{%- block topbar -%}
{%- set inner_path = metadata.target_name_url() -%}
{%- set is_latest_version = true -%}
{%- include "rustdoc/topbar.html" -%}
{%- endblock topbar -%}

Expand Down
1 change: 0 additions & 1 deletion templates/crate/source.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

{%- block topbar -%}
{%- set inner_path = metadata.target_name_url() -%}
{%- set is_latest_version = true -%}
{%- include "rustdoc/topbar.html" -%}
{%- endblock topbar -%}

Expand Down
1 change: 0 additions & 1 deletion templates/error.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ <h1 id="crate-title">{{ title }}</h1>
{%- endblock header -%}

{%- block topbar -%}
{% set is_latest_version = true %}
{% set search_query = Some(String::new()) %}
{%- include "header/topbar.html" -%}
{%- endblock topbar -%}
2 changes: 1 addition & 1 deletion templates/header/topbar_begin.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
method="GET"
id="nav-search-form"
class="landing-search-form-nav {%
if !is_latest_version %}not-latest{% endif
if is_latest_version is defined && !is_latest_version %}not-latest{% endif
%} {% if metadata is defined && metadata.yanked.unwrap_or_default() %}yanked{% endif %}">

{# The top-left logo and name #}
Expand Down
1 change: 0 additions & 1 deletion templates/releases/activity.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
{%- endblock header -%}

{%- block topbar -%}
{% set is_latest_version = true %}
{% let search_query = Some(String::new()) %}
{%- include "header/topbar.html" -%}
{%- endblock topbar -%}
Expand Down
1 change: 0 additions & 1 deletion templates/releases/build_queue.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
{%- endblock header -%}

{%- block topbar -%}
{% set is_latest_version = true %}
{% let search_query = Some(String::new()) %}
{%- include "header/topbar.html" -%}
{%- endblock topbar -%}
Expand Down
1 change: 0 additions & 1 deletion templates/releases/releases.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
{%- endblock header -%}

{%- block topbar -%}
{% set is_latest_version = true %}
{% set search_query = Some(String::new()) %}
{%- include "header/topbar.html" -%}
{%- endblock topbar -%}
Expand Down
1 change: 0 additions & 1 deletion templates/releases/search_results.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
{%- endblock header -%}

{%- block topbar -%}
{% set is_latest_version = true %}
{% let search_query = search_query %}
{%- include "header/topbar.html" -%}
{%- endblock topbar -%}
Expand Down
4 changes: 2 additions & 2 deletions templates/rustdoc/topbar.html
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@

{#- If this is the latest release and it's been yanked, just display a warning -#}
{%- set yanked = metadata.yanked.unwrap_or_default() -%}
{%- if is_latest_version && yanked -%}
{%- if (is_latest_version is not defined || is_latest_version) && yanked -%}
<li class="pure-menu-item">
<span class="pure-menu-link warn">
{{ "triangle-exclamation"|fas(false, false, "") }}
Expand All @@ -188,7 +188,7 @@
</li>

{#- If this isn't the most recent stable release, offer a link to the latest -#}
{%- elif !is_latest_version -%}
{%- elif is_latest_version is defined && !is_latest_version -%}
{% set tooltip %}
{% set title %}
{%- if yanked -%}
Expand Down
Loading