...
 
Commits (2)
......@@ -92,11 +92,15 @@ function printSidebar($app, $category, $development)
$content .= '<div class="infobox"><strong>Get help</strong>';
if ($app->hasUserbase()) {
$content .= '<br /><a href="'.$app->userbase().'">'.$app->name().' on UserBase</a>';
$content .= '<br /><span itemprop="softwareHelp" itemscope itemtype="http://schema.org/CreativeWork">
<a itemprop="url" href="'.$app->userbase().'">'.$app->name().' on UserBase</a>
</span>';
}
$content .= '<br /><a href="'.$app->forumUrl().'">KDE Community Forums</a>';
if ($app->hasHandbook()) {
$content .= '<br /><a href="'.$app->handbook().'">'.$app->name().' Handbook</a>';
$content .= '<br /><span itemprop="softwareHelp" itemscope itemtype="https://schema.org/CreativeWork">
<a itemprop="url" href="'.$app->handbook().'">'.$app->name().' Handbook</a>
</span>';
}
$content .= '</div>';
......@@ -217,7 +221,9 @@ function printPage($app, $category)
print "<p><b>This app is unmaintained and no longer released by the KDE community.</b></p>";
}
print '<div itemprop="description">';
print $app->descriptionHtml();
print '</div>';
if ($app->hasVersions() || $app->hasAuthors() || $app->hasLicense()) {
if ($app->hasAuthors()) {
print '<h2>Developed By</h2>';
......@@ -231,8 +237,6 @@ function printPage($app, $category)
print $app->licenseHtml();
}
}
print '<div style="clear:left;"></div>';
}
function printDevelopmentPage($app, $category)
......@@ -293,32 +297,42 @@ $pageConfig = array_merge($pageConfig, [
require(KDE_ORG . '/aether/header.php');
$site_root = "../";
?>
echo '<script src="/js/use-ekko-lightbox.js" defer="true"></script>';
echo '<main class="container">';
<script src="/js/use-ekko-lightbox.js" defer="true"></script>
<main class="container" itemscope itemtype="http://schema.org/SoftwareApplication">
<meta itemprop="operatingSystem" content="GNU/Linux" />
<meta itemprop="name" content="<?php echo $app->name(); ?>" />
<meta itemprop="isFamilyFriendly" content="true" />
<meta itemprop="applicationCategory" content="<?php echo $app->category(); ?>" />
echo '<h1><a href="/'.$url_dir.'/">KDE\'s Applications</a> <a href="/'.$url_dir.'/'.$category.'/">'.$category_string.'</a> ';
if ($development) {
echo '<a href="..">'.$app->name().'</a> Development Information';
} else {
echo $app->name();
}
echo '</h1>';
echo '<div class="row">';
echo '<div class="col-12 col-md-3 order-first order-md-last mb-4">';
echo '<div id="sidebar">';
echo printSidebar($app, $category, $development);
echo '</div>';
echo '</div>';
echo '<div class="col-12 col-md-9 order-last order-md-first">';
if (!$development) {
printPage($app, $category);
} else {
printDevelopmentPage($app, $category);
}
echo '<br clear="all"/>';
echo '</main>';
<h1>
<a href="/<?php echo $url_dir; ?>/">KDE's Applications</a>
<a href="/<?php echo $url_dir.'/'.$category; ?>/"><?php echo $category_string; ?></a>
<?php
if ($development) {
echo '<a href="..">'.$app->name().'</a> Development Information';
} else {
echo $app->name();
}
?>
</h1>
<div class="row">
<div class="col-12 col-md-3 order-first order-md-last mb-4">
<div id="sidebar">
<?php echo printSidebar($app, $category, $development); ?>
</div>
</div>
<div class="col-12 col-md-9 order-last order-md-first">
<?php
if (!$development) {
printPage($app, $category);
} else {
printDevelopmentPage($app, $category);
}
?>
</div>
</div>
</main>
<?php
require(KDE_ORG . '/aether/footer.php');
......@@ -162,13 +162,13 @@ class AppData2
$html = '<p><strong>'.i18n_var( "Authors:" ).'</strong></p>';
$html .= '<ul>';
foreach($this->data['authors'] as $author) {
$html.= '<li><span>'.$author[0].'</span>';
$html.= '<li itemprop="author" itemscope itemtype="http://schema.org/Person"><span>'.$author[0].'</span>';
if (strlen($author[2])) {
$html .= ' <a href="mailto:'.htmlspecialchars($author[2]).'">&lt;'.htmlspecialchars($author[2]).'&gt;</a>';
$html .= ' <a itemprop="email" href="mailto:'.htmlspecialchars($author[2]).'">&lt;'.htmlspecialchars($author[2]).'&gt;</a>';
}
$html.='<br />'.i18n_var($author[1]);
$html.='<br /><span itemprop="name">'.i18n_var($author[1]).'</span>';
if (strlen($author[3])) {
$html .= '<br /><a href="'.htmlspecialchars($author[3]).'">'.htmlspecialchars($author[3]).'</a>';
$html .= '<br /><a itemprop="url" href="'.htmlspecialchars($author[3]).'">'.htmlspecialchars($author[3]).'</a>';
}
$html .= '</li>';
}
......@@ -206,16 +206,16 @@ class AppData2
// $this->name(), $stripped_license, $license);
switch($license) {
case 'GPL-2.0+': case 'GPL-2.0': case 'GPL-2.0-or-later': case 'GPL-2.0-only':
$text .= i18n_var('%1 is distributed under the terms of the <a href="http://www.gnu.org/licenses/old-licenses/gpl-2.0.html">GNU General Public License (GPL), Version 2</a>.', $this->name());
$text .= i18n_var('%1 is distributed under the terms of the <a itemprop"license" href="http://www.gnu.org/licenses/old-licenses/gpl-2.0.html">GNU General Public License (GPL), Version 2</a>.', $this->name());
break;
case 'GPL-3.0+': case 'GPL-3.0': case 'GPL-3.0-or-later': case 'GPL-3.0-only':
$text .= i18n_var('%1 is distributed under the terms of the <a href="http://www.gnu.org/licenses/gpl.html">GNU General Public License (GPL), Version 3</a>.', $this->name());
$text .= i18n_var('%1 is distributed under the terms of the <a itemprop="license" href="http://www.gnu.org/licenses/gpl.html">GNU General Public License (GPL), Version 3</a>.', $this->name());
break;
case 'LGPL-2.0-only': case 'LGPL-2.0-or-later': case 'LGPL-2.1-only': case 'LGPL-2.1-or-later': case 'LGPL':
$text .= i18n_var('%1 is distributed under the terms of the <a href="http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html"> GNU Lesser General Public License, version 2</a>.', $this->name());
$text .= i18n_var('%1 is distributed under the terms of the <a itemprop="license" href="http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html"> GNU Lesser General Public License, version 2</a>.', $this->name());
break;
case 'LGPL-3.0-only': case 'LGPL-3.0-or-later': case 'LGPL-3.0':
$text .= i18n_var('%1 is distributed under the terms of the <a href="https://www.gnu.org/licenses/lgpl.html"> GNU Library General Public License, version 3</a>.', $this->name());
$text .= i18n_var('%1 is distributed under the terms of the <a itemprop="license" href="https://www.gnu.org/licenses/lgpl.html"> GNU Library General Public License, version 3</a>.', $this->name());
break;
default:
$text .= $license.'.';
......