docs: Add doc root links to sidebar.

A recent commit (5a94bfcb88)
introduced a couple of regressions:

* The part of help.js that highlights the active page in the
  sidebar raised an exception on /help and /api since there
  was nothing to highlight for the doc roots in the sidebar
  anymore.
* Moving the doc root links to the header after the logo made
  it such that on narrow mobile widths, there was no way to get
  to the doc root since the links in the header were truncated.

With a CSS change by tabbott to avoid awkward vertical spacing.
This commit is contained in:
Eeshan Garg 2021-07-28 19:01:40 -02:30 committed by Tim Abbott
parent 1e94f6ac96
commit 5555864e54
2 changed files with 3 additions and 1 deletions

View File

@ -170,7 +170,7 @@ html {
border-bottom: 1px solid hsla(0, 0, 100%, 0.6);
&:not(:first-of-type) {
margin-top: 20px;
margin-top: 0;
}
&:first-of-type,
@ -180,6 +180,7 @@ html {
&.home-link {
font-size: 1em;
margin-top: 20px;
margin-bottom: 17px;
a::before {

View File

@ -11,6 +11,7 @@
<div class="sidebar">
<div class="content">
<h1><a href="https://zulip.com" class="no-underline">Zulip homepage</a></h1>
<h1><a href="{{ doc_root }}" class="no-underline">{{ doc_root_title }} home</a></h1>
{{ render_markdown_path(sidebar_index, api_uri_context) }}
<h1 class="home-link"><a href="/" class="no-underline">Back to Zulip</a></h1>
</div>