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>
|
||||
{{ $lang := .Site.Language.Lang }}
|
||||
{{ $appindex := .Params.SectionHeader.AppIndex }}
|
||||
{{ $data := index .Site.Data $lang }}
|
||||
{{ $appdata := index $data.apps $appindex }}
|
||||
{{ $i18nData := index .Site.Data $lang }}
|
||||
{{ $i18nAppData := index $i18nData.apps $appindex }}
|
||||
{{ $AppData := index .Site.Data.metadata $appindex }}
|
||||
{{ $disclaimers := newScratch }}
|
||||
{{ $disclaimers.Set "snapcraft" false }}
|
||||
{{ $disclaimers.Set "firefox" false }}
|
||||
|
@ -55,35 +56,35 @@
|
|||
<div class="grid">
|
||||
<p class="inline column col2">
|
||||
<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 class="inline column col2">
|
||||
<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 class="inline column col2">
|
||||
<i class="icon-git icon-as-text" alt=""></i>
|
||||
{{ i18n "latestVersion" }}v{{ $appdata.version }}
|
||||
{{ i18n "latestVersion" }}v{{ $AppData.version }}
|
||||
</p>
|
||||
<p class="inline column col2">
|
||||
<i class="icon-git icon-as-text" alt=""></i>
|
||||
{{ i18n "status" }}{{ $appdata.status }}
|
||||
{{ i18n "status" }}{{ $i18nAppData.status }}
|
||||
</p>
|
||||
<p class="inline column col2">
|
||||
<i class="icon-code icon-as-text" alt=""></i>
|
||||
{{ i18n "programingLanguages" }}{{ delimit $appdata.languages ", " }}
|
||||
{{ i18n "programingLanguages" }}{{ delimit $AppData.languages ", " }}
|
||||
</p>
|
||||
<p class="inline column col2">
|
||||
<i class="icon-frameworks icon-as-text" alt=""></i>
|
||||
{{ i18n "frameworks" }} {{ delimit $appdata.frameworks ", " | markdownify }}
|
||||
{{ i18n "frameworks" }} {{ delimit $i18nAppData.frameworks ", " | markdownify }}
|
||||
</p>
|
||||
{{ if $appdata.touchfriendly }}
|
||||
{{ if $AppData.touchfriendly }}
|
||||
<p class="inline column col2">
|
||||
<i class="icon-touch icon-as-text" alt=""></i>
|
||||
{{ i18n "touchFriendly" }}
|
||||
</p>
|
||||
{{ end }}
|
||||
{{ if $appdata.keyboardoriented }}
|
||||
{{ if $AppData.keyboardoriented }}
|
||||
<p class="inline column col2">
|
||||
<i class="icon-keyboard icon-as-text" alt=""></i>
|
||||
{{ i18n "keyboardOriented" }}
|
||||
|
@ -91,7 +92,7 @@
|
|||
{{ end }}
|
||||
<p class="inline column col2">
|
||||
<i class="icon-license icon-as-text" alt=""></i>
|
||||
{{ i18n "license" }} {{ $appdata.license | markdownify }}
|
||||
{{ i18n "license" }} {{ $AppData.license | markdownify }}
|
||||
</p>
|
||||
</div>
|
||||
<div class="grid flex-center">
|
||||
|
@ -103,7 +104,7 @@
|
|||
<section id="download-section" class="center content-center padding-container text-center">
|
||||
<hr>
|
||||
<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>
|
||||
<!-- download table -->
|
||||
<div class="center columns-container">
|
||||
|
@ -136,10 +137,10 @@
|
|||
</a>
|
||||
<br><br>{{ i18n "warnExternalWebsite" "addons.mozilla.org" }}
|
||||
{{ 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">
|
||||
{{ $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">
|
||||
{{ $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">
|
||||
<i class="icon-download icon-as-text" alt=""></i>{{ i18n "download" }}
|
||||
</a>
|
||||
</div>
|
||||
|
|
|
@ -4,33 +4,33 @@
|
|||
{{ $site := .Site }}
|
||||
{{ range .Site.Data.list }}
|
||||
{{ $index := . }}
|
||||
{{ $data := index $site.Data $site.Language.Lang }}
|
||||
{{ with index $data.apps $index }}
|
||||
{{ $i18nData := index $site.Data $site.Language.Lang }}
|
||||
{{ $i18nAppData := index $i18nData.apps $index }}
|
||||
{{ $AppData := index $site.Data.metadata $index }}
|
||||
<div class="padding-container">
|
||||
<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">
|
||||
<h2>
|
||||
<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 class="right-icon"><i class="icon-lookup icon-as-text" alt="{{ i18n "learnMore" }}"/></i></span> <!-- Hint that you can click -->
|
||||
|
||||
</h2>
|
||||
<p class="show-on-hover">{{ .description }}</p>
|
||||
<p class="show-on-hover">{{ i18n "status" }} {{ .status }}</p>
|
||||
<p class="show-on-hover">{{ $i18nAppData.description }}</p>
|
||||
<p class="show-on-hover">{{ i18n "status" }} {{ $i18nAppData.status }}</p>
|
||||
<p class="flex show-on-hover">{{ i18n "worksOn" }}
|
||||
{{ partial "platforms.html" .platforms }}
|
||||
{{ partial "platforms.html" $AppData.platforms }}
|
||||
</p>
|
||||
<p class="flex show-on-hover">{{ i18n "translated" }}
|
||||
{{ partial "translations.html" .translated }}
|
||||
{{ partial "translations.html" $AppData.translated }}
|
||||
</p>
|
||||
<p class="primary" role="button"><i class="icon-lookup icon-as-text" alt="{{ i18n "learnMore" }}"></i>{{ i18n "learnMore" }}</p>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
|
|
Loading…
Reference in a new issue