Skip to content

Conversation

@ryan-roemer
Copy link
Member

@ryan-roemer ryan-roemer commented Aug 4, 2017

This feature implements remark style presentations where all you need is a single HTML boilerplate to write an entire presentation!

Status

Waiting on upstream PR #343 -- for a comparison of this vs that branch, see: infra/cleanup...feature/one-page

Changes

  • Switch all script tag links to unpkg
  • Add one-page.html and documentation about how to use. And add src/one-page.js for distribution / use.

Here it is!

With these changes, this will produce a fully working Spectacle presentation, and in one-page.html here we've completely duplicated the base Spectacle example:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width initial-scale=1 user-scalable=no" />
    <title>Spectacle</title>
    <link href="https://fonts.googleapis.com/css?family=Lobster+Two:400,700" rel="stylesheet" type="text/css">
    <link href="https://fonts.googleapis.com/css?family=Open+Sans+Condensed:300,700" rel="stylesheet" type="text/css">
    <link href="https://unpkg.com/prismjs@1/themes/prism-tomorrow.css" rel="stylesheet" type="text/css">
    <link href="https://unpkg.com/normalize.css@7/normalize.css" rel="stylesheet" type="text/css">
    <link href="https://unpkg.com/spectacle/lib/themes/default/index.css" rel="stylesheet" type="text/css">
</head>
<body>
    <div id="root"></div>
    <script src="https://unpkg.com/prismjs@1/prism.js"></script>
    <script src="https://unpkg.com/prismjs@1/components/prism-jsx.min.js"></script>
    <script src="https://unpkg.com/prop-types@15/prop-types.js"></script>
    <script src="https://unpkg.com/react@15/dist/react.js"></script>
    <script src="https://unpkg.com/react-dom@15/dist/react-dom.js"></script>
    <script src="https://unpkg.com/babel-standalone@6/babel.js"></script>
    <script src="https://unpkg.com/spectacle/dist/spectacle.js"></script>
    <script src="https://unpkg.com/spectacle/lib/one-page.js"></script>
    <script type="text/spectacle">
      () => {
        // Your JS Code goes here

        return (
          <Deck>
          {/* Throw in some slides here! */}
          </Deck>
        );
      }
    </script>
</body>
</html>

/cc @kenwheeler

README.md Outdated
<a name="one-page"></a>
## One Page

To aid with speedy development / kicking the tires on spectacle, we suuport using a simple boilerplate HTML page with a bespoke script tage that contains your entire presentation. The rest of the setup will take care of transpiling your React/ESnext code, providing Spectacle, React, and ReactDOM libraries, and being raring to go with a minimum of effort.
Copy link
Contributor

@bmathews bmathews Aug 4, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo: bespoke script tage

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I actually did that twice in the readme. Thanks!

@kenwheeler kenwheeler merged commit d77dca9 into master Aug 7, 2017
@kale-stew kale-stew deleted the feature/one-page branch October 31, 2019 01:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants