Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jeremy/update styling for announcement banner #9777

Merged
merged 3 commits into from
Dec 1, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions app/assets/v2/js/base.js
Original file line number Diff line number Diff line change
Expand Up @@ -150,15 +150,15 @@ document.addEventListener('DOMContentLoaded', function() {
var $top_nav_notif = $('#top_nav_notification');
var top_nav_salt = document.nav_salt;
var remove_top_row = function() {
$top_nav_notif.parents('.row').remove();
$top_nav_notif.parents('.bottom_notification').remove();
localStorage['top_nav_notification_remove_' + top_nav_salt] = true;
};

// display (if it holds a message and hasn't been closed) or remove #top_nav_notification
if (top_nav_salt == 0 || localStorage['top_nav_notification_remove_' + top_nav_salt]) {
remove_top_row();
} else {
$top_nav_notif.parents('.row').removeClass('d-none');
$top_nav_notif.parents('.bottom_notification').removeClass('d-none');
}
$top_nav_notif.click(remove_top_row);

Expand Down
9 changes: 4 additions & 5 deletions app/assets/v2/scss/base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -507,12 +507,11 @@ input[type=text].loading {

.bottom_notification {
padding: 8px 30px;
background: #6F3FF5;
color: white;
background: #F0EBFF;
color: black;
width: 100%;
margin-left: 0px;
font-size: 16px;
padding-right: 50px;
}

.bottom_notification-beyond {
Expand Down Expand Up @@ -545,8 +544,8 @@ input[type=text].loading {
}

.bottom_notification a {
color: currentColor;
text-decoration: underline;
color: #6F3FF5;
text-decoration: none;
margin-left: 5px;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<div class="container-fluid grants-container">
<div class="container">
<div class="mx-0 mb-4 text-center text-md-left">
<h4 class="font-weight-bold mb-2">Discover Match Pools</h4>
<h4 class="font-weight-bold mb-2" id="match-pools">Discover Match Pools</h4>
<p class="font-subheader">Match pool categories curated by the Gitcoin Dao and community</p>
</div>

Expand Down
23 changes: 12 additions & 11 deletions app/retail/templates/shared/top_nav.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,16 @@


<!--- Top Row Notification -->
<div class="row bottom_notification font-caption d-none" style="text-align: center;">
<script>
document.nav_salt = {{ nav_salt|safe }};
</script>
<span style="text-align: center; margin: auto;">
{{ header_msg|safe }}
</span>
<span style="cursor: pointer;" id="top_nav_notification">
&times;
</span>
<div class="bottom_notification d-none">
<div class="row p-0 container-lg m-auto">
<script>
document.nav_salt = {{ nav_salt|safe }};
</script>
<span class="col m-auto text-center">
{{ header_msg|safe }}
</span>
<span class="cursor-pointer col-auto text-right" id="top_nav_notification">
&times;
</span>
</div>
</div>