Add js code and temporary data for wiki
This commit is contained in:
parent
532e60cd5b
commit
0d4cf5902f
3 changed files with 72 additions and 0 deletions
|
@ -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
26
site/data/wiki.json
Normal 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
|
||||
}
|
||||
}
|
26
site/data/wiki.sample.json
Normal file
26
site/data/wiki.sample.json
Normal 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
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue