From 77967948586c58499d57c80824618e44dfeeda38 Mon Sep 17 00:00:00 2001 From: Igor Kuzmenko Date: Mon, 17 Jul 2017 22:22:39 +0200 Subject: [PATCH] Simplifies layouts for wallet platforms and wallet details. --- _includes/layout/base/wallets-list.html | 17 ++++ _includes/layout/base/wallets-menu.html | 34 ++++++++ _includes/templates/wallet-platform.html | 44 ----------- _layouts/wallet-container.html | 99 ++++++++++++++++++++++++ _layouts/wallet-platform-container.html | 18 +++++ _layouts/wallet-platform.html | 9 +++ _platforms/desktop/linux.html | 3 - _platforms/desktop/mac.html | 3 - _platforms/desktop/windows.html | 3 - _platforms/hardware.html | 3 - _platforms/mobile/android.html | 3 - _platforms/mobile/blackberry.html | 3 - _platforms/mobile/ios.html | 3 - _platforms/mobile/windowsphone.html | 3 - _platforms/web.html | 3 - 15 files changed, 177 insertions(+), 71 deletions(-) create mode 100644 _includes/layout/base/wallets-list.html create mode 100644 _includes/layout/base/wallets-menu.html delete mode 100644 _includes/templates/wallet-platform.html create mode 100644 _layouts/wallet-container.html create mode 100644 _layouts/wallet-platform-container.html create mode 100644 _layouts/wallet-platform.html diff --git a/_includes/layout/base/wallets-list.html b/_includes/layout/base/wallets-list.html new file mode 100644 index 00000000..b27d19c3 --- /dev/null +++ b/_includes/layout/base/wallets-list.html @@ -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 %} + +
+{% for wallet in site.wallets %} +
+ + {{ wallet.title }} + {{ wallet.titleshort }} + +
+{% endfor %} +
diff --git a/_includes/layout/base/wallets-menu.html b/_includes/layout/base/wallets-menu.html new file mode 100644 index 00000000..965b27dd --- /dev/null +++ b/_includes/layout/base/wallets-menu.html @@ -0,0 +1,34 @@ +{% comment %} +This file is licensed under the MIT License (MIT) available on +http://opensource.org/licenses/MIT. +{% endcomment %} + +
+{% assign platformsByPlatform = site.platforms | group_by: "platform" %} + +
diff --git a/_includes/templates/wallet-platform.html b/_includes/templates/wallet-platform.html deleted file mode 100644 index 1af5a150..00000000 --- a/_includes/templates/wallet-platform.html +++ /dev/null @@ -1,44 +0,0 @@ -{% comment %} -This file is licensed under the MIT License (MIT) available on -http://opensource.org/licenses/MIT. -{% endcomment %} - -

{% translate pagetitle %}

-

{% translate pagedesc %}

- -
- -
- -
-{% for wallet in site.wallets %} - {% if wallet.compat contains page.platform and wallet.compat contains page.os %} -
- - {{ wallet.title }} - {{ wallet.titleshort }} - -
- {% endif %} -{% endfor %} -
diff --git a/_layouts/wallet-container.html b/_layouts/wallet-container.html new file mode 100644 index 00000000..9ee7c375 --- /dev/null +++ b/_layouts/wallet-container.html @@ -0,0 +1,99 @@ +--- +# This file is licensed under the MIT License (MIT) available on +# http://opensource.org/licenses/MIT. + +layout: wallet-platform-container +--- + +
+ +
+ +

+ {{ page.title }} +

+
+ +

+ {% translate wallet{{page.id}} choose-your-wallet %} +

+ +
+
+ {% for platform in page.platform %} + {% for os in platform.os %} + + {% endfor %} + {% endfor %} +
+
+ {% for platform in page.platform %} + {% for os in platform.os %} +
+
+
+ {% translate platform{{os.name}} choose-your-wallet %} +

{% translate platform{{os.name}} choose-your-wallet %}

