-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #24 from esciencecenter-digital-skills/add_submodu…
…le_rendering_back Add separate reveal.js and markdown rendering
- Loading branch information
Showing
24 changed files
with
7,627 additions
and
17,343 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
<template> | ||
<div class="w-full box-border h-screen"> | ||
<div class="reveal"> | ||
<div class="slides"> | ||
<section :data-markdown="slidescontent" data-separator="^\r?\n---\r?\n$" data-separator-notes="^Note:" /> | ||
</div> | ||
</div> | ||
</div> | ||
</template> | ||
|
||
<script lang="ts"> | ||
export default { | ||
props: { | ||
slidescontent: { | ||
type: String, | ||
default: 'Missing Document' | ||
} | ||
} | ||
} | ||
</script> | ||
|
||
<script setup lang="ts"> | ||
import RevealMarkdown from 'reveal.js/plugin/markdown/markdown.esm.js' | ||
import RevealNotes from 'reveal.js/plugin/notes/notes.js' | ||
// import RevealMath from 'reveal.js/plugin/math/math.js' | ||
import Search from 'reveal.js/plugin/search/search.esm.js' | ||
import Decorations from '~/layouts/nlesc-decorations.js' | ||
onMounted(() => { | ||
console.log('Slides Mounted'); | ||
// On client side only, dynamically load reveal.js | ||
// (Importing statically causes errors during server side rendering) | ||
if (process.browser) { | ||
import('reveal.js') | ||
.then((revealModule) => { | ||
console.log('Check', revealModule); | ||
const deck = new revealModule.default(); | ||
deck.initialize({ | ||
controls: true, | ||
progress: true, | ||
center: true, | ||
hash: true, | ||
transition: 'none', | ||
embedded: true, | ||
showNotes: true, | ||
plugins: [RevealMarkdown, RevealNotes, Decorations, Search] | ||
}); | ||
console.log('Check', deck); | ||
}); | ||
} | ||
}); | ||
</script> |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.