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 %}
{# 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>
{% include "layout_templates/menu.html" %}
</nav>
@ -72,7 +77,7 @@
</nav>
{% set main_classes = [] %}
{% 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 %}
{% if 'code-column' in meta %} {# The page contains a 'memento' (side dynamic block) #}
@ -88,14 +93,11 @@
{% endif %}
<main class="container-fluid {{ ' '.join(main_classes) }}">
{% if pagename == master_doc %}
<div id="o_content">
{# Custom landing page on the root of the documentation #}
{% include "layout_templates/homepage.html" %}
</div>
{% 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 -->
<div role="main">
{% block body %} {% endblock %}

View File

@ -1,3 +1,4 @@
<div id="o_content">
<div class="row">
<div class="col-12 col-md-4">
<h2 class="text-center o_title_start">Getting Started</h2>
@ -116,3 +117,4 @@
</ul>
</div>
</div>
</div>

View File

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