Download the PHP package expl0it3r/kirby-timeline without Composer
On this page you can find all versions of the php package expl0it3r/kirby-timeline. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download expl0it3r/kirby-timeline
More information about expl0it3r/kirby-timeline
Files in expl0it3r/kirby-timeline
Package kirby-timeline
Short Description A vertical timeline with category filters and a search for Kirby
License MIT
Informations about the package kirby-timeline
Kirby Timeline
A vertical timeline for Kirby: events on both sides of a line, grouped by year, with category filters and a search.
The events are rendered by PHP, so the timeline is complete without JavaScript. The script adds the filters, the search and folds the details away until an event is clicked.
Installation
Both Composer and git submodules are supported. Built and tested with Kirby 5.
Composer
Git Submodule
Download
Download the repository and copy its files to site/plugins/kirby-timeline.
Usage
Add the field to the blueprint of a page and set your categories, e.g. in site/blueprints/pages/history.yml:
Enter the events in the Panel, or write them directly to the content file:
Then call the snippet in the template, here site/templates/history.php:
That's all you need, the stylesheet and the script are loaded by the snippet. The sections below cover the options in more detail.
Blueprint
The plugin comes with a structure field for the events. Extend it and set the categories of your site:
An event has the following fields:
dateasYYYY,YYYY-MMorYYYY-MM-DD, an event with only a year or a month comes before the dated ones of that year or monthcategoryis one of your optionsmajormarks the event with an accenttitledetailis shown once the event is clickedlabelreplaces the formatted date, e.g. "Second half of 2015"
Snippet
eventsis the structure field, its structure or an array of arrayscategoriesare the filters. A category is either just its label or an array withlabel,shape(diamond,square,circleortriangle) andcolor(any CSS color, alsovar(--something)). Events of a category that isn't listed are left out. Without categories there are no filters and every event is shown.-
groupsare the headings:'year'(default),'none'or your own, as start dates with their headings: placeholderis the placeholder of the searchsearchset tofalseleaves the search outassetsset tofalseskips the tags for the stylesheet and the script, if you'd rather bundle them yourself. Otherwise the first timeline of a page brings them along.
Styling
Everything that depends on the site is a custom property. Set them on .timeline or anywhere above it:
The defaults are made for a dark page.
Languages
The texts of the plugin are translated to English and German. Add or overwrite them in your language files:
License
This software is available under the MIT license, see the license file.