15
15
{% macro package_navigation(title=false, metadata, platforms=false, active_tab) %}
16
16
< div class ="cratesfyi-package-container ">
17
17
< div class ="container ">
18
+ {# The partial path of the crate, `:name/:release` #}
19
+ {%- set crate_path = metadata.name ~ "/" ~ metadata.version -%}
20
+
21
+ {# If docs are built, show a button for them #}
22
+
18
23
{# Page title #}
19
24
< h1 id ="crate-title ">
20
25
{%- if title -%}
@@ -25,10 +30,17 @@ <h1 id="crate-title">
25
30
{%- endif -%}
26
31
</ h1 >
27
32
28
- {# Page description #}
29
- < div class ="description ">
30
- {%- if metadata.description -%}
31
- {{ metadata.description }}
33
+ < div class ="description-container ">
34
+ {# Page description #}
35
+ < div class ="description ">
36
+ {%- if metadata.description -%}
37
+ {{ metadata.description }}
38
+ {%- endif -%}
39
+ </ div >
40
+ {%- if metadata.rustdoc_status -%}
41
+ < a href ="/{{ crate_path | safe }}/{{ metadata.target_name }}/ " class ="doc-link ">
42
+ {{ "book" | fas(fw=true) }} Documentation
43
+ </ a >
32
44
{%- endif -%}
33
45
</ div >
34
46
@@ -53,20 +65,6 @@ <h1 id="crate-title">
53
65
{%- endif -%}
54
66
55
67
< ul class ="pure-menu-list ">
56
- {# The partial path of the crate, `:name/:release` #}
57
- {%- set crate_path = metadata.name ~ "/" ~ metadata.version -%}
58
-
59
- {# If docs are built, show a tab for them #}
60
- {%- if metadata.rustdoc_status -%}
61
- < li class ="pure-menu-item ">
62
- {# The docs tab redirects to the docs, so the tab will never be selected and seen #}
63
- < a href ="/{{ crate_path | safe }}/{{ metadata.target_name }}/ " class ="pure-menu-link ">
64
- {{ "book" | fas(fw=true) }}
65
- < span class ="title "> Documentation</ span >
66
- </ a >
67
- </ li >
68
- {%- endif -%}
69
-
70
68
{# The crate information tab #}
71
69
< li class ="pure-menu-item "> < a href ="/crate/{{ crate_path | safe }} "
72
70
class ="pure-menu-link{% if active_tab == 'crate' %} pure-menu-active{% endif %} ">
0 commit comments