handle noscript rendering

This commit is contained in:
Elisabeth Dickinson 2021-03-24 11:21:32 +01:00
parent 108c3102f5
commit 6595bad9d2
3 changed files with 140 additions and 136 deletions

View File

@ -55,6 +55,11 @@
{% block header %} {% block header %}
{# shown when js has properly set all the classes on the toc elements #} {# shown when js has properly set all the classes on the toc elements #}
<noscript>
<nav class="o_side_nav border-end">
{% include "layout_templates/menu.html" %}
</nav>
</noscript>
<nav id="o_main_toctree" class="o_side_nav border-end" hidden> <nav id="o_main_toctree" class="o_side_nav border-end" hidden>
{% include "layout_templates/menu.html" %} {% include "layout_templates/menu.html" %}
</nav> </nav>
@ -72,7 +77,7 @@
</nav> </nav>
{% set main_classes = [] %} {% set main_classes = [] %}
{% if pagename == master_doc %} {# The current page is the homepage #} {% if pagename == master_doc %} {# The current page is the homepage #}
{% set main_classes = main_classes + ['index'] %} {# TODO ANVFE should be 'o_index' #} {% set main_classes = main_classes + ['index'] %} {# TODO EDI should be 'o_index' #}
{% endif %} {% endif %}
{% if 'code-column' in meta %} {# The page contains a 'memento' (side dynamic block) #} {% if 'code-column' in meta %} {# The page contains a 'memento' (side dynamic block) #}
@ -88,14 +93,11 @@
{% endif %} {% endif %}
<main class="container-fluid {{ ' '.join(main_classes) }}"> <main class="container-fluid {{ ' '.join(main_classes) }}">
{% if pagename == master_doc %} {% if pagename == master_doc %}
<div id="o_content">
{# Custom landing page on the root of the documentation #} {# Custom landing page on the root of the documentation #}
{% include "layout_templates/homepage.html" %} {% include "layout_templates/homepage.html" %}
</div>
{% else %} {% else %}
<article class="doc-body"> <article id="o_content" class="doc-body">
<!-- Beacon used by the Sphinx search to know where to look for a string --> <!-- Beacon used by the Sphinx search to know where to look for a string -->
<div role="main"> <div role="main">
{% block body %} {% endblock %} {% block body %} {% endblock %}

View File

@ -1,4 +1,5 @@
<div class="row"> <div id="o_content">
<div class="row">
<div class="col-12 col-md-4"> <div class="col-12 col-md-4">
<h2 class="text-center o_title_start">Getting Started</h2> <h2 class="text-center o_title_start">Getting Started</h2>
<ul class="list-unstyled"> <ul class="list-unstyled">
@ -71,8 +72,8 @@
</li> </li>
</ul> </ul>
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<div class="col-12 col-md-4"> <div class="col-12 col-md-4">
<h2 class="text-center o_title_tutorial">Tutorials</h2> <h2 class="text-center o_title_tutorial">Tutorials</h2>
<ul class="list-unstyled"> <ul class="list-unstyled">
@ -115,4 +116,5 @@
</li> </li>
</ul> </ul>
</div> </div>
</div>
</div> </div>

View File

@ -326,7 +326,7 @@ header.o_main_header{
margin: 0; margin: 0;
} }
&.index, &.doc-toc, &.has_code_col { &.index, &.o_fullwidth_page, &.has_code_col {
@include media-breakpoint-up(lg) { @include media-breakpoint-up(lg) {
max-width: calc(100vw - (#{$o-side-nav-width} + var(--bs-gutter-x, 1.5rem)) ); max-width: calc(100vw - (#{$o-side-nav-width} + var(--bs-gutter-x, 1.5rem)) );
} }