Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Canal Ciência
Tema Canal Ciência
Commits
ee5add98
Commit
ee5add98
authored
2 years ago
by
Cátia Kitahara
Browse files
Options
Download
Email Patches
Plain Diff
generaliza o js das modais
parent
7188cb7e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
12 deletions
+9
-12
assets/js/theme.js
assets/js/theme.js
+9
-12
No files found.
assets/js/theme.js
View file @
ee5add98
...
...
@@ -42,15 +42,11 @@ document.addEventListener("DOMContentLoaded", function () {
};
}
cientistaMenu
=
document
.
getElementById
(
'
cientista-menu
'
);
indice
=
document
.
getElementById
(
'
indice
'
);
if
(
cientistaMenu
){
cientista_menu_height
=
cientistaMenu
.
offsetHeight
;
document
.
getElementById
(
'
capa
'
).
style
.
marginTop
=
'
-
'
+
cientista_menu_height
+
'
px
'
;
var
cientistaModal
=
document
.
getElementById
(
'
cc-cientista-modal
'
)
cientistaModal
.
addEventListener
(
'
show.bs.modal
'
,
function
(
event
)
{
if
(
indice
){
var
itemModal
=
document
.
getElementById
(
'
cc-item-modal
'
)
itemModal
.
addEventListener
(
'
show.bs.modal
'
,
function
(
event
)
{
// Button that triggered the modal
var
trigger
=
event
.
relatedTarget
// Extract info from data-bs-* attributes
...
...
@@ -60,12 +56,13 @@ document.addEventListener("DOMContentLoaded", function () {
// and then do the updating in a callback.
//
// Update the modal's content.
var
modalTitle
=
cientista
Modal
.
querySelector
(
'
.modal-header h4
'
)
var
modalBody
=
cientista
Modal
.
querySelector
(
'
.modal-body
'
)
var
modalTitle
=
item
Modal
.
querySelector
(
'
.modal-header h4
'
)
var
modalBody
=
item
Modal
.
querySelector
(
'
.modal-body
'
)
modalTitle
.
textContent
=
trigger
.
textContent
modalBody
.
innerHTML
=
document
.
getElementById
(
content
).
querySelector
(
'
.wp-block-group
'
).
innerHTML
})
modalBody
.
innerHTML
=
document
.
getElementById
(
content
).
innerHTML
});
}
...
...
This diff is collapsed.
Click to expand it.
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