This example shows a timeline in light color:
It has been initialized with the following script:
<script>
const myTimeline1 = new MastodonTimeline({
mtContainerId: "mt-container-01",
defaultTheme: "light",
});
</script>
This example shows a timeline in dark color:
It has been initialized with the following script:
<script>
const myTimeline2 = new MastodonTimeline({
mtContainerId: "mt-container-02",
defaultTheme: "dark",
});
</script>
You can change your timeline color calling the function mtColorTheme()
<button onclick="myTimeline1.mtColorTheme('dark')">
Switch 1st timeline to dark theme
</button>
<button onclick="myTimeline2.mtColorTheme('light')">
Switch 2nd timeline to light theme
</button>