From 14daf3e296ece758942b5e3d2536ae1300636c69 Mon Sep 17 00:00:00 2001 From: Aditya Anand Date: Sat, 3 Nov 2018 16:30:48 +0530 Subject: [PATCH 1/5] kudos: re-indent --- app/kudos/templates/kudos_details.html | 48 ++++++++++++-------------- 1 file changed, 23 insertions(+), 25 deletions(-) diff --git a/app/kudos/templates/kudos_details.html b/app/kudos/templates/kudos_details.html index 9a2cc4aef04..25221752eef 100644 --- a/app/kudos/templates/kudos_details.html +++ b/app/kudos/templates/kudos_details.html @@ -8,8 +8,6 @@ - - {% include 'shared/top_nav.html' with class='d-md-flex' %} @@ -28,14 +26,10 @@
- -
+
-

- -

-
- +

+
{% include 'shared/kudos_levitate.html' %} {{ kudos.name }} @@ -52,18 +46,26 @@

{{ kudos.name|humanize_name }} {

MARKETPLACE STATS +
-

{{ kudos.rarity }} ({{ kudos.num_clones_in_wild_counting_indirect_send }} out of {{ kudos.num_gen0_clones_allowed }})

+

+ + {{ kudos.rarity }} + + ({{ kudos.num_clones_in_wild_counting_indirect_send }} out of {{ kudos.num_gen0_clones_allowed }}) + + +

{{ kudos.num_clones_available_counting_indirect_send }} Total Available @@ -110,12 +112,8 @@

{{ kudos.name|humanize_name }} {

- - - {% include 'shared/disqus.html' with page_url=request.build_absolute_uri %} -
- - + {% include 'shared/disqus.html' with page_url=request.build_absolute_uri %} + {% include 'shared/footer.html' %} {% include 'shared/analytics.html' %} {% include 'shared/footer_scripts.html' with slim=1 %} From c4fc15f7aff1675a3d8b1f938749767a03e77fe6 Mon Sep 17 00:00:00 2001 From: Aditya Anand Date: Sun, 4 Nov 2018 20:55:31 +0530 Subject: [PATCH 2/5] kudos: added share button --- app/assets/v2/js/pages/kudos_details.js | 14 +++ app/kudos/templates/kudos_details.html | 6 +- app/kudos/templates/share.html | 142 ++++++++++++++++++++++++ 3 files changed, 161 insertions(+), 1 deletion(-) create mode 100644 app/kudos/templates/share.html diff --git a/app/assets/v2/js/pages/kudos_details.js b/app/assets/v2/js/pages/kudos_details.js index a89e15afbcb..07a0092f885 100644 --- a/app/assets/v2/js/pages/kudos_details.js +++ b/app/assets/v2/js/pages/kudos_details.js @@ -139,6 +139,20 @@ var stop_kudos_levitate = function() { }; +$('#share-button').on('click', () => { + $('#share-modal').css('display', 'block'); +}); + +$('#share-modal .fa-times').on('click', () => { + $('#share-modal').css('display', 'none'); +}); + +$('#copyLink').on('click', () => { + $('#shareLink').select(); + document.execCommand('copy'); + $('.tooltip-share .title-tooltip').html('Copied Link'); +}); + // $('#getKudos').click(function() { diff --git a/app/kudos/templates/kudos_details.html b/app/kudos/templates/kudos_details.html index 25221752eef..669c83e591b 100644 --- a/app/kudos/templates/kudos_details.html +++ b/app/kudos/templates/kudos_details.html @@ -8,6 +8,10 @@ + + + + {% include 'shared/top_nav.html' with class='d-md-flex' %} @@ -48,7 +52,7 @@

{{ kudos.name|humanize_name }} { MARKETPLACE STATS - + {% include 'share.html' %}

{{ kudos.rarity }} diff --git a/app/kudos/templates/share.html b/app/kudos/templates/share.html new file mode 100644 index 00000000000..2447b408807 --- /dev/null +++ b/app/kudos/templates/share.html @@ -0,0 +1,142 @@ +{% load i18n static %} +{% load kudos_extras %} + + +

\ No newline at end of file From d2582a5831ad77089ca64f8a0dd3b7f66f689b99 Mon Sep 17 00:00:00 2001 From: Aditya Anand Date: Mon, 5 Nov 2018 20:09:39 +0530 Subject: [PATCH 3/5] added review comments --- app/kudos/templates/share.html | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/app/kudos/templates/share.html b/app/kudos/templates/share.html index 2447b408807..d72e82cd3ce 100644 --- a/app/kudos/templates/share.html +++ b/app/kudos/templates/share.html @@ -12,7 +12,7 @@ background-color: rgb(0,0,0); background-color: rgba(0,0,0,0.4); max-width: 100%; - overflow: scroll; + overflow-y: auto; } .modal-content { @@ -54,11 +54,6 @@ width: 150px; } - .tooltip-share .kudos_msg { - padding-left: 2px; - padding-right: 2px; - } - .tooltip-inner .title-tooltip { font-size: 0.65rem; } @@ -121,7 +116,7 @@

Share Kudos!

- +

From 23ce36994e4e81fa39466f150950658473c5dd1c Mon Sep 17 00:00:00 2001 From: Aditya Anand Date: Mon, 5 Nov 2018 21:41:05 +0530 Subject: [PATCH 4/5] enable close modal on clicking outside --- app/assets/v2/js/pages/kudos_details.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/assets/v2/js/pages/kudos_details.js b/app/assets/v2/js/pages/kudos_details.js index 07a0092f885..aa9980ed522 100644 --- a/app/assets/v2/js/pages/kudos_details.js +++ b/app/assets/v2/js/pages/kudos_details.js @@ -139,6 +139,12 @@ var stop_kudos_levitate = function() { }; +window.onclick = (event) => { + if (event.target.id == 'share-modal') { + $('#share-modal').css('display', 'none'); + } +}; + $('#share-button').on('click', () => { $('#share-modal').css('display', 'block'); }); From d1bfb1fecd9ece1102da4834dc98cd54a0b30981 Mon Sep 17 00:00:00 2001 From: Aditya Anand Date: Wed, 7 Nov 2018 12:46:04 +0530 Subject: [PATCH 5/5] added trans tags --- app/assets/v2/css/kudos/styles.css | 3 +++ app/assets/v2/css/kudos/styles.scss | 5 +++++ app/kudos/templates/kudos_details.html | 24 ++++++++++++------------ app/kudos/templates/share.html | 18 +++++++++--------- 4 files changed, 29 insertions(+), 21 deletions(-) diff --git a/app/assets/v2/css/kudos/styles.css b/app/assets/v2/css/kudos/styles.css index 0f3b368ce45..e3fc11c28d1 100644 --- a/app/assets/v2/css/kudos/styles.css +++ b/app/assets/v2/css/kudos/styles.css @@ -495,6 +495,9 @@ a.cellarius-partner:before { border-bottom: 1px solid #C8C8C8; padding-bottom: 0.8rem; margin-bottom: 1rem; } + .kudos-details__subtitle img { + position: relative; + top: -2px; } .kudos-details__price { font-size: 1.5rem; diff --git a/app/assets/v2/css/kudos/styles.scss b/app/assets/v2/css/kudos/styles.scss index d386992672a..5ad3e96b5e4 100644 --- a/app/assets/v2/css/kudos/styles.scss +++ b/app/assets/v2/css/kudos/styles.scss @@ -577,6 +577,11 @@ a.cellarius-partner:before { border-bottom: 1px solid #C8C8C8; padding-bottom: 0.8rem; margin-bottom: 1rem; + + img { + position: relative; + top: -2px; + } } .kudos-details__price { diff --git a/app/kudos/templates/kudos_details.html b/app/kudos/templates/kudos_details.html index 669c83e591b..1b8965c2cca 100644 --- a/app/kudos/templates/kudos_details.html +++ b/app/kudos/templates/kudos_details.html @@ -49,7 +49,7 @@

{{ kudos.name|humanize_name }} {

{{ kudos.description }}

- MARKETPLACE STATS + {% trans "MARKETPLACE STATS" %}
{% include 'share.html' %} @@ -57,23 +57,23 @@

{{ kudos.name|humanize_name }} { {{ kudos.rarity }} - ({{ kudos.num_clones_in_wild_counting_indirect_send }} out of {{ kudos.num_gen0_clones_allowed }}) + ({{ kudos.num_clones_in_wild_counting_indirect_send }} {% trans "out of" %} {{ kudos.num_gen0_clones_allowed }})

- {{ kudos.num_clones_available_counting_indirect_send }} Total Available - {{ kudos.num_clones_in_wild_counting_indirect_send }} Total minted + {{ kudos.num_clones_available_counting_indirect_send }} {% trans "Total Available" %} + {{ kudos.num_clones_in_wild_counting_indirect_send }} {% trans "Total minted" %}

{{ kudos.price_in_eth }} ETH

@@ -82,7 +82,7 @@

{{ kudos.name|humanize_name }} { {% trans "Send Kudos" %} {% elif kudos.num_clones_allowed != 0 and kudos.num_clones_available_counting_indirect_send == 0 %} - There are no clones available due to popularity but you can still look at this awesome badge! + {% trans "There are no clones available due to popularity but you can still look at this awesome badge!" %} {% endif %}

diff --git a/app/kudos/templates/share.html b/app/kudos/templates/share.html index d72e82cd3ce..7376c2db8f1 100644 --- a/app/kudos/templates/share.html +++ b/app/kudos/templates/share.html @@ -1,5 +1,5 @@ -{% load i18n static %} {% load kudos_extras %} +{% load i18n static %}