From 3b31741959fb76702f9d528066776d1793f94e72 Mon Sep 17 00:00:00 2001 From: Paul <41552663+molecula451@users.noreply.github.com> Date: Sat, 4 Jul 2020 23:28:54 -0400 Subject: [PATCH] Super Responsive Quest Table (#7026) * Super Responsive Quest Table * Quest Owner row & avatar * buttons and icons * Config icon * Quest Creator & Icon Locked Quest by hackaton * Beaten quest new style * Title creator * tab * improved style * space * improved style * some properties * some properties * some properties * responsive button & quest creator * purge inline style * responsive properties * responsive * improved code and style * some style * some fixes * lint fixes * lint fixes * lint * lint * lint --- app/assets/v2/css/quests.css | 124 +++++++++++++++++++++++++ app/quests/templates/quests/index.html | 77 ++++++++++----- 2 files changed, 178 insertions(+), 23 deletions(-) diff --git a/app/assets/v2/css/quests.css b/app/assets/v2/css/quests.css index b94821e65f2..54802b5b88e 100644 --- a/app/assets/v2/css/quests.css +++ b/app/assets/v2/css/quests.css @@ -1,3 +1,48 @@ +/* table properties */ + +td, th { + white-space: nowrap; +} + +.table td, +.table th { + padding: 4px; + border: none; +} + +.table { + width: 100%; + text-align: center; +} + +#explore_quests { + width: auto; +} + +#quest_creator { + position: relative; + width: 30px; + height: 30px; + border-radius: 15px; + bottom: -5px; +} + +.btn { + width: 100px; + position: relative; + border: none; + padding: 5px; + text-align: center; + display: inline-block; + top: 5px; + font-size: 16px; +} + +.btn-secondary { + background-color: white; + color: grey; +} + .show_on_mobile { display: none; } @@ -57,6 +102,7 @@ .announce a { background-color: #f2c3c4; color: black; + width: auto; } .announce h4 { @@ -77,6 +123,7 @@ .announce5 a { background-color: #cee370 !important; + width: auto; } .announce4 h4 { @@ -93,6 +140,7 @@ .announce4 a { background-color: #dcc58c !important; + width: auto; } .announce3 h4 { @@ -109,6 +157,7 @@ .announce3 a { background-color: #b0d9d4 !important; + width: auto; } .announce2 h4 { @@ -125,6 +174,7 @@ .announce2 a { background-color: #849ffc !important; + width: auto; } .announce6 h4 { @@ -141,6 +191,7 @@ .announce6 a { background-color: #ddb9bd !important; + width: auto; } .referrals img { @@ -1221,6 +1272,10 @@ body.green .tl { @media (max-width: 1110px) { + .btn { + right: auto; + } + body.quest_battle { background-size: 250% !important; } @@ -1348,6 +1403,28 @@ body.green .tl { @media (max-width: 991.98px) { + .table { + border: auto; + } + + #quest_creator { + top: 0.4rem; + } + + .btn { + width: -webkit-fill-available; + top: 0.4rem; + border: none; + + } + + .table td, + .table th { + padding: 0.55rem; + border: none; + position: relative; + } + body.quest_battle { background-size: 250% !important; } @@ -1416,6 +1493,32 @@ body.green .tl { @media (max-width: 767.98px) { + .table { + text-align: center; + border-collapse: collapse; + border: auto; + } + + .btn { + width: -webkit-fill-available; + top: 0.6rem; + border: none; + } + + .table td, + .table th { + padding: 0.25rem; + } + + #quest_creator { + top: 10px; + right: 1px; + } + + #explore_quests { + top: -1px; + } + body.quest_battle { background-size: 350% !important; } @@ -1511,6 +1614,27 @@ body.green .tl { @media (max-width: 575.98px) { + .table { + border: none; + } + + .table td { + padding: 5.5px; + } + + .table th { + padding: 5.5px; + } + + .btn { + right: auto; + top: 0.6rem; + } + + #quest_creator { + top: 0.8rem; + } + body.quest_battle { background-size: 250% !important; } diff --git a/app/quests/templates/quests/index.html b/app/quests/templates/quests/index.html index 2bceaf42016..dba740ca182 100644 --- a/app/quests/templates/quests/index.html +++ b/app/quests/templates/quests/index.html @@ -76,57 +76,87 @@

No Quests Found

- +
+
- - - - + {% if difficulty_level == 'Created' %} + + {% else %} + + {% endif %} + {% for unlocked, beaten, cooldown, quest in the_quests %} - - + + {% if difficulty_level == 'Created' %} + + {% endif %} + {% if not difficulty_level == 'Created' %} + + {% endif %} {% if beaten %} - - {% elif cooldown %} - + + + + {% elif cooldown %} + + {% elif unlocked %} - - - +
+
+ + {% else %} - {% endif %} {% endif %} - {% endfor %} -
Quest Name Quest Prize Difficulty Attempts Description Play TimePlay{% if difficulty_level == 'Created' %} Ownership {% endif %} OwnershipQuest OwnerStage
{{quest.title}} {{quest.kudos_reward.humanized_name}} {{difficulty_level}} {{quest.ui_data.attempts_count}} {{quest.description}}{{quest.est_total_time_required}} mins (reading)
{{quest.est_skim_time_mins}} mins (skimming)
{{quest.est_total_time_required}} mins (reading)
{{quest.est_skim_time_mins}} mins (skimming)
+ + Edit + + + + + + + + ( ✅ Quest Beaten) - ( 🥶 In Cooldown Period) - + Beaten + + + 🥶 Cold + - {% if difficulty_level == 'Created' %}
(Edit Quest) - {% endif %} + + Play + + 🔒Locked; To unlock + + {% if quest.unlocked_by_hackathon %} - register for {{quest.unlocked_by_hackathon.name}}. - {% else %} - beat {{quest.unlocked_by_quest.title}}. + 🔒Unlock + {% else %} + beat {{quest.unlocked_by_quest.title}}. +
+ {% endfor %} +
+ {% endfor %} @@ -578,6 +608,7 @@

Play Gitcoin Quests Now.

{% block 'scripts' %} +