Timeline Year Abbreviations

Timeline Year Abbreviations en

Installations 3 Likes 3

This is an ultra simple plugin that adds brackets and a year abbreviation to your timeline. This means you don't need to include it for every timeline element, and only need to write the year number in the date field.

By default, this abbreviation is CE (Common Era).


"What if I would like to change it to something other than CE?"

For this, you simply add the line below to your campaign CSS, and change the part that is bolded (CE).

.timeline-header .text-muted::after { content: " CE )"; }


What if I want it in front instead of behind the number?

If you'd rather have the abbreviation before the year, you can do that too. You simply erase 'CE' and the extra space in the code above, and then also add this:

.timeline-header .text-muted::before { content: "( "; }

Notice how it looks almost the same? This is the line of code for the bracket in front of the year number. Just like 'CE' is in the first line of code, you only need to add it here instead.

So you want to add this to have it in front:

.timeline-header .text-muted::after { content: " )"; }
.timeline-header .text-muted::before { content: "( CE "; }

However at this point you've flipped the plugin around completely because it's only two lines. 😉


"What if I have timelines with unique year abbreviations, like CE and BCE?"

This requires the same as above, but you need to take one extra step.

On any entity's page, you will find the [Copy [ ] mention] button. When you click this button, you will get your entity's advanced mention.
What you need to do is click this button on your timeline, and then copy the number. You'll need this number to tell the code that you want it to be for this timeline only.

Paste the line of code below into your CSS, with your timeline's number inserted where you see '000000'. Then change 'CE' to whatever you need it to be. Do this for each timeline.

.kanka-entity-000000 .timeline-header .text-muted::after { content: " CE )"; }

It should change it to whatever you set it to, as long as it's within the "quotation marks". You can also use this to change the ( ) brackets to [ ] brackets, or whatever else you like.

Latest version v1.0

Released 4 years ago

Initial release.