+
+
+ {% if os.link == 'bitcoincore' %} + {% translate walletdownload choose-your-wallet %} + {% elsif os.link contains 'play.google.com' or os.link contains 'itunes.apple.com' or os.link contains 'chrome.google.com' %} + {% translate walletdownload choose-your-wallet %} + {% else %} + {% translate walletvisit choose-your-wallet %} + {% endif %} + {% if os.source %} + {% translate walletsourcecode choose-your-wallet %} + {% endif %} +
+
+ {% for check in os.check %} + {% assign checkName = check[0] %} + {% assign checkValue = check[1] %} +
+

+ {% translate {{checkValue}} choose-your-wallet %} +

+
+
+

{% translate {{checkValue}}txt choose-your-wallet %}

+ {% if checkName == 'privacy' and os.privacycheck %} + {% for privacycheck in os.privacycheck %} +
+

{% translate {{privacycheck[1]}} choose-your-wallet %}

+

{% translate {{privacycheck[1]}}txt choose-your-wallet %}

+
+ {% endfor %} + {% endif %} +
+
+ {% endfor %} +
+
+
+ screenshot +
+
+ {% endfor %} + {% endfor %} +
+
+ + +
diff --git a/_layouts/wallet-platform-container.html b/_layouts/wallet-platform-container.html new file mode 100644 index 00000000..8443391a --- /dev/null +++ b/_layouts/wallet-platform-container.html @@ -0,0 +1,18 @@ +--- +layout: base +--- + +{{ content }} + +{% include layout/base/wallets-menu.html %} +{% include layout/base/wallets-list.html %} + +
+

+ warning + {% translate educate choose-your-wallet %} +

+

+ {% translate educatetxt choose-your-wallet %} +

+
diff --git a/_layouts/wallet-platform.html b/_layouts/wallet-platform.html new file mode 100644 index 00000000..5291aed4 --- /dev/null +++ b/_layouts/wallet-platform.html @@ -0,0 +1,9 @@ +--- +# This file is licensed under the MIT License (MIT) available on +# http://opensource.org/licenses/MIT. + +layout: wallet-platform-container +--- + +

{% translate pagetitle choose-your-wallet %}

+

{% translate pagedesc choose-your-wallet %}

diff --git a/_platforms/desktop/linux.html b/_platforms/desktop/linux.html index f36b7856..ec4be7eb 100644 --- a/_platforms/desktop/linux.html +++ b/_platforms/desktop/linux.html @@ -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 %} - diff --git a/_platforms/desktop/mac.html b/_platforms/desktop/mac.html index 2d6eac79..37598089 100644 --- a/_platforms/desktop/mac.html +++ b/_platforms/desktop/mac.html @@ -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 %} diff --git a/_platforms/desktop/windows.html b/_platforms/desktop/windows.html index 3fa1cfd2..c761b19b 100644 --- a/_platforms/desktop/windows.html +++ b/_platforms/desktop/windows.html @@ -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 %} diff --git a/_platforms/hardware.html b/_platforms/hardware.html index 9b5639e6..cecdf972 100644 --- a/_platforms/hardware.html +++ b/_platforms/hardware.html @@ -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 %} diff --git a/_platforms/mobile/android.html b/_platforms/mobile/android.html index f036207c..bc0196cd 100644 --- a/_platforms/mobile/android.html +++ b/_platforms/mobile/android.html @@ -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 %} diff --git a/_platforms/mobile/blackberry.html b/_platforms/mobile/blackberry.html index e7dd8daf..c2fe3788 100644 --- a/_platforms/mobile/blackberry.html +++ b/_platforms/mobile/blackberry.html @@ -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 %} diff --git a/_platforms/mobile/ios.html b/_platforms/mobile/ios.html index 8cfb658e..75a42751 100644 --- a/_platforms/mobile/ios.html +++ b/_platforms/mobile/ios.html @@ -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 %} diff --git a/_platforms/mobile/windowsphone.html b/_platforms/mobile/windowsphone.html index 1944fa2a..29fc7a57 100644 --- a/_platforms/mobile/windowsphone.html +++ b/_platforms/mobile/windowsphone.html @@ -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 %} diff --git a/_platforms/web.html b/_platforms/web.html index a34b90f5..34afb073 100644 --- a/_platforms/web.html +++ b/_platforms/web.html @@ -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 %}