Add js code and temporary data for wiki

This commit is contained in:
Mickael 2019-08-19 18:14:35 +02:00
parent 532e60cd5b
commit 0d4cf5902f
3 changed files with 72 additions and 0 deletions

View file

@ -38,4 +38,24 @@ $(document).ready(function() {
});
});
// tiki
$.getJSON("data/wiki.json", function(data) {
$(".wiki .total .crapauds").text(data.crapauds.total);
$(".wiki .total .pages").text(data.pages.total);
$(".wiki .total .photos").text(data.photos.total);
$(".wiki .recent .crapauds").text(data.crapauds.recent);
$(".wiki .recent .pages").text(data.pages.recent);
$(".wiki .recent .photos").text(data.photos.recent);
$(".wiki ul").text("");
$.each(data.pages.liste, function(index, idee) {
var link = $("<a>")
.attr("href", "https://wiki.crapaud-fou.org/" + index)
.attr("class", "list-item")
.attr("title", idee)
.text(idee);
var li = $("<li>").append(link);
$(".wiki ul").append(li);
});
});
});

26
site/data/wiki.json Normal file
View file

@ -0,0 +1,26 @@
{
"crapauds": {
"total": 163,
"recent": 0
},
"pages": {
"total": 133,
"recent": 0,
"liste": [
"Biblio Semourais",
"NO-GAFAM",
"Terre de convergence",
"Rencontres",
"Kit semourais pour monter une pépinière participative",
"Assises Debout la Maurienne",
"Cohortes",
"Cohorte Lyon St Etienne",
"Semourais",
"Les atouts de la méthode Miyawaki"
]
},
"photos": {
"total": 880,
"recent": 0
}
}

View file

@ -0,0 +1,26 @@
{
"crapauds": {
"total": 163,
"recent": 0
},
"pages": {
"total": 133,
"recent": 0,
"liste": [
"Biblio Semourais",
"NO-GAFAM",
"Terre de convergence",
"Rencontres",
"Kit semourais pour monter une pépinière participative",
"Assises Debout la Maurienne",
"Cohortes",
"Cohorte Lyon St Etienne",
"Semourais",
"Les atouts de la méthode Miyawaki"
]
},
"photos": {
"total": 880,
"recent": 0
}
}