Commit 4ac59e63 authored by Carl Schwan's avatar Carl Schwan

Merge branch 'feature/getitfdroid' into 'master'

feat: Add Get It from FDroid

See merge request !15
parents 202d5c65 98289603
......@@ -312,7 +312,7 @@ $site_root = "../";
</a>
<small>This button only works with <a href="/applications/system/org.kde.discover">Discover</a> and other AppStream application stores. You can also use your distribution's package manager.</small>
</div>
<?php if ($app->getWindowsStoreLink() !== null) { ?>
<?php if ($app->getWindowsStoreLink()) { ?>
<div class="col-12 col-sm-4 d-flex flex-column mb-3">
<a href="<?= $app->getWindowsStoreLink() ?>" class="align-self-center d-flex" style="height: 100px">
<img src="/applications/assets/get-it-from-ms.png" alt="get it from the Microsoft Store" class="img-fluid align-self-center" width="150" />
......@@ -325,6 +325,18 @@ $site_root = "../";
</a>
</div>
<?php } ?>
<?php if ($app->getFDroidLink()) { ?>
<div class="col-12 col-sm-4 d-flex flex-column mb-3">
<a href="<?= $app->getFDroidLink() ?>" class="align-self-center d-flex" style="height: 100px">
<img src="https://fdroid.gitlab.io/artwork/badge/get-it-on.png" alt="Get it on F-Droid" height="80">
</a>
<h2 class="align-self-center">Microsoft Store</h2>
<a class="noblefir align-self-center" href="<?= $app->getFDroidLink() ?>"
<i class="fa fa-download"></i>
<span id="install-msg">Install from F-Droid</span>
</a>
</div>
<?php } ?>
</div>
</section>
</main>
......
......@@ -346,6 +346,14 @@ class AppData
return null;
}
function getFDroidLink(): ?string
{
if (isset($this->data['Custom']) && isset($this->data['Custom']['KDE::f_droid'])) {
return $this->data['Custom']['KDE::f_droid'];
}
return null;
}
// TODO: ebn is broken for now
function hasEbn() {
return false;
......
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