feat: localize and translate website into English

This commit is contained in:
Stefan Imhoff
2022-02-23 18:10:17 +01:00
parent 6ab3533040
commit a495838b3f
332 changed files with 12866 additions and 1694 deletions

View File

@@ -0,0 +1,46 @@
{% if locale === "en" %}{% set affiliateUrl = "http://www.amazon.de/gp/product/{{ book.asin }}?ie=UTF8&tag=stefanimhoffde-21&linkCode=as2&camp=1638&creative=6742&creativeASIN={{ book.asin }}" %}{% endif %}
{% if locale === "en" %}{% set affiliateUrl = "https://www.amazon.com/gp/product/{{ book.asin }}/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN={{ book.asin }}&linkCode=as2&tag=kogakure-20" %}{% endif %}
<div class="recommendations-books">
<h2>{{ i18n[locale].recommendations.books.headline }}</h2>
<article class="recommendations-container">
{% for book in bookCollection %}
<div {{ site.animation }}>
{% if book.asin %}
<a
class="product"
href="{{ affiliateUrl }}"
rel="nofollow noopener noreferrer external"
target="_blank"
>
{% if book.cover %}
<img alt="{{ book.title }}" src="{{ book.cover }}" />
{% else %}
{% if locale === "en" %}
{% product book.asin, book.title, "en" %}
{% else %}
{% product book.asin, book.title %}
{% endif %}
{% endif %}
</a>
{% else %}
{% if book.link %}
<a
class="product"
href="{{ book.link }}"
rel="nofollow noopener noreferrer external"
target="_blank"
>
<img alt="{{ book.title }}" src="{{ book.cover }}" />
</a>
{% else %}
<img alt="{{ book.title }}" src="{{ book.cover }}" />
{% endif %}
{% endif %}
<h3 class="recommendations-product-title">
{{ book.title }}
</h3>
</div>
{% endfor %}
</article>
</div>