Commit 6f1a9f36 authored by alex-tenczar's avatar alex-tenczar
Browse files

changes to css and js

parent 615dcbc6
a, a:hover { a, a:hover {
border-style: none !important; border-style: none !important;
} }
button {
border: none;
background: transparent;
}
.emergency-alert { .emergency-alert {
font-family: "Whitney SSm A"; font-family: "Whitney SSm A", sans-serif;
font-size: 1rem; font-size: 1rem;
line-height: 1rem; line-height: 1rem;
margin-bottom: 0; margin-bottom: 0;
...@@ -91,6 +95,9 @@ a, a:hover { ...@@ -91,6 +95,9 @@ a, a:hover {
justify-content: flex-end; justify-content: flex-end;
padding-top: 1rem; padding-top: 1rem;
} }
.emergency-alert--high .emergency-alert__close svg {
color: white;
}
.emergency-alert__close svg { .emergency-alert__close svg {
background-color: rgba(0,0,0,.1); background-color: rgba(0,0,0,.1);
padding: .3rem; padding: .3rem;
......
button {
border: none;
background: transparent;
}
.marketing-alert { .marketing-alert {
font-family: "Whitney SSm A"; font-family: "Whitney SSm A", sans-serif;
line-height: 2rem; line-height: 2rem;
padding: 1rem; padding: 1rem;
width: 100%; width: 100%;
...@@ -127,6 +131,7 @@ ...@@ -127,6 +131,7 @@
justify-content: flex-end; justify-content: flex-end;
} }
.marketing-alert__close svg { .marketing-alert__close svg {
color: white;
background-color: rgba(0,0,0,.1); background-color: rgba(0,0,0,.1);
padding: .5rem; padding: .5rem;
width: 2.4rem; width: 2.4rem;
......
(function ($) { (function ($) {
Drupal.behaviors.tuftsEmergencyAlert = { Drupal.behaviors.tuftsEmergencyAlert = {
attach: function(context, settings) { attach: function(context, settings) {
$(context).find('.emergency-alert__close svg') $(context).find('.emergency-alert__close #alertCloseButton')
.once('closeAlert') .once('closeAlert')
.click(function() { .click(function() {
$( '.emergency-alert' ).slideUp('slow'); $(this.closest('.emergency-alert')).slideUp('slow');
}); });
} }
}; };
Drupal.behaviors.tuftsMarketingAlert = { Drupal.behaviors.tuftsMarketingAlert = {
attach: function(context, settings) { attach: function(context, settings) {
$(context).find('.marketing-alert__close svg') $(context).find('.marketing-alert__close #alertCloseButton')
.once('closeAlert') .once('closeAlert')
.click(function() { .click(function() {
$( '.marketing-alert' ).slideUp('slow'); $(this.closest('.marketing-alert')).slideUp('slow');
}); });
} }
}; };
......
...@@ -23,6 +23,8 @@ ...@@ -23,6 +23,8 @@
</div> </div>
</div> </div>
<div class="emergency-alert__close"> <div class="emergency-alert__close">
{{source('@tufts_alerts/svg/alert_close.svg')}} <button id="alertCloseButton" tabindex="1">
{{source('@tufts_alerts/svg/alert_close.svg')}}
</button>
</div> </div>
</article> </article>
...@@ -17,6 +17,8 @@ ...@@ -17,6 +17,8 @@
</div> </div>
</div> </div>
<div class="marketing-alert__close"> <div class="marketing-alert__close">
{{source('@tufts_alerts/svg/alert_close.svg')}} <button id="alertCloseButton" tabindex="2">
{{source('@tufts_alerts/svg/alert_close.svg')}}
</button>
</div> </div>
</article> </article>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment