From 7b2e700bcda12cc3f27e64aa2228a1591b843903 Mon Sep 17 00:00:00 2001 From: octavioamu Date: Thu, 18 Jul 2019 14:08:16 -0300 Subject: [PATCH 1/4] fix styles and logic --- app/assets/v2/css/profile.css | 42 ++++++++++--------- app/assets/v2/js/pages/profile-edit.js | 4 -- app/dashboard/templates/profiles/profile.html | 28 ++++++------- 3 files changed, 36 insertions(+), 38 deletions(-) diff --git a/app/assets/v2/css/profile.css b/app/assets/v2/css/profile.css index 3026a2b0e69..d6c18f15bf7 100644 --- a/app/assets/v2/css/profile.css +++ b/app/assets/v2/css/profile.css @@ -21,6 +21,10 @@ border-radius: 50%; } +.profile-header { + position: relative; +} + .profile-header__handle { padding-top: 0.8rem; margin-bottom: 0; @@ -374,14 +378,30 @@ a:hover .avatar_edit .avatar_edit_text { } .profile-banner { - top: 25vh; + display: flex; + top: 0; + bottom: 0; color: #ffffff; z-index: 1; width: 100vw; - visibility: hidden; cursor: pointer; } +.profile-banner:hover { + background: linear-gradient(to top,rgba(255,255,255,0.6),rgba(255,255,255,0.0)); +} + +.profile-banner:hover span { + opacity: 1; +} + +.profile-banner span { + font-weight: bold; + text-shadow: 1px 1px 1px #000; + opacity: 0.5; + padding: 5px; +} + .picky { cursor: pointer; } @@ -398,22 +418,4 @@ nav.navbar.navbar-dark{ background-image: url(/static/v2/images/header-bg.png); } -#change_header_lede { - padding-top: 2rem; - padding-bottom: 10rem; - background: linear-gradient(to top,rgba(255,255,255,0.6),rgba(255,255,255,0.0)); -} - -#change_header_lede:hover { - background: linear-gradient(to top,rgba(255,255,255,0.9),rgba(255,255,255,0.0)); -} - -#change_header_lede span { - font-weight: bold; - visibility: hidden; - padding: 5px; -} -#change_header_lede:hover span { - visibility: visible; -} diff --git a/app/assets/v2/js/pages/profile-edit.js b/app/assets/v2/js/pages/profile-edit.js index 40cbe5d3b77..628eb8426a3 100644 --- a/app/assets/v2/js/pages/profile-edit.js +++ b/app/assets/v2/js/pages/profile-edit.js @@ -9,10 +9,6 @@ $(document).ready(function() { }); const banner = document.querySelector('.profile-banner'); - const updateHeader = document.querySelector('#update-header'); - - banner.style['visibility'] = 'visible'; - function setBanner() { const data = new FormData(); diff --git a/app/dashboard/templates/profiles/profile.html b/app/dashboard/templates/profiles/profile.html index 4a8c1bff824..315730afcb9 100644 --- a/app/dashboard/templates/profiles/profile.html +++ b/app/dashboard/templates/profiles/profile.html @@ -17,20 +17,20 @@ {% include 'shared/tag_manager_2.html' %} -
- {% csrf_token %} - {% if is_my_profile%} -

- - Edit Header Photo - -

- {% endif %} -
-
- {% include 'shared/top_nav.html' with class='d-md-flex' %} - {% include 'home/nav.html' %} - {% if not hidden and is_staff %} +
+ {% include 'shared/top_nav.html' with class='d-md-flex' %} + {% include 'home/nav.html' %} + {% csrf_token %} + {% if is_my_profile %} +
+
+ + Edit Header Photo + +
+
+ {% endif %} + {% if not hidden and is_staff %}
Staff only {% trans "Profile Admin" %} From 505c1b8851da024b426367bba54b0e847a887a5a Mon Sep 17 00:00:00 2001 From: octavioamu Date: Thu, 18 Jul 2019 14:23:28 -0300 Subject: [PATCH 2/4] fix stylelint --- app/assets/v2/css/profile.css | 11 ++++++----- app/dashboard/templates/profiles/profile.html | 4 +--- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/app/assets/v2/css/profile.css b/app/assets/v2/css/profile.css index d6c18f15bf7..176c19a8138 100644 --- a/app/assets/v2/css/profile.css +++ b/app/assets/v2/css/profile.css @@ -391,17 +391,17 @@ a:hover .avatar_edit .avatar_edit_text { background: linear-gradient(to top,rgba(255,255,255,0.6),rgba(255,255,255,0.0)); } -.profile-banner:hover span { - opacity: 1; -} - -.profile-banner span { +.profile-banner .h4 { font-weight: bold; text-shadow: 1px 1px 1px #000; opacity: 0.5; padding: 5px; } +.profile-banner:hover .h4 { + opacity: 1; +} + .picky { cursor: pointer; } @@ -416,6 +416,7 @@ a:hover .avatar_edit .avatar_edit_text { nav.navbar.navbar-dark{ background-image: url(/static/v2/images/header-bg.png); + z-index: 2; } diff --git a/app/dashboard/templates/profiles/profile.html b/app/dashboard/templates/profiles/profile.html index 315730afcb9..5d9373705b0 100644 --- a/app/dashboard/templates/profiles/profile.html +++ b/app/dashboard/templates/profiles/profile.html @@ -24,9 +24,7 @@ {% if is_my_profile %}
- - Edit Header Photo - + Edit Header Photo
{% endif %} From fa76cf83812fb91cc196f0e671908db253d669f0 Mon Sep 17 00:00:00 2001 From: octavioamu Date: Thu, 18 Jul 2019 14:32:09 -0300 Subject: [PATCH 3/4] fix z-index --- app/assets/v2/css/profile.css | 1 - app/dashboard/templates/profiles/profile.html | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/app/assets/v2/css/profile.css b/app/assets/v2/css/profile.css index 176c19a8138..1a395403376 100644 --- a/app/assets/v2/css/profile.css +++ b/app/assets/v2/css/profile.css @@ -416,7 +416,6 @@ a:hover .avatar_edit .avatar_edit_text { nav.navbar.navbar-dark{ background-image: url(/static/v2/images/header-bg.png); - z-index: 2; } diff --git a/app/dashboard/templates/profiles/profile.html b/app/dashboard/templates/profiles/profile.html index 5d9373705b0..6d26b29f818 100644 --- a/app/dashboard/templates/profiles/profile.html +++ b/app/dashboard/templates/profiles/profile.html @@ -17,9 +17,9 @@ {% include 'shared/tag_manager_2.html' %} + {% include 'shared/top_nav.html' with class='d-md-flex' %} + {% include 'home/nav.html' %}
- {% include 'shared/top_nav.html' with class='d-md-flex' %} - {% include 'home/nav.html' %} {% csrf_token %} {% if is_my_profile %}
From 5cdc7a236fb57b84b2aff51d966008060fb3bf62 Mon Sep 17 00:00:00 2001 From: octavioamu Date: Thu, 18 Jul 2019 14:33:46 -0300 Subject: [PATCH 4/4] fix banner text --- app/retail/templates/shared/top_nav.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/retail/templates/shared/top_nav.html b/app/retail/templates/shared/top_nav.html index 26fe2ee2d6e..e4b2ff01011 100644 --- a/app/retail/templates/shared/top_nav.html +++ b/app/retail/templates/shared/top_nav.html @@ -20,7 +20,7 @@
- {% blocktrans %}The Grow Ethereum Hackathon runs July 22nd to August 15th - Check out the Details.{% endblocktrans %} + {% blocktrans %}The Grow Ethereum Hackathon runs July 29nd to August 19th - Check out the Details.{% endblocktrans %} ×