Adding support for distribution platform buttons.

This commit is contained in:
Ad5001 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 {
hr:last-of-type {
opacity: 0;
height: 0.1em;
hr {
color: var(--primary-color);
&: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 {
border-left: var(--border);
@ -87,10 +104,13 @@
border-top-left-radius: var(--border-radius) !important;
border-top-right-radius: var(--border-radius) !important;
border-bottom-left-radius: 0;
border-bottom-right-radius: 0;
& .app-download-platform {
border-top-left-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": {
"other": "{{ .Name }} is available on {{ .Platforms }}."
},
"warnExternalWebsite": {
"other": "(external link to {{ . }})"
},
"status": {
"other": "Status: "
},

View File

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

View File

@ -1,8 +1,9 @@
<!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 }}
<html lang="{{ .Site.Language.Lang }}">
<html lang="{{ $lang }}">
{{- partial "head.html" . -}}
<body>
{{- partial "header.html" . -}}
@ -113,7 +114,27 @@
{{ range $links }}
<div>
<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>
<hr>
{{ end }}