Skip to content

Latest commit

 

History

History
99 lines (89 loc) · 4.05 KB

apps_fr.md

File metadata and controls

99 lines (89 loc) · 4.05 KB

#Apps officielles

Apps officielles Apps en cours Apps souhaitées

Tout déplier
<script type="text/template" id="app-template">

Description : {app_description}

Dernière mise à jour (UTC) : {app_update}

Niveau: {app_level}

Mainteneur : {app_maintainer} ({app_mail})

Dépôt git : {app_git} ({app_branch})

Documentation
</script>
Toutes les applications officielles sont sous licences libres.
<script> function timeConverter(UNIX_timestamp) { var a = new Date(UNIX_timestamp*1000); var months = ['janvier','février','mars','avril','mai','juin','juillet','août','septembre','octobre','novembre','décembre']; var year = a.getFullYear(); var month = months[a.getMonth()]; var date = a.getDate(); var hour = a.getHours(); var min = a.getMinutes(); if (hour < 10) { hour = '0' + hour; } if (min < 10) { min = '0' + min; } var time = date+' '+month+' '+year+' à '+hour+':'+min; return time; } $(document).ready(function () { $.getJSON('https://app.yunohost.org/official.json', function(app_list) { // Cast as array var app_list = $.map(app_list, function(el) { return el; }); // Sort alpha app_list.sort(function(a, b){ if (a.manifest.id > b.manifest.id) {return 1;} else if (a.manifest.id < b.manifest.id) {return -1;} return 0; }); $.each(app_list, function(k, infos) { app_id = infos.manifest.id; if (typeof infos.manifest.description.fr === 'undefined') { infos.manifest.description.fr = infos.manifest.description.en; } html = $('#app-template').html() .replace(/{app_id}/g, app_id) .replace(/{app_name}/g, infos.manifest.name) .replace('{app_description}', infos.manifest.description.fr) .replace(/{app_git}/g, infos.git.url) .replace('{app_branch}', infos.git.branch) .replace('{app_level}', infos.level) .replace('{app_update}', timeConverter(infos.lastUpdate)); if (infos.manifest.developer) { html = html .replace('{app_maintainer}', infos.manifest.developer.name) .replace('{app_mail}', infos.manifest.developer.email); } if (infos.manifest.maintainer) { html = html .replace('{app_maintainer}', infos.manifest.maintainer.name) .replace('{app_mail}', infos.manifest.maintainer.email); } $('#app-accordion').append(html); $('.app_'+ app_id).attr('id', 'app_'+ app_id); }); }); }); </script>