Now using two separate files for translated app data information, and normal metadata.
This commit is contained in:
parent
a02e94cfbd
commit
8d996d8734
2 changed files with 25 additions and 24 deletions
|
@ -1,8 +1,9 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
{{ $lang := .Site.Language.Lang }}
|
{{ $lang := .Site.Language.Lang }}
|
||||||
{{ $appindex := .Params.SectionHeader.AppIndex }}
|
{{ $appindex := .Params.SectionHeader.AppIndex }}
|
||||||
{{ $data := index .Site.Data $lang }}
|
{{ $i18nData := index .Site.Data $lang }}
|
||||||
{{ $appdata := index $data.apps $appindex }}
|
{{ $i18nAppData := index $i18nData.apps $appindex }}
|
||||||
|
{{ $AppData := index .Site.Data.metadata $appindex }}
|
||||||
{{ $disclaimers := newScratch }}
|
{{ $disclaimers := newScratch }}
|
||||||
{{ $disclaimers.Set "snapcraft" false }}
|
{{ $disclaimers.Set "snapcraft" false }}
|
||||||
{{ $disclaimers.Set "firefox" false }}
|
{{ $disclaimers.Set "firefox" false }}
|
||||||
|
@ -55,35 +56,35 @@
|
||||||
<div class="grid">
|
<div class="grid">
|
||||||
<p class="inline column col2">
|
<p class="inline column col2">
|
||||||
<i class="icon-universal icon-as-text" alt=""></i>
|
<i class="icon-universal icon-as-text" alt=""></i>
|
||||||
{{ i18n "supportedPlatforms" }} {{ partial "platforms.html" $appdata.platforms }}
|
{{ i18n "supportedPlatforms" }} {{ partial "platforms.html" $AppData.platforms }}
|
||||||
</p>
|
</p>
|
||||||
<p class="inline column col2">
|
<p class="inline column col2">
|
||||||
<i class="icon-lang icon-as-text" alt=""></i>
|
<i class="icon-lang icon-as-text" alt=""></i>
|
||||||
{{ i18n "translated" }} {{ partial "translations.html" $appdata.translated }}
|
{{ i18n "translated" }} {{ partial "translations.html" $AppData.translated }}
|
||||||
</p>
|
</p>
|
||||||
<p class="inline column col2">
|
<p class="inline column col2">
|
||||||
<i class="icon-git icon-as-text" alt=""></i>
|
<i class="icon-git icon-as-text" alt=""></i>
|
||||||
{{ i18n "latestVersion" }}v{{ $appdata.version }}
|
{{ i18n "latestVersion" }}v{{ $AppData.version }}
|
||||||
</p>
|
</p>
|
||||||
<p class="inline column col2">
|
<p class="inline column col2">
|
||||||
<i class="icon-git icon-as-text" alt=""></i>
|
<i class="icon-git icon-as-text" alt=""></i>
|
||||||
{{ i18n "status" }}{{ $appdata.status }}
|
{{ i18n "status" }}{{ $i18nAppData.status }}
|
||||||
</p>
|
</p>
|
||||||
<p class="inline column col2">
|
<p class="inline column col2">
|
||||||
<i class="icon-code icon-as-text" alt=""></i>
|
<i class="icon-code icon-as-text" alt=""></i>
|
||||||
{{ i18n "programingLanguages" }}{{ delimit $appdata.languages ", " }}
|
{{ i18n "programingLanguages" }}{{ delimit $AppData.languages ", " }}
|
||||||
</p>
|
</p>
|
||||||
<p class="inline column col2">
|
<p class="inline column col2">
|
||||||
<i class="icon-frameworks icon-as-text" alt=""></i>
|
<i class="icon-frameworks icon-as-text" alt=""></i>
|
||||||
{{ i18n "frameworks" }} {{ delimit $appdata.frameworks ", " | markdownify }}
|
{{ i18n "frameworks" }} {{ delimit $i18nAppData.frameworks ", " | markdownify }}
|
||||||
</p>
|
</p>
|
||||||
{{ if $appdata.touchfriendly }}
|
{{ if $AppData.touchfriendly }}
|
||||||
<p class="inline column col2">
|
<p class="inline column col2">
|
||||||
<i class="icon-touch icon-as-text" alt=""></i>
|
<i class="icon-touch icon-as-text" alt=""></i>
|
||||||
{{ i18n "touchFriendly" }}
|
{{ i18n "touchFriendly" }}
|
||||||
</p>
|
</p>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ if $appdata.keyboardoriented }}
|
{{ if $AppData.keyboardoriented }}
|
||||||
<p class="inline column col2">
|
<p class="inline column col2">
|
||||||
<i class="icon-keyboard icon-as-text" alt=""></i>
|
<i class="icon-keyboard icon-as-text" alt=""></i>
|
||||||
{{ i18n "keyboardOriented" }}
|
{{ i18n "keyboardOriented" }}
|
||||||
|
@ -91,7 +92,7 @@
|
||||||
{{ end }}
|
{{ end }}
|
||||||
<p class="inline column col2">
|
<p class="inline column col2">
|
||||||
<i class="icon-license icon-as-text" alt=""></i>
|
<i class="icon-license icon-as-text" alt=""></i>
|
||||||
{{ i18n "license" }} {{ $appdata.license | markdownify }}
|
{{ i18n "license" }} {{ $AppData.license | markdownify }}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="grid flex-center">
|
<div class="grid flex-center">
|
||||||
|
@ -103,7 +104,7 @@
|
||||||
<section id="download-section" class="center content-center padding-container text-center">
|
<section id="download-section" class="center content-center padding-container text-center">
|
||||||
<hr>
|
<hr>
|
||||||
<h1 class="flex flex-center"><i class="icon-download icon-larger-text" alt=""></i>{{ i18n "download" }}</h1>
|
<h1 class="flex flex-center"><i class="icon-download icon-larger-text" alt=""></i>{{ i18n "download" }}</h1>
|
||||||
{{ i18n "downloadApp" (dict "Name" .Name "Platforms" (delimit $appdata.platforms ", ")) }}
|
{{ i18n "downloadApp" (dict "Name" .Name "Platforms" (delimit $AppData.platforms ", ")) }}
|
||||||
<br><br>
|
<br><br>
|
||||||
<!-- download table -->
|
<!-- download table -->
|
||||||
<div class="center columns-container">
|
<div class="center columns-container">
|
||||||
|
@ -136,10 +137,10 @@
|
||||||
</a>
|
</a>
|
||||||
<br><br>{{ i18n "warnExternalWebsite" "addons.mozilla.org" }}
|
<br><br>{{ i18n "warnExternalWebsite" "addons.mozilla.org" }}
|
||||||
{{ else }}
|
{{ else }}
|
||||||
{{ i18n "file" }} {{ replace .Name "<version>" $appdata.version }}<br><br>
|
{{ i18n "file" }} {{ replace .Name "<version>" $AppData.version }}<br><br>
|
||||||
<div class="primary center fit-content" role="button">
|
<div class="primary center fit-content" role="button">
|
||||||
{{ $filename := replace .File "<version>" $appdata.version }}
|
{{ $filename := replace .File "<version>" $AppData.version }}
|
||||||
<a href="https://artifacts.accountfree.org/repository/apps.ad5001.eu-apps/{{ $appindex }}/v{{ $appdata.version }}/{{ $filename }}" download rel="noreferrer">
|
<a href="https://artifacts.accountfree.org/repository/apps.ad5001.eu-apps/{{ $appindex }}/v{{ $AppData.version }}/{{ $filename }}" download rel="noreferrer">
|
||||||
<i class="icon-download icon-as-text" alt=""></i>{{ i18n "download" }}
|
<i class="icon-download icon-as-text" alt=""></i>{{ i18n "download" }}
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -4,33 +4,33 @@
|
||||||
{{ $site := .Site }}
|
{{ $site := .Site }}
|
||||||
{{ range .Site.Data.list }}
|
{{ range .Site.Data.list }}
|
||||||
{{ $index := . }}
|
{{ $index := . }}
|
||||||
{{ $data := index $site.Data $site.Language.Lang }}
|
{{ $i18nData := index $site.Data $site.Language.Lang }}
|
||||||
{{ with index $data.apps $index }}
|
{{ $i18nAppData := index $i18nData.apps $index }}
|
||||||
|
{{ $AppData := index $site.Data.metadata $index }}
|
||||||
<div class="padding-container">
|
<div class="padding-container">
|
||||||
<div class="block-preview" style="background-image: url(/img/preview/{{ $index }}.webp);">
|
<div class="block-preview" style="background-image: url(/img/preview/{{ $index }}.webp);">
|
||||||
<a href="{{ $index }}/" class="label-link" alt="{{ .name }}">
|
<a href="{{ $index }}/" class="label-link" alt="{{ $i18nAppData.name }}">
|
||||||
<div class="label">
|
<div class="label">
|
||||||
<h2>
|
<h2>
|
||||||
<span class="flex app-name" style="float: left">
|
<span class="flex app-name" style="float: left">
|
||||||
<img src="/icons/apps/{{ $index }}.svg" loading="lazy" class="icon-larger-text" alt=""/> {{ .name }}
|
<img src="/icons/apps/{{ $index }}.svg" loading="lazy" class="icon-larger-text" alt=""/> {{ $i18nAppData.name }}
|
||||||
</span>
|
</span>
|
||||||
<span class="right-icon"><i class="icon-lookup icon-as-text" alt="{{ i18n "learnMore" }}"/></i></span> <!-- Hint that you can click -->
|
<span class="right-icon"><i class="icon-lookup icon-as-text" alt="{{ i18n "learnMore" }}"/></i></span> <!-- Hint that you can click -->
|
||||||
|
|
||||||
</h2>
|
</h2>
|
||||||
<p class="show-on-hover">{{ .description }}</p>
|
<p class="show-on-hover">{{ $i18nAppData.description }}</p>
|
||||||
<p class="show-on-hover">{{ i18n "status" }} {{ .status }}</p>
|
<p class="show-on-hover">{{ i18n "status" }} {{ $i18nAppData.status }}</p>
|
||||||
<p class="flex show-on-hover">{{ i18n "worksOn" }}
|
<p class="flex show-on-hover">{{ i18n "worksOn" }}
|
||||||
{{ partial "platforms.html" .platforms }}
|
{{ partial "platforms.html" $AppData.platforms }}
|
||||||
</p>
|
</p>
|
||||||
<p class="flex show-on-hover">{{ i18n "translated" }}
|
<p class="flex show-on-hover">{{ i18n "translated" }}
|
||||||
{{ partial "translations.html" .translated }}
|
{{ partial "translations.html" $AppData.translated }}
|
||||||
</p>
|
</p>
|
||||||
<p class="primary" role="button"><i class="icon-lookup icon-as-text" alt="{{ i18n "learnMore" }}"></i>{{ i18n "learnMore" }}</p>
|
<p class="primary" role="button"><i class="icon-lookup icon-as-text" alt="{{ i18n "learnMore" }}"></i>{{ i18n "learnMore" }}</p>
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{ end }}
|
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</div>
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
Loading…
Reference in a new issue