Skip to content

Instantly share code, notes, and snippets.

@scott2b
Created March 4, 2019 21:35
Show Gist options
  • Select an option

  • Save scott2b/8faf1f35dc8845be702d8f3a60827914 to your computer and use it in GitHub Desktop.

Select an option

Save scott2b/8faf1f35dc8845be702d8f3a60827914 to your computer and use it in GitHub Desktop.

Revisions

  1. scott2b created this gist Mar 4, 2019.
    32 changes: 32 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,32 @@
    <!DOCTYPE html>
    <html>
    <head>
    <script crossorigin src="https://unpkg.com/react@16.7.0/umd/react.production.min.js"></script>
    <script crossorigin src="https://unpkg.com/react-dom@16.7.0/umd/react-dom.production.min.js"></script>
    <script src="https://unpkg.com/babel-standalone@6.26.0/babel.min.js"></script>
    <link title="timeline-styles" rel="stylesheet" href="https://cdn.knightlab.com/libs/timeline3/latest/css/timeline.css">
    <script src="https://cdn.knightlab.com/libs/timeline3/latest/js/timeline.js"></script>
    <style>
    div#timeline-embed {
    height: 600px;
    }
    </style>
    </head>
    <body>

    <p>Content above React container</p>
    <div id="react-container"></div>
    <p>Content below React container</p>

    <script type="text/babel">
    ReactDOM.render(<div>
    <p>A React-rendered paragraph above Timeline</p>
    <div id="timeline-embed"></div>
    <p>A React-rendered paragraph below Timeline</p>
    </div>,
    document.getElementById('react-container')
    );
    timeline = new TL.Timeline('timeline-embed', 'https://docs.google.com/spreadsheets/d/1cWqQBZCkX9GpzFtxCWHoqFXCHg-ylTVUWlnrdYMzKUI/pubhtml');
    </script>
    </body>
    </html>