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>

View file

@ -1,44 +0,0 @@
{% comment %}
This file is licensed under the MIT License (MIT) available on
http://opensource.org/licenses/MIT.
{% endcomment %}
<h1>{% translate pagetitle %}</h1>
<p class="summary">{% translate pagedesc %}</p>
<div class="walletmenu" id="walletmenu" onclick="walletMenuListener(event);" ontouchstart="walletMenuListener(event);">
<ul>
<li class="wallet-mobile">
<a id="mobile" data-walletcompat="mobile">{% translate walletcatmobile %}</a>
<ul>
<li class="wallet-android"><a id="android" data-walletcompat="android">{% translate platformandroid %}</a></li>
<li class="wallet-ios"><a id="ios" data-walletcompat="ios">{% translate platformios %}</a></li>
<li class="wallet-windowsphone"><a id="windowsphone" data-walletcompat="windowsphone">{% translate platformwindowsphone %}</a></li>
<li class="wallet-blackberry"><a id="blackberry" data-walletcompat="blackberry">{% translate platformblackberry %}</a></li>
</ul>
</li>
<li class="wallet-desktop">
<a id="desktop" data-walletcompat="desktop">{% translate walletcatdesktop %}</a>
<ul>
<li class="wallet-windows"><a id="windows" data-walletcompat="windows">{% translate platformwindows %}</a></li>
<li class="wallet-mac"><a id="mac" data-walletcompat="mac">{% translate platformmac %}</a></li>
<li class="wallet-linux"><a id="linux" data-walletcompat="linux">{% translate platformlinux %}</a></li>
</ul>
</li>
<li class="wallet-hardware"><a id="hardware" data-walletcompat="hardware">{% translate walletcathardware %}</a></li>
<li class="wallet-web"><a id="web" data-walletcompat="web">{% translate walletcatweb %}</a></li>
</ul>
</div>
<div class="wallets" id="wallets" onclick="walletListener(event);" ontouchstart="walletListener(event);">
{% for wallet in site.wallets %}
{% if wallet.compat contains page.platform and wallet.compat contains page.os %}
<div>
<a>
<img src="/img/wallet/{{ wallet.id }}.png" alt="{{ wallet.title }}" />
{{ wallet.titleshort }}
</a>
</div>
{% endif %}
{% endfor %}
</div>