diff --git a/index.html b/index.html index fc96588..973d28b 100644 --- a/index.html +++ b/index.html @@ -58,39 +58,50 @@ // if it is ask jerry console.log(url); if (url.includes("askjerry")) { - document.getElementById("chooseHeader").innerHTML = 'Responsive image'; + document.getElementById("chooseHeader").innerHTML = 'Responsive image'; } else { document.getElementById("chooseHeader").innerHTML = 'Responsive image'; } // TODO: add GH-issues, add mailing lists var projects = [ [ - "Chipyard", + "Chipyard Docs", "chipyard.readthedocs.io", ["latest", "stable", "1.10.0", "1.9.1", "1.9.0", "1.8.1", "1.8.0", "1.7.1", "1.7.0", "1.6.2", "1.6.1", "1.6.0", "1.5.0", "1.4.0", "1.3.0", "1.2.0", "1.1.0", "1.0.0", "main"] ], [ - "FireSim", + "FireSim Docs", "docs.fires.im", - ["latest", "stable", "1.17.1", "1.17.0", "1.16.0", "1.15.2", "1.15.1", "1.15.0", "1.14.2", "1.14.1", "1.14.0", "1.13.6", "1.13.5", "1.13.4", "1.13.3", "1.13.2", "1.13.1", "1.13.0", "1.12.0", "1.11.0", "1.10.1", "1.10.0", "1.9.0", "1.8.0", "1.7.0", "1.6.0", "1.5.0", "1.4.0", "1.3.2", "1.3.1", "1.3.0", "1.2", "1.1", "williamlyh", "main"] + ["latest", "stable", "1.17.1", "1.17.0", "1.16.0", "1.15.2", "1.15.1", "1.15.0", "1.14.2", "1.14.1", "1.14.0", "1.13.6", "1.13.5", "1.13.4", "1.13.3", "1.13.2", "1.13.1", "1.13.0", "1.12.0", "1.11.0", "1.10.1", "1.10.0", "1.9.0", "1.8.0", "1.7.0", "1.6.0", "1.5.0", "1.4.0", "1.3.2", "1.3.1", "1.3.0", "1.2", "1.1", "main"] ], [ - "FireMarshal", + "FireMarshal Docs", "firemarshal.readthedocs.io", ["latest", "stable", "v1.12.1", "v1.12.0", "v1.11.0", "v1.10.0"] ], [ - "BOOM", + "BOOM Docs", "docs.boom-core.org", ["latest", "stable"] ], [ - "Hammer", + "Hammer Docs", "hammer-vlsi.readthedocs.io", ["latest", "stable", "1.2.0", "1.1.2", "1.1.1", "1.1.0", "1.0.4", "1.0.1", "1.0.0", "0.1.0"] ] ]; +var misc_sites = [ + [ "Chipyard Issues", "https://github.com/ucb-bar/chipyard/issues" ], + [ "FireSim Issues", "https://github.com/firesim/firesim/issues" ], + [ "FireMarshal Issues", "https://github.com/firesim/FireMarshal/issues" ], + [ "BOOM Issues", "https://github.com/riscv-boom/riscv-boom/issues" ], + [ "Hammer Issues", "https://github.com/ucb-bar/hammer/issues" ], + [ "Chipyard Mailing List", "https://groups.google.com/forum/#!forum/chipyard" ], + [ "FireSim Mailing List", "https://groups.google.com/forum/#!forum/firesim" ], + [ "BOOM Mailing List", "https://groups.google.com/forum/#!forum/riscv-boom" ] +] + for (var i = 0; i < projects.length; i++) { var drop_name = projects[i][0]; var dropdownContents = '
'; // Bootstrap input group @@ -103,7 +114,7 @@ // Bootstrap styled select dropdown dropdownContents += ' ' + drop_name + ''; + dropdownContents += '
'; + + dropdownContents += ''; // Close input group + + document.getElementById("dropdowns").innerHTML += dropdownContents; +} + +function formSite(s) { + return "site:" + s; +} function doQuery() { var querystring = document.getElementById("searchbox").value + " ("; + var sites_to_search = []; + for (var i = 0; i < projects.length; i++) { enabled = document.getElementById(projects[i][0] + "checkbox").checked; if (!enabled) { @@ -126,9 +157,21 @@ } version_num = document.getElementById(projects[i][0] + "dropdown").value; url_part = projects[i][1]; - querystring += "site:" + url_part + "/en/" + version_num; + sites_to_search.push(formSite(url_part + "/en/" + version_num)); + } + + for (var i = 0; i < misc_sites.length; i++) { + enabled = document.getElementById(misc_sites[i][0] + "checkbox").checked; + if (!enabled) { + continue; + } + sites_to_search.push(formSite(misc_sites[i][1])); + } + + for (var i = 0; i < sites_to_search.length; i++) { + querystring += sites_to_search[i]; - if (i != projects.length-1) { + if (i != sites_to_search.length-1) { querystring += " OR "; } }