Kresimiria Map of District Control over Time
๐
Map of District Control over Time
This interactive map allows you to explore the party control of Kresimirian districts for every regular election from 1922 to 2022. Use the slider or buttons below to switch between years and see how district control has changed over time.
Year: 1922
Previous
Next
Key
For more details on each election, see each election page.
\n\n
Key \n\n
\n\n
For more details on each election, see each election page.
\n" // Grabs raw markdown, bypassing rendered HTML!
};
// 2. Construct the Front Matter
const frontMatterLines = [
'---',
'layout: post',
`title: "${articleData.title}"`,
`categories: ${articleData.categories ? articleData.categories.join(", ") : ""}`
];
if (articleData.infobox) {
frontMatterLines.push('infobox:');
if (articleData.infobox.title) frontMatterLines.push(` title: "${articleData.infobox.title}"`);
if (articleData.infobox.image) frontMatterLines.push(` image: "${articleData.infobox.image}"`);
if (articleData.infobox.caption) frontMatterLines.push(` caption: "${articleData.infobox.caption}"`);
if (articleData.infobox.data && articleData.infobox.data.length > 0) {
frontMatterLines.push(' data:');
articleData.infobox.data.forEach(item => {
frontMatterLines.push(` - label: "${item.label}"`);
frontMatterLines.push(` value: "${item.value}"`);
});
}
}
frontMatterLines.push('---', '');
// 3. Construct the Body (Using raw markdown, no DOM scraping)
const bodyLines = [
`# ${articleData.title}`,
'',
articleData.content.trim()
];
const textToCopy = frontMatterLines.concat(bodyLines).join('\n');
// 4. Handle the Clipboard event
button.addEventListener('click', async () => {
try {
await navigator.clipboard.writeText(textToCopy);
button.textContent = 'โ';
setTimeout(() => { button.textContent = '๐'; }, 1200); // Fixed reset icon
} catch (error) {
button.textContent = '!';
setTimeout(() => { button.textContent = '๐'; }, 1200); // Fixed reset icon
}
});
})();