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>

View file

@ -0,0 +1,99 @@
---
# This file is licensed under the MIT License (MIT) available on
# http://opensource.org/licenses/MIT.
layout: wallet-platform-container
---
<div class="wallet">
<div class="wallet-logo-container">
<img class="wallet-logo" src="/img/wallet/{{ page.id }}.png" alt="{{ page.title }}" />
<h1>
{{ page.title }}
</h1>
</div>
<p class="wallet-description">
{% translate wallet{{page.id}} choose-your-wallet %}
</p>
<div class="wallet-platforms">
<div class="wallet-platforms-menu">
{% for platform in page.platform %}
{% for os in platform.os %}
<button>
<img src="/img/os/{{ os.name }}.png"
alt="{% translate platform{{os.name}} choose-your-wallet %}"
title="{% translate platform{{os.name}} choose-your-wallet %}" />
<span>{% translate platform{{os.name}} choose-your-wallet %}</span>
</button>
{% endfor %}
{% endfor %}
</div>
<div class="wallet-os-list">
{% for platform in page.platform %}
{% for os in platform.os %}
<div class="wallet-os-container" id="{{ os.name }}">
<div class="wallet-os-overview">
<div class="wallet-os-name">
<img src="/img/os/{{ os.name }}.png"
alt="{% translate platform{{os.name}} choose-your-wallet %}"
title="{% translate platform{{os.name}} choose-your-wallet %}" />
<h3>{% translate platform{{os.name}} choose-your-wallet %}</h3>
</div>
<div class="wallet-os-download-buttons">
{% if os.link == 'bitcoincore' %}
<a class="wallet-os-download-link" href="/{{ page.lang }}/{% translate download url %}">{% translate walletdownload choose-your-wallet %}</a>
{% elsif os.link contains 'play.google.com' or os.link contains 'itunes.apple.com' or os.link contains 'chrome.google.com' %}
<a class="wallet-os-download-link" href="{{ os.link }}">{% translate walletdownload choose-your-wallet %}</a>
{% else %}
<a class="wallet-os-download-link" href="{{ os.link }}">{% translate walletvisit choose-your-wallet %}</a>
{% endif %}
{% if os.source %}
<a class="wallet-os-source-link" href="{{ os.source }}"> {% translate walletsourcecode choose-your-wallet %}</a>
{% endif %}
</div>
<div class="wallet-os-checks">
{% for check in os.check %}
{% assign checkName = check[0] %}
{% assign checkValue = check[1] %}
<div class="check{{ checkName }} {% if checkValue contains "checkgood" %}checkgood{% elsif checkValue contains "checkpass" %}checkpass{% elsif checkValue contains "checkneutral" %}checkneutral{% else %}checkfail{% endif %}"
onclick="walletScoreListener(event);"
ontouchstart="walletScoreListener(event);">
<p class="wallet-os-check-title">
{% translate {{checkValue}} choose-your-wallet %}
</p>
<div class="wallet-os-check-help-icon"></div>
<div class="wallet-os-check-details">
<p>{% translate {{checkValue}}txt choose-your-wallet %}</p>
{% if checkName == 'privacy' and os.privacycheck %}
{% for privacycheck in os.privacycheck %}
<div class="check{{ privacycheck[0] }} {% if privacycheck[1] contains "checkgood" %}checkgood{% elsif privacycheck[1] contains "checkpass" %}checkpass{% elsif privacycheck[1] contains "checkneutral" %}checkneutral{% else %}checkfail{% endif %}">
<p>{% translate {{privacycheck[1]}} choose-your-wallet %}</p>
<p>{% translate {{privacycheck[1]}}txt choose-your-wallet %}</p>
</div>
{% endfor %}
{% endif %}
</div>
</div>
{% endfor %}
</div>
</div>
<div class="wallet-os-screenshot">
<img src="/img/screenshots/{{ os.screenshot }}" alt="screenshot">
</div>
</div>
{% endfor %}
{% endfor %}
</div>
</div>
<!--
<div>
</div>
</div>
-->
</div>

View file

@ -0,0 +1,18 @@
---
layout: base
---
{{ content }}
{% include layout/base/wallets-menu.html %}
{% include layout/base/wallets-list.html %}
<div class="walletsdisclaimer">
<h2>
<img src="/img/icons/warning.svg" class="warningicon" alt="warning">
{% translate educate choose-your-wallet %}
</h2>
<p>
{% translate educatetxt choose-your-wallet %}
</p>
</div>

View file

@ -0,0 +1,9 @@
---
# This file is licensed under the MIT License (MIT) available on
# http://opensource.org/licenses/MIT.
layout: wallet-platform-container
---
<h1>{% translate pagetitle choose-your-wallet %}</h1>
<p class="summary">{% translate pagedesc choose-your-wallet %}</p>

View file

@ -2,11 +2,8 @@
# This file is licensed under the MIT License (MIT) available on
# http://opensource.org/licenses/MIT.
layout: base
id: wallets-desktop-linux
platform: desktop
os: linux
---
{% include templates/wallet-platform.html platform=page.platform os=page.os id=page.id %}

View file

@ -2,10 +2,7 @@
# This file is licensed under the MIT License (MIT) available on
# http://opensource.org/licenses/MIT.
layout: base
id: wallets-desktop-mac
platform: desktop
os: mac
---
{% include templates/wallet-platform.html platform=page.platform os=page.os id=page.id %}

View file

@ -2,10 +2,7 @@
# This file is licensed under the MIT License (MIT) available on
# http://opensource.org/licenses/MIT.
layout: base
id: wallets-desktop-windows
platform: desktop
os: windows
---
{% include templates/wallet-platform.html platform=page.platform os=page.os id=page.id %}

View file

@ -2,9 +2,6 @@
# This file is licensed under the MIT License (MIT) available on
# http://opensource.org/licenses/MIT.
layout: base
id: wallets-hardware
platform: hardware
---
{% include templates/wallet-platform.html platform=page.platform os=page.os id=page.id %}

View file

@ -2,10 +2,7 @@
# This file is licensed under the MIT License (MIT) available on
# http://opensource.org/licenses/MIT.
layout: base
id: wallets-mobile-android
platform: mobile
os: android
---
{% include templates/wallet-platform.html platform=page.platform os=page.os id=page.id %}

View file

@ -2,10 +2,7 @@
# This file is licensed under the MIT License (MIT) available on
# http://opensource.org/licenses/MIT.
layout: base
id: wallets-mobile-blackberry
platform: mobile
os: blackberry
---
{% include templates/wallet-platform.html platform=page.platform os=page.os id=page.id %}

View file

@ -2,10 +2,7 @@
# This file is licensed under the MIT License (MIT) available on
# http://opensource.org/licenses/MIT.
layout: base
id: wallets-mobile-ios
platform: mobile
os: ios
---
{% include templates/wallet-platform.html platform=page.platform os=page.os id=page.id %}

View file

@ -2,10 +2,7 @@
# This file is licensed under the MIT License (MIT) available on
# http://opensource.org/licenses/MIT.
layout: base
id: wallets-mobile-windowsphone
platform: mobile
os: windowsphone
---
{% include templates/wallet-platform.html platform=page.platform os=page.os id=page.id %}

View file

@ -2,9 +2,6 @@
# This file is licensed under the MIT License (MIT) available on
# http://opensource.org/licenses/MIT.
layout: base
id: wallets-web
platform: web
---
{% include templates/wallet-platform.html platform=page.platform os=page.os id=page.id %}