mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
docs: fix missing static file path
Also update layout of version table
This commit is contained in:
parent
e8cfba0745
commit
3e56ba05cc
20
docs/_static/js/version_table.js
vendored
20
docs/_static/js/version_table.js
vendored
@ -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);
|
||||
});
|
||||
|
4
docs/_static/version_table.html
vendored
4
docs/_static/version_table.html
vendored
@ -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>
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user