Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
bonita
bonita-documentation-theme
Commits
45b4f22a
Commit
45b4f22a
authored
Jun 10, 2022
by
benjaminParisel
Browse files
theme(asciinema): Use js library not only on production
* remove script section to section added only when site is on production
parent
4cea9e48
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/partials/footer-scripts.hbs
View file @
45b4f22a
...
...
@@ -50,18 +50,19 @@
apiKey: '16267f96d135c47df8454efd5b448c9a',
});
*/
let
asciinemaPlayers
=
document
.
querySelectorAll
(
'
asciinema-player
'
);
asciinemaPlayers
.
forEach
(
htmlPlayer
=>
{
let
options
=
{
fit
:
false
};
htmlPlayer
.
getAttributeNames
().
forEach
(
key
=>
options
[
key
]
=
htmlPlayer
.
getAttribute
(
key
));
AsciinemaPlayer
.
create
(
htmlPlayer
.
getAttribute
(
'
src
'
),
htmlPlayer
,
options
);
});
</script>
{{/
unless
}}
{{/
unless
}}
<script>
let
asciinemaPlayers
=
document
.
querySelectorAll
(
'
asciinema-player
'
);
asciinemaPlayers
.
forEach
(
htmlPlayer
=>
{
let
options
=
{
fit
:
false
};
htmlPlayer
.
getAttributeNames
().
forEach
(
key
=>
options
[
key
]
=
htmlPlayer
.
getAttribute
(
key
));
AsciinemaPlayer
.
create
(
htmlPlayer
.
getAttribute
(
'
src
'
),
htmlPlayer
,
options
);
});
</script>
<script>
// init toggle state
const
isDarkThemeEnable
=
localStorage
.
getItem
(
'
theme
'
)
===
'
dark
'
;
...
...
Write
Preview
Supports
Markdown
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