Instead of putting URLs for app download locations, we now have templates!

This commit is contained in:
Ad5001 2021-08-02 22:14:51 +02:00
parent de13fe549a
commit 358ad33cb8
No known key found for this signature in database
GPG Key ID: 9C87C7D3A69E6BBE
3 changed files with 21 additions and 9 deletions

View File

@ -1,7 +1,8 @@
<!DOCTYPE html>
{{ $lang := .Site.Language.Lang }}
{{ $appindex := .Params.SectionHeader.AppIndex }}
{{ $data := index .Site.Data $lang }}
{{ $appdata := index $data.apps .Params.SectionHeader.AppIndex }}
{{ $appdata := index $data.apps $appindex }}
<html lang="{{ $lang }}">
{{- partial "head.html" . -}}
@ -115,23 +116,23 @@
<div>
<h3>{{ .Title }}</h3>
{{ if hasPrefix .Title "Flatpak" }}
<a href="{{ .URL }}" class="padding-container-1">
<a href="https://flathub.org/apps/details/{{ .Index }}" class="padding-container-1">
<img src="/img/badges/{{ $lang }}/flathub.svg"></img>
</a>
<br><br>{{ i18n "warnExternalWebsite" "flathub.org" }}
{{ else if hasPrefix .Title "Snap" }}
<a href="{{ .URL }}" class="padding-container-1">
<a href="https://snapcraft.io/{{ .Index }}" class="padding-container-1">
<img src="/img/badges/{{ $lang }}/snapcraft.svg"></img>
</a>
<br><br>{{ i18n "warnExternalWebsite" "snapcraft.io" }}
{{ else if hasPrefix .Title "Firefox" }}
<a href="{{ .URL }}" class="padding-container-1">
<a href="https://addons.mozilla.org/en-US/firefox/addon/{{ .Index }}/" class="padding-container-1">
<img src="/img/badges/{{ $lang }}/amo.svg"></img>
</a>
<br><br>{{ i18n "warnExternalWebsite" "addons.mozilla.org" }}
{{ else }}
{{ i18n "file" }} {{ replace .Name "<version>" $appdata.version }}<br>
<a href="{{ replace .URL "<version>" $appdata.version }}" class="primary" role="button">
<a href="https://artifacts.accountfree.org/repository/apps.ad5001.eu-apps/{{ $appindex }}/v{{ $appdata.version }}/{{ replace .File "<version>" $appdata.version }}" class="primary" role="button">
<i class="icon-download icon-as-text" alt=""></i>{{ i18n "download" }}
</a>
{{ end }}

View File

@ -1 +1,12 @@
<!DOCTYPE html>
<html lang="{{ .Site.Language.Lang }}">
{{- partial "head.html" . -}}
<body>
{{- partial "header.html" . -}}
<div id="content">
{{ .Content }}
</div>
{{- partial "footer.html" . -}}
</body>
</html>

View File

@ -3,14 +3,14 @@
name = "Omegamma"
license = "GNU GPL 3.0"
licenselink = "https://github.com/Ad5001/Omegamma/blob/master/LICENSE"
licenselink = "https://git.ad5001.eu/Ad5001/omegamma/blob/master/LICENSE"
description = ""
homepage = "https://apps.ad5001.eu/omegamma/"
homepage = "https://git.ad5001.eu/Ad5001/omegamma/"
tags = []
features = []
min_version = "0.41.0"
[author]
name = ""
homepage = ""
name = "Ad5001"
homepage = "https://ad5001.eu"