Simplifies layouts for wallet platforms and wallet details.

This commit is contained in:
Igor Kuzmenko 2017-07-17 22:22:39 +02:00
parent d3b7128f74
commit 7796794858
15 changed files with 177 additions and 71 deletions

View file

@ -0,0 +1,17 @@
{% comment %}
This file is licensed under the MIT License (MIT) available on
http://opensource.org/licenses/MIT.
{% if wallet.compat contains page.platform and wallet.compat contains page.os %}
{% endif %}
{% endcomment %}
<div class="wallets" id="wallets" onclick="walletListener(event);" ontouchstart="walletListener(event);">
{% for wallet in site.wallets %}
<div>
<a>
<img src="/img/wallet/{{ wallet.id }}.png" alt="{{ wallet.title }}" />
{{ wallet.titleshort }}
</a>
</div>
{% endfor %}
</div>

View file

@ -0,0 +1,34 @@
{% comment %}
This file is licensed under the MIT License (MIT) available on
http://opensource.org/licenses/MIT.
{% endcomment %}
<div class="walletmenu" id="walletmenu" onclick="walletMenuListener(event);" ontouchstart="walletMenuListener(event);">
{% assign platformsByPlatform = site.platforms | group_by: "platform" %}
<ul>
{% for platform in platformsByPlatform %}
{% assign platform_class = "wallet-" | append: platform.name %}
{% if page.id contains platform.name %}
{% assign platform_class = platform_class | append: " active" %}
{% endif %}
<li class="{{ platform_class }}">
<a href="#">{% translate walletcat{{platform.name}} choose-your-wallet %}</a>
{% if platform.items.size > 1 %}
<ul>
{% for item in platform.items %}
{% assign os_class = "wallet-" | append: item.os %}
{% if page.id == item.id %}
{% assign os_class = os_class | append: " active" %}
{% endif %}
<li class="{{ os_class }}">
<a href="/en/wallets/{{ platform.name }}/{{ item.os }}">
{% translate platform{{item.os}} choose-your-wallet %}
</a>
</li>
{% endfor %}
</ul>
{% endif %}
</li>
{% endfor %}
</ul>
</div>