Skip to content

Commit 810e583

Browse files
jyn514Kixiron
authored andcommitted
Fix whitespace and document active_link
Co-authored-by: Chase Wilson <[email protected]>
1 parent b778774 commit 810e583

File tree

3 files changed

+12
-5
lines changed

3 files changed

+12
-5
lines changed

templates/about-base.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{% extends "base.html" %}
2+
23
{% block header %}
34
<div class="cratesfyi-package-container">
45
<div class="container about">

templates/crate/details.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -148,12 +148,12 @@
148148
{# Display a warning telling the user we failed to build the docs #}
149149
<div class="warning">
150150
docs.rs failed to build {{ details.name }}-{{ details.version }}
151-
152-
<br>Please check the
151+
<br>
152+
Please check the
153153
<a href="/crate/{{ details.name }}/{{ details.version }}/builds">build logs</a> and, if you believe this is
154154
docs.rs' fault, <a href="https://github.com/rust-lang/docs.rs/issues/new/choose">open an issue</a>.
155-
156-
<br>See <a href="/about/builds">Builds</a> for ideas on how to fix a failed build,
155+
<br>
156+
See <a href="/about/builds">Builds</a> for ideas on how to fix a failed build,
157157
or <a href="/about/metadata">Metadata</a> for how to configure docs.rs builds.
158158
</div>
159159

templates/macros.html

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,16 @@
22
Makes the appropriate JS imports for highlighting
33
* `languages` An array of strings where each is a valid highlight.js language
44
#}
5+
{#
6+
Creates a list entry for active tabs. When the active tab is the same as `expected`, it will show the current tab as active.
7+
* `expected` A string that represents the current tab, when `active_tab == expected` the current will be shown as active
8+
* `href` A string used as the tab's link
9+
* `text` A string used as the tab's text
10+
#}
511
{% macro active_link(expected, href, text) %}
612
<li class="pure-menu-item">
713
<a class="pure-menu-link {% if active_tab == expected %} pure-menu-active {% endif %}" href="{{ href }}">
8-
{{ text }}
14+
{{ text }}
915
</a>
1016
</li>
1117
{% endmacro active_link %}

0 commit comments

Comments
 (0)