Skip to content

teesloane/ootliner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Small utility to add a floating table of contents a la Dropbox Paper



To add Ootliner to your page...

If you use a module bundler

install Ootliner with npm:

npm install --save ootliner

Then import the module, below is an example of using ootliner in a gatsby blog.

import ootliner from 'ootliner'

class BlogPostTemplate extends React.Component {
  componentDidMount() {
    ootliner()
  }
  
// ...

Just drop in the script (not using module bundler)

<script src="https://unpkg.com/ootliner@0.0.2/lib/index.js "></script>
<script> ootliner()</script>

Development

git clone https://github.com/teesloane/ootliner.git
cd ootliner
npm install
npm run dev
# Open ./example/index.html to view Ootliner in use.