comparison website/www/_templates/layout.html @ 7745:291afa77ad82

doc: trying to get search working. Searching for www works beter now: * no more javscript errors in console * search context blocks are displayed Had to add role="main" as that is used by the javascript to id the body of the page to extract text snippets. Had to set script_files to load all the needed javascript in order. Had to set data-url_root on a id'ed tag for javacript to work. On doc/_templates/layout.html replaced div with main tag and set id and duplicate role="main" for use by js querySelector.
author John Rouillard <rouilj@ieee.org>
date Mon, 26 Feb 2024 12:12:45 -0500
parents 67438e439da8
children bd013590d8d6
comparison
equal deleted inserted replaced
7744:6985f0ff3df3 7745:291afa77ad82
1 {% set script_files = ['_static/jquery.js', '_static/doctools.js',
2 '_static/language_data.js',
3 '_static/searchtools.js',
4 '_static/sphinx_highlight.js'] %}
1 <!DOCTYPE html> 5 <!DOCTYPE html>
2 <html lang="en"> 6 <html lang="en">
3 <head> 7 <head>
4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> 8 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
5 <meta name="viewport" content="width=device-width, initial-scale=1"> 9 <meta name="viewport" content="width=device-width, initial-scale=1">
106 Next</a> 110 Next</a>
107 {%- endif %} 111 {%- endif %}
108 <a title="{{ _('Index') }}" href="{{ pathto('genindex') }}"> 112 <a title="{{ _('Index') }}" href="{{ pathto('genindex') }}">
109 Index</a> 113 Index</a>
110 </nav> 114 </nav>
111 <main id="main" tabindex="-1"> 115 <main id="main" role="main" tabindex="-1">
112 {% block body %} {% endblock %} 116 {% block body %} {% endblock %}
113 </main> 117 </main>
114 </div> 118 </div>
115 {%- block footer %} 119 {%- block footer %}
116 <footer class="footer"> 120 <footer class="footer">
147 </script> 151 </script>
148 <script data-goatcounter="https://stats.rouilj.dynamic-dns.net/count" 152 <script data-goatcounter="https://stats.rouilj.dynamic-dns.net/count"
149 integrity="sha384-QGgNMMRFTi8ul5kHJ+vXysPe8gySvSA/Y3rpXZiRLzKPIw8CWY+a3ObKmQsyDr+a" 153 integrity="sha384-QGgNMMRFTi8ul5kHJ+vXysPe8gySvSA/Y3rpXZiRLzKPIw8CWY+a3ObKmQsyDr+a"
150 async="" src="{{ pathto('_static/goatcounter_count.v3.js', 1) }}"> 154 async="" src="{{ pathto('_static/goatcounter_count.v3.js', 1) }}">
151 </script> 155 </script>
156 <script id="documentation_options" data-url_root="{{ url_root }}"
157 src="{{ pathto('_static/documentation_options.js', 1) }}">
158 </script>
152 {%- if pagename != 'search' %} 159 {%- if pagename != 'search' %}
153 {%- for scriptfile in script_files %} 160 {%- for scriptfile in script_files %}
154 <script type="text/javascript" src="{{ pathto(scriptfile, 1) }}"></script> 161 <script type="text/javascript" src="{{ pathto(scriptfile, 1) }}"></script>
155 {%- endfor %} 162 {%- endfor %}
156 <script type="text/javascript">$('#searchbox').show(0);</script> 163 <script type="text/javascript">$('#searchbox').show(0);</script>

Roundup Issue Tracker: http://roundup-tracker.org/