Fixes an issue with URLs like /web/web/

This commit is contained in:
Igor Kuzmenko 2017-07-31 22:40:31 +02:00
parent b33eaa0133
commit 444d4cf4d7
4 changed files with 21 additions and 3 deletions

View file

@ -9,8 +9,13 @@ http://opensource.org/licenses/MIT.
{% assign os = page.os['name'] %}
{% if wallet.compat contains platform and wallet.compat contains os %}
<div class="wallet-list-item" data-walletlevel="{{ wallet.level }}">
{% if platform == os %}
<a class="wallet-list-item-link"
href="/{{ page.lang}}/wallets/{{ platform }}/{{ wallet.id }}/">
{% else %}
<a class="wallet-list-item-link"
href="/{{ page.lang}}/wallets/{{ platform }}/{{ os }}/{{ wallet.id }}/">
{% endif %}
<img src="/img/wallet/{{ wallet.id }}.png" alt="{{ wallet.title }}" />
{{ wallet.titleshort }}
</a>

View file

@ -27,7 +27,7 @@ http://opensource.org/licenses/MIT.
{% endif %}
<li class="{{ platformClass }}">
{% if platformName == 'hardware' or platformName == 'web' %}
{% assign platformHref = "/" | append: page.lang | append: "/wallets/" | append: platformName | append: "/" | append: platformName | append: "/" %}
{% assign platformHref = "/" | append: page.lang | append: "/wallets/" | append: platformName | append: "/" %}
<a href="{{ platformHref }}">{% translate walletcat{{platformName}} choose-your-wallet %}</a>
{% else %}
<a>{% translate walletcat{{platformName}} choose-your-wallet %}</a>