Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add gatsby-theme-present #122

Closed
wants to merge 6 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update present.js
  • Loading branch information
LocTran016 committed Nov 24, 2020
commit bb44c914bab5b637462ecf87c8d2d92c107a6db2
30 changes: 27 additions & 3 deletions packages/gatsby-theme-present/src/present.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 20,16 @@ export const Present = ({
<link rel="stylesheet" href={"https://cdn.jsdelivr.net/npm/reveal.js@latest/dist/theme/" {slideTheme} ".css"} />
<link rel="stylesheet" href={"https://cdn.jsdelivr.net/npm/reveal.js@latest/plugin/highlight/" {slideCodeTheme} ".css"} />
</Helmet>
<Div className="reveal"><Div class="slides">
<Div className="reveal"><Div className="slides">
<MDXRenderer><Section data-markdown><Textarea data-template>{body}</Textarea></Section></MDXRenderer>
</Div></Div>
</Div></Div> {/*Slide contents go here*/}
<Script src="https://cdn.jsdelivr.net/npm/reveal.js@latest/dist/reveal.js"></Script>
<Script src="https://cdn.jsdelivr.net/npm/reveal.js@latest/plugin/zoom/zoom.js"></Script>
<Script src="https://cdn.jsdelivr.net/npm/reveal.js@latest/plugin/notes/notes.js"></Script>
<Script src="https://cdn.jsdelivr.net/npm/reveal.js@latest/plugin/math/math.js"></Script>
<Script src="https://cdn.jsdelivr.net/npm/reveal.js@latest/plugin/markdown/markdown.js"></Script>
<Script src="https://cdn.jsdelivr.net/npm/reveal.js@latest/plugin/highlight/highlight.js"></Script>
{slidePlugin}
{slidePlugin} {/*Adding some reveal.js plugins*/}
{/* <Script
dangerouslySetInnerHTML={{
__html: `
Expand Down Expand Up @@ -75,3 75,27 @@ export const Present = ({
export const revealConfig = ({ pageContext }) => {
__html: {pageContext.themeOptions.slide.config}
}
{/* Reveal.js Configs, may look like this
Reveal.initialize({
mouseWheel: true,
autoSlide: true,
loop: false,
progress: false,
showNotes: true,
autoPlayMedia: true,
markdown: {
smartypants: true
},
plugins: [
RevealMarkdown,
// Markdown
RevealHighlight
// Search
RevealSearch,
// Speaker notes
RevealNotes,
// Zoom in and out with Alt click
RevealZoom,
// MathJax
RevealMath
]})*/}