Browse Source

Adding support for distribution platform buttons.

master
Ad5001 3 months ago
parent
commit
b64d1bdb6a
No known key found for this signature in database GPG Key ID: 9C87C7D3A69E6BBE
  1. 3
      .gitignore
  2. 28
      assets/scss/apps.scss
  3. 3
      i18n/en.json
  4. 3
      i18n/fr.json
  5. 27
      layouts/_default/app.html

3
.gitignore

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

28
assets/scss/apps.scss

@ -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;
}
}

3
i18n/en.json

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

3
i18n/fr.json

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

27
layouts/_default/app.html

@ -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 }}

Loading…
Cancel
Save