mirror of
https://github.com/Threnklyn/reveal-hugo.git
synced 2026-06-06 21:50:48 +02:00
Presentations can add their own HTML to the layout
This will be the recommended way to add custom CSS and JS on a per-presentation basis. Global layout extensions remain the same.
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
<!-- This partial is included before the end of the body tag for only the 'example' presentation -->
|
||||
<!-- A common use would be to add JavaScript to the page to customize interactions -->
|
||||
<!-- The Reveal.js JavaScript API is located at https://github.com/hakimel/reveal.js/#api -->
|
||||
<script type="text/javascript">
|
||||
// Log the current slide to the console when it changes
|
||||
Reveal.addEventListener('slidechanged', function(event) {
|
||||
console.log("🎞️ Slide is now " + event.indexh);
|
||||
});
|
||||
</script>
|
||||
@@ -0,0 +1,18 @@
|
||||
<!-- This partial is included before the end of the head tag for only the 'example' presentation -->
|
||||
<!-- A common use would be to add CSS to the page to customize the theme -->
|
||||
<style>
|
||||
/* Add padding, margin and a hover effect on code samples */
|
||||
.reveal section pre {
|
||||
box-shadow: none;
|
||||
margin-top: 25px;
|
||||
margin-bottom: 25px;
|
||||
border: 1px solid lightgrey;
|
||||
}
|
||||
.reveal section pre:hover {
|
||||
border: 1px solid grey;
|
||||
transition: border 0.3s ease;
|
||||
}
|
||||
.reveal section pre > code {
|
||||
padding: 10px;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user