Adding support for distribution platform buttons.

This commit is contained in:
Adsooi 2021-08-02 02:40:30 +02:00
parent ccfb34d4e1
commit b64d1bdb6a
No known key found for this signature in database
GPG key ID: 9C87C7D3A69E6BBE
5 changed files with 57 additions and 7 deletions

3
.gitignore vendored Normal file
View file

@ -0,0 +1,3 @@
*.kdev4
kdev4
resources

View file

@ -71,15 +71,32 @@
} }
.app-os-sources { .app-os-sources {
hr:last-of-type { hr {
opacity: 0; color: var(--primary-color);
height: 0.1em;
&:last-of-type {
opacity: 0;
height: 0.1em;
}
}
a img {
width: Min(300px, calc(100% - 2em));
box-shadow: 0px 0px 2px 0px #000000;
transition: box-shadow 0.15s ease-in-out, filter 0.15s ease-in-out;
border-radius: 1em;
filter: brightness(100%);
&:hover {
box-shadow: 0px 0px 8px 0px #000000;
filter: brightness(85%);
}
} }
} }
} }
@media screen and (max-width: 700px) { @media screen and (max-width: 850px) {
.app-download { .app-download {
border-left: var(--border); border-left: var(--border);
@ -87,10 +104,13 @@
border-top-left-radius: var(--border-radius) !important; border-top-left-radius: var(--border-radius) !important;
border-top-right-radius: var(--border-radius) !important; border-top-right-radius: var(--border-radius) !important;
border-bottom-left-radius: 0; border-bottom-left-radius: 0;
border-bottom-right-radius: 0;
& .app-download-platform { & .app-download-platform {
border-top-left-radius: var(--border-radius) !important; border-top-left-radius: var(--border-radius) !important;
border-top-right-radius: var(--border-radius) !important; border-top-right-radius: var(--border-radius) !important;
border-bottom-left-radius: 0;
border-bottom-right-radius: 0;
} }
} }

View file

@ -14,6 +14,9 @@
"downloadApp": { "downloadApp": {
"other": "{{ .Name }} is available on {{ .Platforms }}." "other": "{{ .Name }} is available on {{ .Platforms }}."
}, },
"warnExternalWebsite": {
"other": "(external link to {{ . }})"
},
"status": { "status": {
"other": "Status: " "other": "Status: "
}, },

View file

@ -14,6 +14,9 @@
"downloadApp": { "downloadApp": {
"other": "{{ .Name }} est disponible sur {{ .Platforms }}." "other": "{{ .Name }} est disponible sur {{ .Platforms }}."
}, },
"warnExternalWebsite": {
"other": "(lien externe vers {{ . }})"
},
"status": { "status": {
"other": "Status : " "other": "Status : "
}, },

View file

@ -1,8 +1,9 @@
<!DOCTYPE html> <!DOCTYPE html>
{{ $data := index .Site.Data .Site.Language.Lang }} {{ $lang := .Site.Language.Lang }}
{{ $data := index .Site.Data $lang }}
{{ $appdata := index $data.apps .Params.SectionHeader.AppIndex }} {{ $appdata := index $data.apps .Params.SectionHeader.AppIndex }}
<html lang="{{ .Site.Language.Lang }}"> <html lang="{{ $lang }}">
{{- partial "head.html" . -}} {{- partial "head.html" . -}}
<body> <body>
{{- partial "header.html" . -}} {{- partial "header.html" . -}}
@ -113,7 +114,27 @@
{{ range $links }} {{ range $links }}
<div> <div>
<h3>{{ .Title }}</h3> <h3>{{ .Title }}</h3>
<a href="{{ replace .URL "<version>" $appdata.version }}">{{ i18n "download" }} {{ replace .Name "<version>" $appdata.version }}</a> {{ if hasPrefix .Title "Flatpak" }}
<a href="{{ .URL }}" class="padding-container-1">
<img src="/img/platforms/{{ $lang }}/flathub.svg"></img>
</a>
<br><br>{{ i18n "warnExternalWebsite" "flathub.org" }}
{{ else if hasPrefix .Title "Snap" }}
<a href="{{ .URL }}" class="padding-container-1">
<img src="/img/platforms/{{ $lang }}/snapcraft.svg"></img>
</a>
<br><br>{{ i18n "warnExternalWebsite" "snapcraft.io" }}
{{ else if hasPrefix .Title "Firefox" }}
<a href="{{ .URL }}" class="padding-container-1">
<img src="/img/platforms/{{ $lang }}/amo.svg"></img>
</a>
<br><br>{{ i18n "warnExternalWebsite" "addons.mozilla.org" }}
{{ else }}
File: {{ replace .Name "<version>" $appdata.version }}<br>
<a href="{{ replace .URL "<version>" $appdata.version }}" class="primary" role="button">
<i class="icon-download icon-as-text" alt=""></i>{{ i18n "download" }}
</a>
{{ end }}
</div> </div>
<hr> <hr>
{{ end }} {{ end }}