Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
docs: Add proper backlink to the homepage from /help and /api.
Eeshan Garg5a94bfcb88bf
diff --git a/static/styles/portico/portico.css b/static/styles/portico/portico.cssindex 148790e5924..ef8df95d103 100644--- a/static/styles/portico/portico.css+++ b/static/styles/portico/portico.css@@ -556,6 +556,13 @@ input.text-error {vertical-align: -5px;}+ a,+ a:focus,+ a:hover {+ text-decoration: none;+ color: hsl(0, 0%, 20%);+ }+.light {font-size: 1.2rem;font-weight: 400;diff --git a/templates/zerver/documentation_main.html b/templates/zerver/documentation_main.htmlindex 5b0c9f35d31..2c7b612c4d1 100644--- a/templates/zerver/documentation_main.html+++ b/templates/zerver/documentation_main.html@@ -10,7 +10,7 @@<div class="app help terms-page inline-block{% if page_is_help_center %} help-center{% endif %}{% if page_is_api_center %} api-center{% endif %}"><div class="sidebar"><div class="content">- <h1><a href="{{ doc_root }}" class="no-underline">Home</a></h1>+ <h1><a href="https://zulip.com" class="no-underline">Zulip homepage</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>diff --git a/templates/zerver/help/index.md b/templates/zerver/help/index.mdindex aecc1805835..d336ff9e3d1 100644--- a/templates/zerver/help/index.md+++ b/templates/zerver/help/index.md@@ -1,4 +1,4 @@-# Zulip user documentation+# Zulip help centerZulip is a group chat app. Its most distinctive characteristic is thatconversation within an organization is divided into “**streams**”diff --git a/templates/zerver/portico-header.html b/templates/zerver/portico-header.htmlindex 4d312db38e3..8bb315bd496 100644--- a/templates/zerver/portico-header.html+++ b/templates/zerver/portico-header.html@@ -4,17 +4,20 @@{% if custom_logo_url %}<a class="brand logo" href="{{ root_domain_uri }}/"><img draggable="false" src="{{ custom_logo_url }}" class="portico-logo" alt="{{ _('Zulip') }}" content="Zulip" /></a>{% else %}- <a class="brand logo" href="{{ root_domain_uri }}{% if page_is_help_center %}/help/{% endif %}">- <svg class="brand-logo" role="img" aria-label="{{ _('Zulip') }}" xmlns="http://www.w3.org/2000/svg" viewBox="68.96 55.62 1742.12 450.43" height="25">- <path fill="hsl(0, 0%, 27%)" d="M473.09 122.97c0 22.69-10.19 42.85-25.72 55.08L296.61 312.69c-2.8 2.4-6.44-1.47-4.42-4.7l55.3-110.72c1.55-3.1-.46-6.91-3.64-6.91H129.36c-33.22 0-60.4-30.32-60.4-67.37 0-37.06 27.18-67.37 60.4-67.37h283.33c33.22-.02 60.4 30.3 60.4 67.35zM129.36 506.05h283.33c33.22 0 60.4-30.32 60.4-67.37 0-37.06-27.18-67.37-60.4-67.37H198.2c-3.18 0-5.19-3.81-3.64-6.91l55.3-110.72c2.02-3.23-1.62-7.1-4.42-4.7L94.68 383.6c-15.53 12.22-25.72 32.39-25.72 55.08 0 37.05 27.18 67.37 60.4 67.37zm522.5-124.15l124.78-179.6v-1.56H663.52v-48.98h190.09v34.21L731.55 363.24v1.56h124.01v48.98h-203.7V381.9zm338.98-230.14V302.6c0 45.09 17.1 68.03 47.43 68.03 31.1 0 48.2-21.77 48.2-68.03V151.76h59.09V298.7c0 80.86-40.82 119.34-109.24 119.34-66.09 0-104.96-36.54-104.96-120.12V151.76h59.48zm244.91 0h59.48v212.25h104.18v49.76h-163.66V151.76zm297 0v262.01h-59.48V151.76h59.48zm90.18 3.5c18.27-3.11 43.93-5.44 80.08-5.44 36.54 0 62.59 7 80.08 20.99 16.72 13.22 27.99 34.99 27.99 60.64 0 25.66-8.55 47.43-24.1 62.2-20.21 19.05-50.15 27.6-85.13 27.6-7.77 0-14.77-.39-20.21-1.17v93.69h-58.7V155.26zm58.7 118.96c5.05 1.17 11.27 1.55 19.83 1.55 31.49 0 50.92-15.94 50.92-42.76 0-24.1-16.72-38.49-46.26-38.49-12.05 0-20.21 1.17-24.49 2.33v77.37z"/>- </svg>+ <div class="brand logo">+ <a href="{{ root_domain_uri }}/">+ <svg class="brand-logo" role="img" aria-label="{{ _('Zulip') }}" xmlns="http://www.w3.org/2000/svg" viewBox="68.96 55.62 1742.12 450.43" height="25">+ <path fill="hsl(0, 0%, 27%)" d="M473.09 122.97c0 22.69-10.19 42.85-25.72 55.08L296.61 312.69c-2.8 2.4-6.44-1.47-4.42-4.7l55.3-110.72c1.55-3.1-.46-6.91-3.64-6.91H129.36c-33.22 0-60.4-30.32-60.4-67.37 0-37.06 27.18-67.37 60.4-67.37h283.33c33.22-.02 60.4 30.3 60.4 67.35zM129.36 506.05h283.33c33.22 0 60.4-30.32 60.4-67.37 0-37.06-27.18-67.37-60.4-67.37H198.2c-3.18 0-5.19-3.81-3.64-6.91l55.3-110.72c2.02-3.23-1.62-7.1-4.42-4.7L94.68 383.6c-15.53 12.22-25.72 32.39-25.72 55.08 0 37.05 27.18 67.37 60.4 67.37zm522.5-124.15l124.78-179.6v-1.56H663.52v-48.98h190.09v34.21L731.55 363.24v1.56h124.01v48.98h-203.7V381.9zm338.98-230.14V302.6c0 45.09 17.1 68.03 47.43 68.03 31.1 0 48.2-21.77 48.2-68.03V151.76h59.09V298.7c0 80.86-40.82 119.34-109.24 119.34-66.09 0-104.96-36.54-104.96-120.12V151.76h59.48zm244.91 0h59.48v212.25h104.18v49.76h-163.66V151.76zm297 0v262.01h-59.48V151.76h59.48zm90.18 3.5c18.27-3.11 43.93-5.44 80.08-5.44 36.54 0 62.59 7 80.08 20.99 16.72 13.22 27.99 34.99 27.99 60.64 0 25.66-8.55 47.43-24.1 62.2-20.21 19.05-50.15 27.6-85.13 27.6-7.77 0-14.77-.39-20.21-1.17v93.69h-58.7V155.26zm58.7 118.96c5.05 1.17 11.27 1.55 19.83 1.55 31.49 0 50.92-15.94 50.92-42.76 0-24.1-16.72-38.49-46.26-38.49-12.05 0-20.21 1.17-24.49 2.33v77.37z"/>+ </svg>+ </a>+{% if page_is_help_center %}- <span class="light"> | User documentation</span>+ <span class="light"> | <a href="{{ root_domain_uri }}/help/">{{ doc_root_title }}</a></span>{% endif %}{% if page_is_api_center %}- <span class="light"> | API documentation</span>+ <span class="light"> | <a href="{{ root_domain_uri }}/api/">{{ doc_root_title }}</a></span>{% endif %}- </a>+ </div>{% endif %}</div>diff --git a/zerver/views/documentation.py b/zerver/views/documentation.pyindex 0f25f633076..76facbf7a3f 100644--- a/zerver/views/documentation.py+++ b/zerver/views/documentation.py@@ -131,12 +131,14 @@ class MarkdownDirectoryView(ApiURLView):if self.path_template == "/zerver/help/%s.md":context["page_is_help_center"] = Truecontext["doc_root"] = "/help/"+ context["doc_root_title"] = "Help center"sidebar_article = self.get_path("include/sidebar_index")sidebar_index = sidebar_article.article_pathtitle_base = "Zulip Help Center"else:context["page_is_api_center"] = Truecontext["doc_root"] = "/api/"+ context["doc_root_title"] = "API documentation"sidebar_article = self.get_path("sidebar_index")sidebar_index = sidebar_article.article_pathtitle_base = "Zulip API documentation"