<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://the.satanic.wiki/index.php?action=history&amp;feed=atom&amp;title=Module%3ATimeline</id>
	<title>Module:Timeline - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://the.satanic.wiki/index.php?action=history&amp;feed=atom&amp;title=Module%3ATimeline"/>
	<link rel="alternate" type="text/html" href="https://the.satanic.wiki/index.php?title=Module:Timeline&amp;action=history"/>
	<updated>2026-04-12T09:33:12Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.0</generator>
	<entry>
		<id>https://the.satanic.wiki/index.php?title=Module:Timeline&amp;diff=11083&amp;oldid=prev</id>
		<title>WikiGOD at 06:08, 2 May 2021</title>
		<link rel="alternate" type="text/html" href="https://the.satanic.wiki/index.php?title=Module:Timeline&amp;diff=11083&amp;oldid=prev"/>
		<updated>2021-05-02T06:08:26Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 06:08, 2 May 2021&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l9&quot;&gt;Line 9:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 9:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;-- Dependencies&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;-- Dependencies&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;local colors = require(&#039;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Dev&lt;/del&gt;:Colors&#039;)&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;local colors = require(&#039;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Module&lt;/ins&gt;:Colors&#039;)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;local entrypoint = require(&#039;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Dev&lt;/del&gt;:Entrypoint&#039;)&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;local entrypoint = require(&#039;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Module&lt;/ins&gt;:Entrypoint&#039;)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;-- Constants&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;-- Constants&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key zzegtzyr_mw19226-mwjf_:diff:1.41:old-10964:rev-11083:php=table --&gt;
&lt;/table&gt;</summary>
		<author><name>WikiGOD</name></author>
	</entry>
	<entry>
		<id>https://the.satanic.wiki/index.php?title=Module:Timeline&amp;diff=10964&amp;oldid=prev</id>
		<title>WikiGOD: 1 revision imported</title>
		<link rel="alternate" type="text/html" href="https://the.satanic.wiki/index.php?title=Module:Timeline&amp;diff=10964&amp;oldid=prev"/>
		<updated>2021-04-30T02:24:04Z</updated>

		<summary type="html">&lt;p&gt;1 revision imported&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 02:24, 30 April 2021&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;4&quot; class=&quot;diff-notice&quot; lang=&quot;en&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;!-- diff cache key zzegtzyr_mw19226-mwjf_:diff:1.41:old-10963:rev-10964 --&gt;
&lt;/table&gt;</summary>
		<author><name>WikiGOD</name></author>
	</entry>
	<entry>
		<id>https://the.satanic.wiki/index.php?title=Module:Timeline&amp;diff=10963&amp;oldid=prev</id>
		<title>Mediawiki&gt;Siroopwafel: module:entrypoint</title>
		<link rel="alternate" type="text/html" href="https://the.satanic.wiki/index.php?title=Module:Timeline&amp;diff=10963&amp;oldid=prev"/>
		<updated>2020-04-03T23:27:32Z</updated>

		<summary type="html">&lt;p&gt;&lt;a href=&quot;/index.php/Module:Entrypoint&quot; title=&quot;Module:Entrypoint&quot;&gt;module:entrypoint&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;-- Module: Timeline&lt;br /&gt;
-- Author: [[User:DuckeyD]]&lt;br /&gt;
-- Inspired by: EasyTimeline by Erik Zachte&lt;br /&gt;
-- Version: 1.1&lt;br /&gt;
&lt;br /&gt;
-- &amp;lt;nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
local Timeline = {}&lt;br /&gt;
&lt;br /&gt;
-- Dependencies&lt;br /&gt;
local colors = require(&amp;#039;Dev:Colors&amp;#039;)&lt;br /&gt;
local entrypoint = require(&amp;#039;Dev:Entrypoint&amp;#039;)&lt;br /&gt;
&lt;br /&gt;
-- Constants&lt;br /&gt;
local YEAR_LENGTH = 60 * 60 * 24 * 365.2&lt;br /&gt;
local MONTH_LENGTH = 60 * 60 * 24 * 30.44&lt;br /&gt;
&lt;br /&gt;
-- Template function&lt;br /&gt;
Timeline.main = entrypoint(Timeline)&lt;br /&gt;
&lt;br /&gt;
-- Main invokable function&lt;br /&gt;
function Timeline.create(frame)&lt;br /&gt;
    -- Load config from a given module&lt;br /&gt;
    local conf = mw.loadData(&amp;#039;Module:&amp;#039;..assert(frame.args[1], &amp;#039;Config module not passed as a frame argument&amp;#039;))&lt;br /&gt;
    local container = mw.html.create(&amp;#039;div&amp;#039;)&lt;br /&gt;
&lt;br /&gt;
    -- Style parameters&lt;br /&gt;
    local background_color = colors.parse(&amp;#039;$color-text&amp;#039;):invert()&lt;br /&gt;
    local text_color = colors.params[&amp;#039;color-text&amp;#039;]&lt;br /&gt;
    local timeline_padding = 4&lt;br /&gt;
    local labels_width = 120&lt;br /&gt;
    local bar_height = 16&lt;br /&gt;
    local bar_margin = 8&lt;br /&gt;
    local chart_margin = 10&lt;br /&gt;
    local chart_major = colors.params[&amp;#039;color-text&amp;#039;]&lt;br /&gt;
    local chart_minor = colors.parse(&amp;#039;$color-text&amp;#039;):alpha(50):hex()&lt;br /&gt;
    local bar_background = background_color&lt;br /&gt;
    local bar_alpha = 40&lt;br /&gt;
    local legend_columns = 3&lt;br /&gt;
&lt;br /&gt;
    -- Visibility parameters&lt;br /&gt;
    local timeline_hidden = false&lt;br /&gt;
    local legend_hidden = false&lt;br /&gt;
    local background_hidden = false&lt;br /&gt;
&lt;br /&gt;
    -- Custom styling from config&lt;br /&gt;
    if conf.style then&lt;br /&gt;
        if conf.style.background_color then background_color = colors.parse(conf.style.background_color) end -- CSS Color&lt;br /&gt;
        if conf.style.text_color then text_color = conf.style.text_color end -- CSS Color&lt;br /&gt;
        if conf.style.timeline_padding then timeline_padding = conf.style.timeline_padding end -- number&lt;br /&gt;
        if conf.style.labels_width then labels_width = conf.style.labels_width end -- number&lt;br /&gt;
        if conf.style.bar_height then bar_height = conf.style.bar_height end -- number&lt;br /&gt;
        if conf.style.bar_margin then bar_margin = conf.style.bar_margin end -- number&lt;br /&gt;
        if conf.style.chart_margin then chart_margin = conf.style.chart_margin end -- number&lt;br /&gt;
        if conf.style.chart_major then chart_major = conf.style.chart_major end -- CSS Color&lt;br /&gt;
        if conf.style.chart_minor then chart_minor = conf.style.chart_minor end -- CSS Color&lt;br /&gt;
        if conf.style.bar_background then bar_background = conf.style.bar_background end -- CSS Color&lt;br /&gt;
        if conf.style.bar_alpha then bar_alpha = conf.style.bar_alpha end -- number&lt;br /&gt;
        if conf.style.legend_columns then legend_columns = conf.style.legend_columns end -- number&lt;br /&gt;
        -- conf.style.label_format -- string&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    -- Custom visibility settings from config&lt;br /&gt;
    if conf.hidden then&lt;br /&gt;
        if conf.hidden.timeline then timeline_hidden = conf.hidden.timeline end&lt;br /&gt;
        if conf.hidden.legend then legend_hidden = conf.hidden.legend end&lt;br /&gt;
        if conf.hidden.background then background_hidden = conf.hidden.background end&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    local chart_width = 700 - (labels_width + timeline_padding*2 + chart_margin)&lt;br /&gt;
&lt;br /&gt;
    -- Root element styling&lt;br /&gt;
    container:css({&lt;br /&gt;
        [&amp;#039;box-sizing&amp;#039;] = &amp;#039;border-box&amp;#039;,&lt;br /&gt;
        [&amp;#039;display&amp;#039;] = &amp;#039;flex&amp;#039;,&lt;br /&gt;
        [&amp;#039;width&amp;#039;] = &amp;#039;700px&amp;#039;,&lt;br /&gt;
        [&amp;#039;padding&amp;#039;] = timeline_padding..&amp;#039;px&amp;#039;,&lt;br /&gt;
        [&amp;#039;background-color&amp;#039;] = background_color:hex(),&lt;br /&gt;
        [&amp;#039;color&amp;#039;] = text_color,&lt;br /&gt;
        [&amp;#039;flex-wrap&amp;#039;] = &amp;#039;wrap&amp;#039;,&lt;br /&gt;
        [&amp;#039;margin&amp;#039;] = (timeline_padding*3)..&amp;#039;px 0&amp;#039;&lt;br /&gt;
    })&lt;br /&gt;
&lt;br /&gt;
    -- Separator for Mercury&lt;br /&gt;
    container:node(mercuryOnly(mw.html.create(&amp;#039;hr&amp;#039;)))&lt;br /&gt;
&lt;br /&gt;
    -- Labels&lt;br /&gt;
    local labels = mw.html.create(&amp;#039;div&amp;#039;)&lt;br /&gt;
        &lt;br /&gt;
    labels:css({&lt;br /&gt;
        [&amp;#039;width&amp;#039;] = labels_width..&amp;#039;px&amp;#039;,&lt;br /&gt;
        [&amp;#039;text-align&amp;#039;] = &amp;#039;right&amp;#039;,&lt;br /&gt;
        [&amp;#039;line-height&amp;#039;] = bar_height..&amp;#039;px&amp;#039;,&lt;br /&gt;
        [&amp;#039;font-size&amp;#039;] = (0.75 * bar_height)..&amp;#039;px&amp;#039;&lt;br /&gt;
    })&lt;br /&gt;
&lt;br /&gt;
    for _, label in pairs(assert(conf.dataset, &amp;#039;No dataset found in config&amp;#039;)) do&lt;br /&gt;
        local label_elem = mw.html.create(&amp;#039;div&amp;#039;):css({&lt;br /&gt;
            [&amp;#039;height&amp;#039;] = bar_height..&amp;#039;px&amp;#039;,&lt;br /&gt;
            [&amp;#039;margin&amp;#039;] = bar_margin..&amp;#039;px 0&amp;#039;&lt;br /&gt;
        })&lt;br /&gt;
        local oasis_elem = oasisOnly(mw.html.create(&amp;#039;span&amp;#039;))&lt;br /&gt;
        local mercury_elem = mercuryOnly(mw.html.create(&amp;#039;span&amp;#039;))&lt;br /&gt;
&lt;br /&gt;
        -- Custom label formatting - add style.label_format string containing &amp;quot;$name&amp;quot; to config&lt;br /&gt;
        if conf.style and conf.style.label_format then&lt;br /&gt;
            oasis_elem:wikitext((string.gsub(conf.style.label_format, &amp;#039;$name&amp;#039;, (assert(label.name, &amp;#039;No &amp;quot;name&amp;quot; on label &amp;#039;.._)))))&lt;br /&gt;
            mercury_elem:wikitext(&amp;#039;&amp;lt;br&amp;gt;\&amp;#039;\&amp;#039;\&amp;#039;&amp;#039;..string.gsub(conf.style.label_format, &amp;#039;$name&amp;#039;, label.name)..&amp;#039;\&amp;#039;\&amp;#039;\&amp;#039;&amp;#039;)&lt;br /&gt;
        else&lt;br /&gt;
            oasis_elem:wikitext((assert(label.name, &amp;#039;No &amp;quot;name&amp;quot; on label &amp;#039;.._)))&lt;br /&gt;
            mercury_elem:wikitext(&amp;#039;&amp;lt;br&amp;gt;\&amp;#039;\&amp;#039;\&amp;#039;&amp;#039;..label.name..&amp;#039;\&amp;#039;\&amp;#039;\&amp;#039;&amp;#039;)&lt;br /&gt;
        end&lt;br /&gt;
        label_elem:node(oasis_elem)&lt;br /&gt;
        label_elem:node(mercury_elem)&lt;br /&gt;
        &lt;br /&gt;
        -- Main Mercury design&lt;br /&gt;
        local mercury_list = mercuryOnly(mw.html.create(&amp;#039;ul&amp;#039;))&lt;br /&gt;
        for _, bar in ipairs(assert(label.bars, &amp;#039;No &amp;quot;bars&amp;quot; on label &amp;#039;..label.name)) do&lt;br /&gt;
            if assert(assert(conf.bar_types, &amp;#039;No bar_types defined in config&amp;#039;)[assert(bar.bar_type, &amp;#039;No &amp;quot;bar_type&amp;quot; key on a bar in label &amp;#039;..label.name)], &amp;#039;Bar type &amp;#039;..bar.bar_type..&amp;#039; not found&amp;#039;).legend then&lt;br /&gt;
                local mercury_from = os.date(&amp;#039;%d/%m/%Y&amp;#039;, dateToTimestamp(assert(bar.from, &amp;#039;No &amp;quot;from&amp;quot; key on a bar in label &amp;#039;..label.name), conf))&lt;br /&gt;
                local mercury_till = os.date(&amp;#039;%d/%m/%Y&amp;#039;, dateToTimestamp(assert(bar.till, &amp;#039;No &amp;quot;till&amp;quot; key on a bar in label &amp;#039;..label.name), conf))&lt;br /&gt;
                local mercury_label = conf.bar_types[bar.bar_type].legend&lt;br /&gt;
                mercury_list:node(mw.html.create(&amp;#039;li&amp;#039;):wikitext(mercury_label..&amp;#039;:&amp;lt;br&amp;gt;&amp;#039;..mercury_from..&amp;#039; – &amp;#039;..mercury_till))&lt;br /&gt;
            end&lt;br /&gt;
        end&lt;br /&gt;
        label_elem:node(mercury_list)&lt;br /&gt;
&lt;br /&gt;
        labels:node(label_elem)&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    container:node(labels)&lt;br /&gt;
&lt;br /&gt;
    -- Chart&lt;br /&gt;
    local chart = oasisOnly(mw.html.create(&amp;#039;div&amp;#039;))&lt;br /&gt;
&lt;br /&gt;
    chart:css({&lt;br /&gt;
        [&amp;#039;width&amp;#039;] = chart_width..&amp;#039;px&amp;#039;,&lt;br /&gt;
        [&amp;#039;margin-left&amp;#039;] = (chart_margin-1)..&amp;#039;px&amp;#039;,&lt;br /&gt;
        [&amp;#039;border-left&amp;#039;] = &amp;#039;1px solid &amp;#039;..chart_major,&lt;br /&gt;
        [&amp;#039;border-bottom&amp;#039;] = &amp;#039;1px solid &amp;#039;..chart_major&lt;br /&gt;
    })&lt;br /&gt;
&lt;br /&gt;
    if not background_hidden then&lt;br /&gt;
        local chart_bg, chart_offset = generateBackground(&lt;br /&gt;
            assert(conf.from, &amp;#039;No &amp;quot;from&amp;quot; key found in config&amp;#039;),&lt;br /&gt;
            assert(conf.till, &amp;#039;No &amp;quot;till&amp;quot; key found in config&amp;#039;),&lt;br /&gt;
            chart_width, chart_major, chart_minor&lt;br /&gt;
        )&lt;br /&gt;
        chart:css({&lt;br /&gt;
            [&amp;#039;background-image&amp;#039;] = chart_bg,&lt;br /&gt;
            [&amp;#039;background-position-x&amp;#039;] = chart_offset&lt;br /&gt;
        })&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    local chart_from = dateToTimestamp(conf.from)&lt;br /&gt;
    local chart_till = dateToTimestamp(conf.till)&lt;br /&gt;
&lt;br /&gt;
    local chart_diff = chart_till - chart_from&lt;br /&gt;
&lt;br /&gt;
    bar_background:alpha(bar_alpha)&lt;br /&gt;
&lt;br /&gt;
    -- Chart bars&lt;br /&gt;
    for _, label in pairs(conf.dataset) do&lt;br /&gt;
        local bar_container = mw.html.create(&amp;#039;div&amp;#039;):css({&lt;br /&gt;
            [&amp;#039;height&amp;#039;] = bar_height..&amp;#039;px&amp;#039;,&lt;br /&gt;
            [&amp;#039;margin&amp;#039;] = bar_margin..&amp;#039;px 0&amp;#039;,&lt;br /&gt;
            [&amp;#039;background-color&amp;#039;] = bar_background:rgb(),&lt;br /&gt;
            [&amp;#039;position&amp;#039;] = &amp;#039;relative&amp;#039;&lt;br /&gt;
        })&lt;br /&gt;
&lt;br /&gt;
        for _, bar in ipairs(label.bars) do&lt;br /&gt;
            local bar_from = dateToTimestamp(bar.from, conf)&lt;br /&gt;
            local bar_till = dateToTimestamp(bar.till, conf)&lt;br /&gt;
    &lt;br /&gt;
            bar_container:node(mw.html.create(&amp;#039;div&amp;#039;):css({&lt;br /&gt;
                [&amp;#039;height&amp;#039;] = bar_height..&amp;#039;px&amp;#039;,&lt;br /&gt;
                [&amp;#039;background&amp;#039;] = assert(conf.bar_types[bar.bar_type].color, &amp;#039;No color on bar type &amp;#039;..bar.bar_type),&lt;br /&gt;
                [&amp;#039;position&amp;#039;] = &amp;#039;absolute&amp;#039;,&lt;br /&gt;
                [&amp;#039;left&amp;#039;] = (((bar_from - chart_from)/chart_diff)*chart_width)..&amp;#039;px&amp;#039;,&lt;br /&gt;
                [&amp;#039;right&amp;#039;] = (((chart_till - bar_till)/chart_diff)*chart_width)..&amp;#039;px&amp;#039;&lt;br /&gt;
            }))&lt;br /&gt;
        end&lt;br /&gt;
        &lt;br /&gt;
        chart:node(bar_container)&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    container:node(chart)&lt;br /&gt;
&lt;br /&gt;
    -- Timeline&lt;br /&gt;
    if not timeline_hidden then&lt;br /&gt;
        local chart_timeline = mw.html.create(&amp;#039;div&amp;#039;):css({&lt;br /&gt;
            [&amp;#039;width&amp;#039;] = chart_width..&amp;#039;px&amp;#039;,&lt;br /&gt;
            [&amp;#039;height&amp;#039;] = (0.75 * bar_height)..&amp;#039;px&amp;#039;,&lt;br /&gt;
            [&amp;#039;line-height&amp;#039;] = (0.75 * bar_height)..&amp;#039;px&amp;#039;,&lt;br /&gt;
            [&amp;#039;margin-left&amp;#039;] = (labels_width + chart_margin)..&amp;#039;px&amp;#039;,&lt;br /&gt;
            [&amp;#039;font-size&amp;#039;] = (0.625 * bar_height)..&amp;#039;px&amp;#039;,&lt;br /&gt;
            [&amp;#039;position&amp;#039;] = &amp;#039;relative&amp;#039;&lt;br /&gt;
        })&lt;br /&gt;
&lt;br /&gt;
        for i = math.floor(chart_from/YEAR_LENGTH) + 1, math.floor(chart_till/YEAR_LENGTH), 1 do&lt;br /&gt;
            chart_timeline:node(mw.html.create(&amp;#039;div&amp;#039;):wikitext(1970+i):css({&lt;br /&gt;
                [&amp;#039;position&amp;#039;] = &amp;#039;absolute&amp;#039;,&lt;br /&gt;
                [&amp;#039;left&amp;#039;] = (((dateToTimestamp(&amp;#039;01/01/&amp;#039;..(1970+i)) - chart_from)/chart_diff)*chart_width)..&amp;#039;px&amp;#039;,&lt;br /&gt;
                [&amp;#039;transform&amp;#039;] = &amp;#039;translate(-50%, 0)&amp;#039;&lt;br /&gt;
            }))&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
        container:node(oasisOnly(chart_timeline))&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    -- Legend&lt;br /&gt;
    if not legend_hidden then&lt;br /&gt;
        local legend = mw.html.create(&amp;#039;div&amp;#039;):css({&lt;br /&gt;
            [&amp;#039;margin-top&amp;#039;] = bar_height..&amp;#039;px&amp;#039;,&lt;br /&gt;
            [&amp;#039;margin-left&amp;#039;] = (labels_width + chart_margin)..&amp;#039;px&amp;#039;,&lt;br /&gt;
            [&amp;#039;font-size&amp;#039;] = (0.75*bar_height)..&amp;#039;px&amp;#039;,&lt;br /&gt;
            [&amp;#039;width&amp;#039;] = chart_width..&amp;#039;px&amp;#039;,&lt;br /&gt;
            [&amp;#039;display&amp;#039;] = &amp;#039;flex&amp;#039;,&lt;br /&gt;
            [&amp;#039;flex-wrap&amp;#039;] = &amp;#039;wrap&amp;#039;&lt;br /&gt;
        })&lt;br /&gt;
&lt;br /&gt;
        for _, bar_type in pairs(conf.bar_types) do&lt;br /&gt;
            if bar_type.legend then&lt;br /&gt;
                local label_elem = mw.html.create(&amp;#039;div&amp;#039;):css({&lt;br /&gt;
                    [&amp;#039;display&amp;#039;] = &amp;#039;flex&amp;#039;,&lt;br /&gt;
                    [&amp;#039;align-items&amp;#039;] = &amp;#039;center&amp;#039;,&lt;br /&gt;
                    [&amp;#039;height&amp;#039;] = bar_height..&amp;#039;px&amp;#039;,&lt;br /&gt;
                    [&amp;#039;width&amp;#039;] = (100/legend_columns)..&amp;#039;%&amp;#039;&lt;br /&gt;
                })&lt;br /&gt;
                label_elem:node(mw.html.create(&amp;#039;div&amp;#039;):css({&lt;br /&gt;
                    [&amp;#039;width&amp;#039;] = (0.75*bar_height)..&amp;#039;px&amp;#039;,&lt;br /&gt;
                    [&amp;#039;height&amp;#039;] = (0.75*bar_height)..&amp;#039;px&amp;#039;,&lt;br /&gt;
                    [&amp;#039;background&amp;#039;] = bar_type.color,&lt;br /&gt;
                    [&amp;#039;margin-right&amp;#039;] = (bar_margin/2)..&amp;#039;px&amp;#039;&lt;br /&gt;
                }))&lt;br /&gt;
                if bar_type.order then&lt;br /&gt;
                    label_elem:css(&amp;#039;order&amp;#039;, bar_type.order)&lt;br /&gt;
                end&lt;br /&gt;
                label_elem:wikitext(bar_type.legend)&lt;br /&gt;
                legend:node(label_elem)&lt;br /&gt;
            end&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
        container:node(oasisOnly(legend))&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    -- Separator for Mercury&lt;br /&gt;
    container:node(mercuryOnly(mw.html.create(&amp;#039;br&amp;#039;)))&lt;br /&gt;
    container:node(mercuryOnly(mw.html.create(&amp;#039;hr&amp;#039;)))&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    return container&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- Helper functions&lt;br /&gt;
function generateBackground(from, till, width, year_color, month_color)&lt;br /&gt;
    local start_date = dateToTimestamp(from)&lt;br /&gt;
    local end_date = dateToTimestamp(till)&lt;br /&gt;
&lt;br /&gt;
    local diff = end_date - start_date&lt;br /&gt;
    local background = &amp;#039;repeating-linear-gradient(to right, transparent&amp;#039;&lt;br /&gt;
&lt;br /&gt;
    local month_multiplier = (MONTH_LENGTH*width)/diff&lt;br /&gt;
&lt;br /&gt;
    for i = 1, 11, 1 do&lt;br /&gt;
        background = background..generateBar(i * month_multiplier, month_color)&lt;br /&gt;
    end&lt;br /&gt;
    background = background..generateBar(12 * month_multiplier, year_color)..&amp;#039;)&amp;#039;&lt;br /&gt;
    &lt;br /&gt;
    local offset = (start_date % YEAR_LENGTH)*width/diff&lt;br /&gt;
    offset = &amp;#039;-&amp;#039;..offset..&amp;#039;px&amp;#039;&lt;br /&gt;
    &lt;br /&gt;
    return background, offset&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function generateBar(pos, bar)&lt;br /&gt;
    pos = math.floor(pos)&lt;br /&gt;
    return &amp;#039;, transparent &amp;#039;..pos..&amp;#039;px, &amp;#039;..bar..&amp;#039; &amp;#039;..pos..&amp;#039;px, &amp;#039;..bar..&amp;#039; &amp;#039;..(pos+1)..&amp;#039;px, transparent &amp;#039;..(pos+1)..&amp;#039;px&amp;#039;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function mercuryOnly(elem)&lt;br /&gt;
    return elem:css(&amp;#039;display&amp;#039;, &amp;#039;none !important&amp;#039;)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function oasisOnly(elem)&lt;br /&gt;
    return elem:addClass(&amp;#039;mobile-hidden&amp;#039;)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function dateToTimestamp(d, conf)&lt;br /&gt;
    if d == &amp;#039;now&amp;#039; then&lt;br /&gt;
        return os.time()&lt;br /&gt;
    end&lt;br /&gt;
    if d == &amp;#039;start&amp;#039; and conf.from then&lt;br /&gt;
        return dateToTimestamp(conf.from)&lt;br /&gt;
    end&lt;br /&gt;
    if d == &amp;#039;end&amp;#039; and conf.till then&lt;br /&gt;
        return dateToTimestamp(conf.till)&lt;br /&gt;
    end&lt;br /&gt;
    return os.time({&lt;br /&gt;
        year = d:sub(7, 10),&lt;br /&gt;
        month = d:sub(4, 5),&lt;br /&gt;
        day = d:sub(1, 2),&lt;br /&gt;
        hour = 0, min = 0, sec = 0&lt;br /&gt;
    })&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
return Timeline&lt;br /&gt;
&lt;br /&gt;
-- &amp;lt;/nowiki&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mediawiki&gt;Siroopwafel</name></author>
	</entry>
</feed>