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 authored and hana committed Jun 14, 2023
1 parent 3537d2d commit 192dcb2
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 9 deletions.
24 changes: 15 additions & 9 deletions djangoproject/scss/_style.scss
Expand Up @@ -2380,10 +2380,11 @@ dt {

#doc-versions,
#doc-languages,
#faq-link {
margin: 0;
padding-top: 0.25em;
padding-bottom: 0.25em;
#faq-link,
#backtotop-link {
margin: 0;
padding-top: 0.25em;
padding-bottom: 0.25em;

&.open {
li {
Expand Down Expand Up @@ -2426,12 +2427,17 @@ dt {
border: 1px solid var(--hairline-color);
border-radius: 4px;

&:hover {
color: var(--secondary);
border: 1px solid $green-light;
}
&:hover {
color: var(--secondary);
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 {
pointer-events: auto;
Expand Down
5 changes: 5 additions & 0 deletions docs/templates/docs/doc.html
Expand Up @@ -106,6 +106,11 @@
</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 192dcb2

Please sign in to comment.