docs: fix missing static file path

Also update layout of version table
pull/8201/head
Marius Vikhammer 2021-09-03 10:29:19 +08:00
rodzic e8cfba0745
commit 3e56ba05cc
3 zmienionych plików z 20 dodań i 6 usunięć

Wyświetl plik

@ -23,7 +23,7 @@ $(document).ready(function() {
(Where 'idf_target' path element are optional depending on if the project has multiple target support)
*/
let project_base_url = DOCUMENTATION_OPTIONS.URL_ROOT + "../..";
let project_base_url = DOCUMENTATION_OPTIONS.URL_ROOT + "../../..";
if (DOCUMENTATION_OPTIONS.IDF_TARGETS) {
project_base_url += "/..";
}
@ -38,17 +38,29 @@ $(document).ready(function() {
return result + "/";
};
old_ver_list = "";
old_ver_table = "";
old_ver_table_row = "<tr>"
let row_items = 0;
const ITEMS_PER_ROW = 4;
for (let i = 0; i < versions.length; i++) {
let v = versions[i];
let url = getVersionUrl(v);
if (v.old) {
old_ver_list += "<li><a href=\"" + url + "\">" + v.name + "</li>";
old_ver_table_row += "<td><a href=\"" + url + "\">" + v.name + "</td>";
row_items++;
if (row_items === ITEMS_PER_ROW) {
old_ver_table_row += "</tr>"
old_ver_table += old_ver_table_row
/* Prepare a new row */
old_ver_table_row = "<tr>"
row_items = 0
}
}
}
$( "#version_list" ).append(old_ver_list);
$( "#version_table" ).append(old_ver_table);
});

Wyświetl plik

@ -1,7 +1,7 @@
<version_table>
<script src="_static/js/version_table.js"></script>
<ul id="version_list">
<table id="version_table" style="width: 100%">
</ul>
</table>
</version_table>

Wyświetl plik

@ -187,6 +187,8 @@ with open('../page_redirects.txt') as f:
raise RuntimeError('Invalid line in page_redirects.txt: %s' % line)
html_redirect_pages = [tuple(line.split(' ')) for line in lines]
html_static_path = ['../_static']
# Callback function for user setup that needs be done after `config-init`-event
# config.idf_target is not available at the initial config stage