-
Notifications
You must be signed in to change notification settings - Fork 17
/
README.txt
143 lines (104 loc) · 4.28 KB
/
README.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
Django-TimelineJS
Document history with TimelineJS
Tags: timeline, shortcode, stamen, timeline.verite.co, VeriteCo, HTML5
Use TimelineJS developed by VéritéCo for your Django site. Just load the tags. I'm simply going to copy and adapt the info and docs as per the TimelineJS-Wordpress-Plugin
Description
There are lots of timeline tools on the web but they are almost all either hard on the eyes or hard to use. Create timelines that are at the same time beautiful and intuitive for users
TimelineJS is great for pulling in media from different sources. Just throw in a link from Twitter, YouTube, Flickr, Vimeo, Google Maps or SoundCloud and TimelineJS will format it to fit perfectly. More media types will be supported in the future.
You can use the django admin to add a timeline and populate it with events. You can then embed the Timeline in your templates using this tag: {% load timeline %}{% timeline %}
Installation
pip install django-timelinejs
add 'timelinejs' to your INSTALLED_APPS and run ./manage.py syncdb
add the appropriate urls to your urls.py
create the timelines in admin
use the timelines in your templates
Template Options
Here are some of the options you can set in the config. The template tag will work as following:
{% load timeline %}
{% timeline %} {# will pull the timeline from context['timeline'] if available #}
{% timeline 1 %} {# will pull timeline with pk=1 and load it in the template #}
{% timeline src='/some/link/to/source/json' %} {# will pull the timeline from a json source #}
You can also add the options below:
{% timeline src='1' lang='fr' debug=True font='Rancho-Gudea' %}
Here's more information on the options.
Language
lang Localization default is en Languages available:
en English
fr Français
es Español
de Deutsch
it Italiano
pt-br Português Brazil
pt Português
nl Dutch
cz Czech
dk Danish
id Indonesian
pl Polish
sl Slovenian
ru Russian
sk Slovak
is Icelandic
fo Faroese
kr 월요일
ja 日本語
zh-ch 中文
zh-tw Taiwanese Mandarin
ta தமிழ் - Tamil
ar Arabic May be issues with right to left (need some help here)
mn Mongolian
Help us add more. Grab a copy of a language file and replace it with your language Example language file and find your language's two letter code here
Start at End
start_at_end set to true to start the timeline on the last date. default is false
Start at Slide
start_at_slide You can tell TimelineJS to start at a specific slide number default is 0
Start Zoom Adjust
start_zoom_adjust This will tweak the default zoom level. Equivilent to pressing the zoom in or zoom out button the specified number of times. Negative numbers zoom out. default is 0
Hash Bookmark
hash_bookmark set to true to allow bookmarking slides using the hash tag default is false
Debug
debug Will log events etc to the console. default is false
Map Style Types
Due to recent changes to the Google Maps API, you need a API Key in order to use custom map types. gmap_key: required in order to use maptype
maptype:
Stamen Maps
toner
toner-lines
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
Font Combination Preview:
Font Combination Preview
Best practices
Tips and tricks to best utilize TimelineJS
Keep it light - don’t get bogged down by text or other elements
Pick stories that have a strong chronological narrative. It does not work well for stories that need to jump around in the timeline.
Include events that build up to major occurrences, not just the major events.
Don't overwhelm the user. A timeline with hundreds of events is probably not the best use of the format.
License
This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
Changelog
0.2
First stable release.