mirror of
https://gitlab.com/PronounsPage/PronounsPage.git
synced 2025-09-25 05:54:25 -04:00
(pl)(calendar) miastamaszerujace 2024
This commit is contained in:
parent
959efbe4eb
commit
ed32a6a8d1
@ -3,6 +3,23 @@ import { Event, day, month, dayYear, EventLevel, Day } from '../../../src/calend
|
||||
|
||||
const require = createRequire(import.meta.url);
|
||||
|
||||
const loadMiastaMaszerujace = (filename) => {
|
||||
try {
|
||||
return require(`../../../static/calendar/${filename}`).map((e) => {
|
||||
return new Event(
|
||||
e.link ? `{${e.link}=${e.name}}` : e.name,
|
||||
'LGBTQ',
|
||||
e.date.month,
|
||||
dayYear(e.date.day, e.date.year),
|
||||
EventLevel.Day
|
||||
);
|
||||
});
|
||||
} catch (e) {
|
||||
console.warn(e);
|
||||
return [];
|
||||
}
|
||||
}
|
||||
|
||||
export default [
|
||||
// --- months ---
|
||||
new Event('{/spis=Niebinarny Spis Powszechny}', 'Nonbinary', 2, month, EventLevel.Month, ['nonbinary']),
|
||||
@ -79,13 +96,17 @@ export default [
|
||||
new Event('{https://www.facebook.com/marsz.rownosci.rzeszow/=Marsz Równości w Rzeszowie}', 'LGBTQ', 9, dayYear(10, 2022), EventLevel.Day),
|
||||
new Event('{https://www.facebook.com/events/1062699238014633=IV Marsz Równości w Częstochowie}', 'LGBTQ', 7, dayYear(16, 2022), EventLevel.Day),
|
||||
|
||||
...require('../../../static/calendar/miastamaszerujace-2023.json').map((e) => {
|
||||
return new Event(`{${e.link}=${e.name}}`, 'LGBTQ', e.date.month, dayYear(e.date.day, e.date.year), EventLevel.Day);
|
||||
}),
|
||||
// marsze 2023
|
||||
...loadMiastaMaszerujace('miastamaszerujace-2023.json'),
|
||||
|
||||
// marsze i eventy 2024
|
||||
new Event('Parada Równości w Warszawie', 'LGBTQ', 6, dayYear(15, 2024), EventLevel.Day),
|
||||
new Event('Parada Równości w Warszawie', 'LGBTQ', 6, dayYear(22, 2024), EventLevel.Day),
|
||||
...loadMiastaMaszerujace('miastamaszerujace-2024.json'),
|
||||
|
||||
new Event('{https://www.facebook.com/events/977716850062577=Parada Równości w Warszawie} (kolektyw Praga Równości)', 'LGBTQ', 6, dayYear(8, 2024), EventLevel.Day),
|
||||
new Event('{https://www.paradarownosci.pl/=Parada Równości w Warszawie} (Fundacja Wolontariat Równości)', 'LGBTQ', 6, dayYear(15, 2024), EventLevel.Day),
|
||||
// already included in miastamaszerujace
|
||||
// new Event('Parada Równości w Warszawie', 'LGBTQ', 6, dayYear(22, 2024), EventLevel.Day),
|
||||
|
||||
new Event('{https://dzientrans.pl/=Drugi Ogólnopolski Dzień Widoczności Osób Transpłciowych}', 'Transgender', 4, dayYear(13, 2024), EventLevel.Day),
|
||||
|
||||
// --- dynamic date ---
|
||||
|
@ -34,14 +34,17 @@ const fetchEvents = async () => {
|
||||
.filter((t) => !!t)
|
||||
.join(' ');
|
||||
|
||||
const link = new URL(p.querySelector('a').getAttribute('href'));
|
||||
link.hash = '';
|
||||
link.search = '';
|
||||
let link = null;
|
||||
try {
|
||||
link = new URL(p.querySelector('a').getAttribute('href'));
|
||||
link.hash = '';
|
||||
link.search = '';
|
||||
} catch (e) {}
|
||||
|
||||
events.push({
|
||||
name,
|
||||
date,
|
||||
link: link.toString(),
|
||||
link: link ? link.toString() : null,
|
||||
});
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user