diff --git a/pages/02.apps/01.catalog/.apps.md.swp b/pages/02.apps/01.catalog/.apps.md.swp deleted file mode 100644 index ef867c97..00000000 Binary files a/pages/02.apps/01.catalog/.apps.md.swp and /dev/null differ diff --git a/pages/02.apps/01.catalog/apps.md b/pages/02.apps/01.catalog/apps.md index 8babb0ba..0d8d9630 100644 --- a/pages/02.apps/01.catalog/apps.md +++ b/pages/02.apps/01.catalog/apps.md @@ -5,6 +5,9 @@ taxonomy: category: docs routes: default: '/apps' +twig_first: true +process: + twig: true --- @@ -162,26 +165,37 @@ Custom CSS for this page -{% set catalog = read_file('/var/www/app_yunohost/apps/apps.json')|json_decode(true) %} +{% set catalog = read_file('/var/www/app_yunohost/apps/builds/default/v2/apps.json')|json_decode(true) %} + + +{% for app_id, infos in catalog.apps %} + + {% set manifest = infos.manifest %} + {% if grav.language.getActive in manifest.description %} + {% set descr_lang = grav.language.getActive %} + {% else %} + {% set descr_lang = 'en' %} + {% endif %} + {% set description = manifest.description[descr_lang] %} -{% for app, infos in catalog %} {{ app }} -{{ infos }} +{{ infos.url }} + +[div class="app-card_{{app_id}} app-card panel panel-default"] +[div class="app-title"]{{ manifest.name }}[/div] +[div class="app-descr"]{{ description }}[/div] +[div class="app-footer"] +[div class="app-buttons btn-group" role="group"] +[test]() +[fa=globe /] Code +[fa=book /] Doc +[fa=plus /] Install +[/div] +[/div] +[/div] {% endfor %} - - - - - - - - - - - - @@ -279,7 +293,7 @@ $(document).ready(function () { // Fetch application catalog - $.getJSON('https://app.yunohost.org/default/v2/apps.json', {}, function(data) { + //$.getJSON('https://app.yunohost.org/default/v2/apps.json', {}, function(data) { catalog = $.map(data["apps"], function(el) { return el; }); @@ -397,8 +411,8 @@ $(document).ready(function () { } }); - filter(); - }); + // filter(); + //}); //================================================= });