Skip to content

Commit

Permalink
portico: Add isolated_page context flag, to suppress site nav.
Browse files Browse the repository at this point in the history
This flag allows rendering as a single isolated page, without the
navigation in header and footer that otherwise provides links to the
rest of the site.

The portico layout, including the styling of the "hero" area at top,
all remains the same.

We don't yet ever set this flag; that'll come next.
  • Loading branch information
gnprice authored and timabbott committed Jan 29, 2020
1 parent bf2f36e commit 6dbe84a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions templates/zerver/landing_nav.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{% if not isolated_page %}
<nav class="portico-header">
<div class="content">
<a class="brand logo" href="{{ root_domain_uri }}">
Expand Down Expand Up @@ -59,3 +60,4 @@
</div>
<svg height="32px" class="hamburger" style="enable-background:new 0 0 32 32;" version="1.1" viewBox="0 0 32 32" width="32px" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><path d="M4,10h24c1.104,0,2-0.896,2-2s-0.896-2-2-2H4C2.896,6,2,6.896,2,8S2.896,10,4,10z M28,14H4c-1.104,0-2,0.896-2,2 s0.896,2,2,2h24c1.104,0,2-0.896,2-2S29.104,14,28,14z M28,22H4c-1.104,0-2,0.896-2,2s0.896,2,2,2h24c1.104,0,2-0.896,2-2 S29.104,22,28,22z"/></svg>
</nav>
{% endif %}
4 changes: 4 additions & 0 deletions templates/zerver/portico.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,18 @@
{% block content %}
<div class="portico-container" data-platform="{{ platform }}">
<div class="portico-wrap">
{% if not isolated_page %}
{% include 'zerver/portico-header.html' %}
{% endif %}
<div class="app portico-page {% block portico_class_name %}{% endblock %}">
<div class="app-main portico-page-container{% block hello_page_container %}{% endblock %}">
{% block portico_content %}
{% endblock %}
</div>
</div>
</div>
{% if not isolated_page %}
{% include 'zerver/footer.html' %}
{% endif %}
</div>
{% endblock %}

0 comments on commit 6dbe84a

Please sign in to comment.