Moving badges to theme, fixing bug with links not being clickable, adding disclaimer to apps for distribution icons.

This commit is contained in:
Adsooi 2021-08-03 14:59:16 +02:00
parent 1171b352c5
commit 29770627da
No known key found for this signature in database
GPG key ID: 9C87C7D3A69E6BBE
40 changed files with 3375 additions and 43 deletions

View file

@ -3,6 +3,9 @@
{{ $appindex := .Params.SectionHeader.AppIndex }}
{{ $data := index .Site.Data $lang }}
{{ $appdata := index $data.apps $appindex }}
{{ $disclaimers := newScratch }}
{{ $disclaimers.Set "snapcraft" false }}
{{ $disclaimers.Set "firefox" false }}
<html lang="{{ $lang }}">
{{- partial "head.html" . -}}
@ -116,24 +119,26 @@
<div>
<h3>{{ .Title }}</h3>
{{ if hasPrefix .Title "Flatpak" }}
<a href="https://flathub.org/apps/details/{{ .Index }}" class="padding-container-1">
<img src="/img/badges/{{ $lang }}/flathub.svg" alt="{{ i18n "storeFlathub" }}"></img>
</a>
<br><br>{{ i18n "warnExternalWebsite" "flathub.org" }}
<a href="https://flathub.org/apps/details/{{ .Index }}">
{{ partial "badge.html" (dict "Icon" "flathub" "Lang" $lang "Alt" "storeFlathub" ) }}
</a>
<br><br>{{ i18n "warnExternalWebsite" "flathub.org" }}
{{ else if hasPrefix .Title "Snap" }}
<a href="https://snapcraft.io/{{ .Index }}" class="padding-container-1">
<img src="/img/badges/{{ $lang }}/snapcraft.svg" alt="{{ i18n "storeSnapcraft" }}"></img>
</a>
<br><br>{{ i18n "warnExternalWebsite" "snapcraft.io" }}
{{ $disclaimers.Set "snapcraft" true }}
<a href="https://snapcraft.io/{{ .Index }}">
{{ partial "badge.html" (dict "Icon" "snapcraft" "Lang" $lang "Alt" "storeSnapcraft" ) }}
</a>
<br><br>{{ i18n "warnExternalWebsite" "snapcraft.io" }}
{{ else if hasPrefix .Title "Firefox" }}
<a href="https://addons.mozilla.org/en-US/firefox/addon/{{ .Index }}/" class="padding-container-1">
<img src="/img/badges/{{ $lang }}/amo.svg" alt="{{ i18n "storeFirefoxAddons" }}"></img>
</a>
<br><br>{{ i18n "warnExternalWebsite" "addons.mozilla.org" }}
{{ $disclaimers.Set "firefox" true }}
<a href="https://addons.mozilla.org/en-US/firefox/addon/{{ .Index }}/">
{{ partial "badge.html" (dict "Icon" "amo" "Lang" $lang "Alt" "storeFirefoxAddons" ) }}
</a>
<br><br>{{ i18n "warnExternalWebsite" "addons.mozilla.org" }}
{{ else }}
{{ i18n "file" }} {{ replace .Name "<version>" $appdata.version }}<br>
<div class="primary center fit-content" role="button">
<a href="https://artifacts.accountfree.org/repository/apps.ad5001.eu-apps/{{ $appindex }}/v{{ $appdata.version }}/{{ replace .File "<version>" $appdata.version }}" role="button">
<a href="https://artifacts.accountfree.org/repository/apps.ad5001.eu-apps/{{ $appindex }}/v{{ $appdata.version }}/{{ replace .File "<version>" $appdata.version }}">
<i class="icon-download icon-as-text" alt=""></i>{{ i18n "download" }}
</a>
</div>
@ -146,6 +151,13 @@
{{ end }}
</div>
<p>{{ .Params.Download.Footnote | markdownify }} </p>
<!-- Disclaimers -->
{{ if ($disclaimers.Get "snapcraft") }}
<p>{{ i18n "disclaimerSnapcraft" | markdownify }}</p>
{{ end }}
{{ if ($disclaimers.Get "firefox") }}
<p>{{ i18n "disclaimerFirefox" | markdownify }}</p>
{{ end }}
</section>
{{ end }}
</div>