Browse Source

Update documentation to include new embed, font options and maptypes

pull/75/head
Zach Wise 13 years ago
parent
commit
dfb6d832ea
  1. 115
      README.markdown

115
README.markdown

@ -15,32 +15,57 @@ JSON.
## Add it to your site ## Add it to your site
### Step 1 Place the embed code where you want the timeline to show in the `<body>` of your site.
` <!-- BEGIN Timeline Embed -->
Include these lines in the `<head>` of your site. <div id="timeline-embed"></div>
<script type="text/javascript">
`<!-- CSS --> var timeline_config = {
<link href="timeline.css" rel="stylesheet"> width: "100%",
height: "100%",
<!-- JavaScript --> source: 'path_to_json/or_link_to_googlespreadsheet',
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script> font: 'Bevan-PotanoSans', //OPTIONAL
<script type="text/javascript" src="timeline-min.js"></script>` maptype: 'Bevan-PotanoSans', //OPTIONAL
css: 'path_to_css/timeline.css', //OPTIONAL
### Step 2 js: 'path_to_js/timeline.js' //OPTIONAL
}
Add a `<div>` with an id called “timeline” in the `<body>` of your site. </script>
<script type="text/javascript" src="path_to_js/timeline-embed.js"></script>
`<div id="timeline"></div>` <!-- END Timeline Embed -->`
### Step 3 ## Options
Initialize the data source in either the `<head>` or the `<body>`
` <script> * Map Style Types `maptype:`
$(document).ready(function() {
timeline = new VMM.Timeline(); * [Stamen Maps ](maps.stamen.com)
timeline.init("your_data.json"); * `toner`
}); * `toner-lines`
</script>` * `toner-labels`
* `watercolor`
* `sterrain`
* Google Maps
* `ROADMAP`
* `TERRAIN`
* `HYBRID`
* `SATELLITE`
* Font Options `font:`
* `Arvo-PTSans`
* `Merriweather-NewsCycle`
* `PoiretOne-Molengo`
* `PTSerif-PTSans`
* `DroidSerif-DroidSans`
* `Lekton-Molengo`
* `NixieOne-Ledger`
* `AbrilFatface-Average`
* `PlayfairDisplay-Muli`
* `Rancho-Gudea`
* `Bevan-PotanoSans`
* `BreeSerif-OpenSans`
* `SansitaOne-Kameron`
* `Pacifico-Arimo`
* Or make your own
## File Formats ## File Formats
@ -59,44 +84,44 @@ If you don’t want to mess with JSON, fire up Google Docs and build your
timeline in a spreadsheet. It’s as simple as dropping a date, text, and links timeline in a spreadsheet. It’s as simple as dropping a date, text, and links
into the appropriate columns in Timeline’s template. into the appropriate columns in Timeline’s template.
You can find the template here: [https://docs.google.com/a/digitalartwork.net/previewtemplate?id=0AppSVxABhnltdEhzQjQ4MlpOaldjTmZLclQxQWFTOUE&mode=public](https://docs.google.com/a/digitalartwork.net/previewtemplate?id=0AppSVxABhnltdEhzQjQ4MlpOaldjTmZLclQxQWFTOUE&mode=public) You can find the template here: [Timeline Google Spreadsheet Template](https://docs.google.com/a/digitalartwork.net/previewtemplate?id=0AppSVxABhnltdEhzQjQ4MlpOaldjTmZLclQxQWFTOUE&mode=public)
There are only four things you need to know in order to create a timeline There are only four things you need to know in order to create a timeline
using Google Docs: using Google Docs:
1. Make the spreadsheet public: 1. Make the spreadsheet public:
Google Docs are automatically set to private but the spreadsheet must be Google Docs are automatically set to private but the spreadsheet must be
public. public.
Click the blue “Share” button on the top right-hand corner. In the “Share Click the blue “Share” button on the top right-hand corner. In the “Share
settings” window, you’ll see the private setting of the spreadsheet: click settings” window, you’ll see the private setting of the spreadsheet: click
“Change...”. In the Visibility options window, choose “Public on the Web” and “Change...”. In the Visibility options window, choose “Public on the Web” and
save. save.
2. Publish to the Web 2. Publish to the Web
Under the File menu, select “Publish to the Web.” Under the File menu, select “Publish to the Web.”
In the next window, check the box next to “Automatically republish when In the next window, check the box next to “Automatically republish when
changes are made.” Uncheck all other boxes. Click “start publishing.” This changes are made.” Uncheck all other boxes. Click “start publishing.” This
will give you the URL to embed in your HTML file. will give you the URL to embed in your HTML file.
3. Copy/paste the Web URL into your Timeline HTML file 3. Copy/paste the Web URL into your Timeline HTML file
After you publish the spreadsheet, Google Docs will generate a link to the After you publish the spreadsheet, Google Docs will generate a link to the
file. Copy the link for the Web Page option (as opposed to PDF, HTML, XLS, file. Copy the link for the Web Page option (as opposed to PDF, HTML, XLS,
etc.), then paste it into the timeline’s HTML file: etc.), then paste it into the timeline’s HTML file:
`timeline.init(“URL goes here”)` `timeline.init(“URL goes here”)`
4. Designate the “start” slide 4. Designate the “start” slide
This indicates which event is the title slide, the one that begins the This indicates which event is the title slide, the one that begins the
timeline. timeline.
Only one should be labeled "start" (generally, the first one). The title slide Only one should be labeled "start" (generally, the first one). The title slide
must have a start date, headline and text to appear properly. must have a start date, headline and text to appear properly.
## Media ## Media

Loading…
Cancel
Save