Account portal, download page, non-standard module docs

This ends v1 on the website. Docs archive still available through a
sidebar nav link in the docs.
This commit is contained in:
Matthew Holt 2020-07-16 15:51:46 -06:00
parent 49ed10d267
commit 4f6d355a97
No known key found for this signature in database
GPG key ID: 2A349DD577D586A5
37 changed files with 1678 additions and 56 deletions

View file

@ -9,21 +9,24 @@ if (moduleID) {
$(function() {
$('#module-docs-container').show();
$('h1').text("Module "+moduleID);
beginRendering(json);
beginRendering(json.result);
});
});
} else {
// populate the module list
$.get("/api/modules", function(moduleList) {
$.get("/api/modules", function(json) {
var moduleList = json.result;
// wait until the DOM has finished loading before rendering the results
$(function() {
$('#module-list-container').show();
$table = $('#module-list');
for (modID in moduleList) {
var doc = moduleList[modID];
var val = moduleList[modID];
var standard = isStandard(val.type_name);
var $tr = $('<tr/>');
$tr.append('<td><a href="./'+modID+'" class="module-link">'+modID+'</a></td>');
$tr.append('<td>'+markdown(truncate(doc, 200))+'</td>');
$tr.append('<td><a href="./'+modID+'" class="module-link">'+modID+'</a>'+(standard ? '' : ' '+nonStandardFlag)+'</td>');
$tr.append('<td>'+markdown(truncate(val.doc, 200))+'</td>');
$table.append($tr);
}
});