feat: Preload icons in /applications/

parent 057ef387
......@@ -14,21 +14,29 @@ $pageConfig = array_merge($pageConfig, [
'image' => '/applications/apps.png',
]);
require(KDE_ORG . '/aether/header.php');
require('includes/AppDataBuilder.php');
$site_root = "../";
echo '<main class="container">';
echo '<h1><a href="/'.$url_dir.'/">KDE\'s Applications</a></h1>';
$index = json_decode(file_get_contents("index.json"), true);
$categories = array_keys($index);
sort($categories);
// HTTP2 preload
$header = 'Link: ';
foreach($index as $category) {
foreach($category as $application) {
$header .= '</icons/' . $application['Id'] . '.svg>; rel=preload; as=image, ';
}
}
echo '<!--' . $header . ' -->';
require(KDE_ORG . '/aether/header.php');
require('includes/AppDataBuilder.php');
$site_root = "../";
?>
<main class="container">
<h1><a href="/applications/">KDE's Applications</a></h1>
<p>KDE is a community of friendly people who create over 200 apps which run on any Linux desktop, and often other platforms too. Here is the complete list.</p>
<div class="form-group">
......@@ -37,7 +45,6 @@ sort($categories);
</div>
<?php
$appDataBuilder = new AppDataBuilder();
foreach($categories as $category) { ?>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment