Interactive horizontal timeline displaying historical events. Made to illustrate the exponential rate of human progress within a larger presentation.
See this page for an alternative, significantly more complete, take on a historical tech tree.
The code is organized as follows:
index.html
- HTML structurestyle.css
- Styling and layoutscript.js
- Timeline class and interactionsscroll.js
- Dynamic scroll speed scaling for adaptive navigationscrollbar.js
- Custom scrollbar with chronological position mappingdata.js
- All timeline data and configuration
It features specialized navigation to smooth out the historical experience:
- Events positioned using deterministic formula based on chronological date and collision detection
- Dynamic speed scaling accelerates through empty millennia for consistent navigation
- Custom scrollbar position maps to historical dates (not pixels) with event indicators and click-to-jump navigation
Display: Open index.html
in browser
Add content: Edit data.js
arrays:
- Event types:
name
,fullName
,color
- Events:
type
,date
,title
,description
, optionalhidden: true
, optionallink: "URL"
, optionalundated: true
- Era titles:
type: "title"
for section headers
Configure: Edit data.js
config object:
fontFamily
: CSS font family for timeline textbaseFontSize
: Base font size for timeline elementsdefaultTitle
: Title displayed before scrolling beginstargetScrollDistance
,scrollFactor
: Control scrolling speed adaptationeventSpacing
: Minimal distance between text blocksfixedSizeScrollbar
: Whentrue
, scrollbar thumb uses fixed 20px size instead of proportional sizing
- double-check all links
eventSpacing
(indata.js
) should be a minimum space between event, the actual margin would be computed from the eventspacing minus the current minimum space between two events on the same side of the bar (computed based on their date difference). That way the visible margin is less a function of the spacing between the events picked.