Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Digiserve Public
Tufts Alerts
Commits
6f1a9f36
Commit
6f1a9f36
authored
Sep 17, 2020
by
alex-tenczar
Browse files
changes to css and js
parent
615dcbc6
Changes
5
Show whitespace changes
Inline
Side-by-side
css/emergency-alert.css
View file @
6f1a9f36
a
,
a
:hover
{
border-style
:
none
!important
;
}
button
{
border
:
none
;
background
:
transparent
;
}
.emergency-alert
{
font-family
:
"Whitney SSm A"
;
font-family
:
"Whitney SSm A"
,
sans-serif
;
font-size
:
1rem
;
line-height
:
1rem
;
margin-bottom
:
0
;
...
...
@@ -91,6 +95,9 @@ a, a:hover {
justify-content
:
flex-end
;
padding-top
:
1rem
;
}
.emergency-alert--high
.emergency-alert__close
svg
{
color
:
white
;
}
.emergency-alert__close
svg
{
background-color
:
rgba
(
0
,
0
,
0
,
.1
);
padding
:
.3rem
;
...
...
css/marketing-alert.css
View file @
6f1a9f36
button
{
border
:
none
;
background
:
transparent
;
}
.marketing-alert
{
font-family
:
"Whitney SSm A"
;
font-family
:
"Whitney SSm A"
,
sans-serif
;
line-height
:
2rem
;
padding
:
1rem
;
width
:
100%
;
...
...
@@ -127,6 +131,7 @@
justify-content
:
flex-end
;
}
.marketing-alert__close
svg
{
color
:
white
;
background-color
:
rgba
(
0
,
0
,
0
,
.1
);
padding
:
.5rem
;
width
:
2.4rem
;
...
...
js/alert-close.js
View file @
6f1a9f36
(
function
(
$
)
{
Drupal
.
behaviors
.
tuftsEmergencyAlert
=
{
attach
:
function
(
context
,
settings
)
{
$
(
context
).
find
(
'
.emergency-alert__close
svg
'
)
$
(
context
).
find
(
'
.emergency-alert__close
#alertCloseButton
'
)
.
once
(
'
closeAlert
'
)
.
click
(
function
()
{
$
(
'
.emergency-alert
'
).
slideUp
(
'
slow
'
);
$
(
this
.
closest
(
'
.emergency-alert
'
)
).
slideUp
(
'
slow
'
);
});
}
};
Drupal
.
behaviors
.
tuftsMarketingAlert
=
{
attach
:
function
(
context
,
settings
)
{
$
(
context
).
find
(
'
.marketing-alert__close
svg
'
)
$
(
context
).
find
(
'
.marketing-alert__close
#alertCloseButton
'
)
.
once
(
'
closeAlert
'
)
.
click
(
function
()
{
$
(
'
.marketing-alert
'
).
slideUp
(
'
slow
'
);
$
(
this
.
closest
(
'
.marketing-alert
'
)
).
slideUp
(
'
slow
'
);
});
}
};
...
...
templates/node--emergency-alert.html.twig
View file @
6f1a9f36
...
...
@@ -23,6 +23,8 @@
</div>
</div>
<div
class=
"emergency-alert__close"
>
<button
id=
"alertCloseButton"
tabindex=
"1"
>
{{
source
(
'@tufts_alerts/svg/alert_close.svg'
)
}}
</button>
</div>
</article>
templates/node--marketing-alert.html.twig
View file @
6f1a9f36
...
...
@@ -17,6 +17,8 @@
</div>
</div>
<div
class=
"marketing-alert__close"
>
<button
id=
"alertCloseButton"
tabindex=
"2"
>
{{
source
(
'@tufts_alerts/svg/alert_close.svg'
)
}}
</button>
</div>
</article>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment