Skip to content

Commit

Permalink
Add back to top link in documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
HanaPoulpe committed Jun 1, 2023
1 parent d27708d commit c814f84
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
8 changes: 7 additions & 1 deletion djangoproject/scss/_style.scss
Expand Up @@ -2380,7 +2380,8 @@ dt {

#doc-versions,
#doc-languages,
#faq-link {
#faq-link,
#backtotop-link {
margin: 0;
padding-top: 0.25em;
padding-bottom: 0.25em;
Expand Down Expand Up @@ -2431,6 +2432,11 @@ dt {
border: 1px solid $green-light;
}
}

a.icon-chevron-up-align {
// Should be removed when icon-chevron-up image have the same black space on both sides.
padding-right: 11px;
}
}

&:hover {
Expand Down
11 changes: 9 additions & 2 deletions docs/templates/docs/doc.html
Expand Up @@ -101,11 +101,18 @@
{% endblocktrans %}{% endif %} {% blocktrans trimmed %}
Click on the links on the left to see other versions.
{% endblocktrans %}">
<span>{% trans "Documentation version:" %}
<strong>{% if release.is_dev %}development{% else %}{{ version }}{% endif %}</strong>
<span>
<span>{% trans "Documentation version:" %}
<strong>{% if release.is_dev %}development{% else %}{{ version }}{% endif %}</strong>
</span>
</span>
</li>
</ul>
<ul id="backtotop-link">
<li class="current-link">
<a href="#top" aria-label="Back to top" class="icon-chevron-up-align"><i class="icon icon-chevron-up"></i></a>
</li>
</ul>
</div>

{% block body %}
Expand Down

0 comments on commit c814f84

Please sign in to comment.