fantasycalendar / obsidian-fantasy-calendar

MIT License
175 stars 7 forks source link

Fc timelines #102

Closed ebullient closed 1 year ago

ebullient commented 1 year ago

Resolves https://github.com/fantasycalendar/obsidian-fantasy-calendar/issues/97

Given a Timeline span or div with attributes:

<span
    class='ob-timelines'          // ignored (obsidian timelines plugin format)
    data-type='range'             // ignored (obsidian timelines plugin format)
    data-date='144-43-49-00'      // ignored (obsidian timelines plugin format)
    data-end='2000-10-20-00'      // ignored (obsidian timelines plugin format)
    data-fc-date='144-Ches'       // FC: short/mixed (day, hour assumed 0)
    data-fc-end='144-Ches-03-07'  // FC: long/mixed
    data-title='Another Event'
    data-class='orange'
    data-img = 'Timeline Example/Timeline_2.jpg'>
    Event description
</span>

FC Timeline date form has at most 4 segments. The last (if present) is used to order events with the same year, month, and day.

Code is there for setting the format globally, and per-calendar (though per-calendar is not yet exposed in config settings)