diff --git a/_data/hakken.yml b/_data/hakken.yml new file mode 100644 index 0000000..9b93af2 --- /dev/null +++ b/_data/hakken.yml @@ -0,0 +1,155 @@ +dates: + - name: Winter 2024 + theme: org-mode + location: + en: Berlin + de: Berlin + description: + en: | + This hakken will include our yearly general assembly. This is the perfect opportunity to get to know the internals of the organization, and to get involved! + de: | + Auf diesem hakken wir die Mitgliederversammlung stattfinden. Dies ist die perfekte Gelegenheit die Internalien der Organisation kennenzulernen, und mit zu machen! + extraSchedule: + - day: friday + time: '20:00' + id: cm + title: + en: Critical Mass + de: Critical Mass + - day: saturday + time: '14:00' + title: + en: General Assembly pub.solar n.e.V. + de: Mitgliederversammlung pub.solar n.e.V. + + - name: Spring 2024 + theme: Push for privacy + location: + en: Cologne @ [MiOM space](https://miom.space) + de: Köln @ [MiOM Kreativraum](https://miom.space) + description: + en: | + Let's push for more privacy! During this hakken we want to improve our datacollection and privacy policies however we can. + + Ideas for projects: + * automate old account deletion + * thorougly analyze all the kinds of data we keep and how we can reduce this + * update our privacy policy + * seeing if we can get our hands on our own hardware + de: | + Lass für mehr Privatsphäre arbeiten! Dieses hakken wollen wir unseren Datenschutz verbessern und unsere Datensammlung verringern. + + Ideen für Projekte: + * Löschen von alten Accounts automatisieren + * eine Analyse unserer Datenspeicherung erstellen; was speichern wir und wo? Können wir das reduzieren? + * unsere Datenschutzerklärung auffrischen + * schauen ob wir eigene Hardware kriegen könnten + + - name: Summer 2024 + theme: Hot CPU Summer + location: + en: Cologne @ [MiOM space](https://miom.space) + de: Köln @ [MiOM Kreativraum](https://miom.space) + description: + en: | + Summer is hot and will be getting hotter. CPUs are overheating in the new CO2 normal, can we do better? + + Ideas for projects: + * Look for ways to reduce the pub.solar carbon footprint + * Create an open source bicycle computer + de: | + Der Sommer ist heiß und wird immer heißer werden. CPUs überhitzen in dem neuen CO2 normal, können wir da besser werden? + + Ideas für Projekte: + * Mittel und Wege finden pub.solar nachhaltiger zu gestalten + * Einen open source Fahrradcomputer bauen + + - name: Autumn 2024 + theme: no theme yet + location: + en: Cologne @ [MiOM space](https://miom.space) + de: Köln @ [MiOM Kreativraum](https://miom.space) + description: + +strings: + when: + en: 'When' + de: 'Wann' + where: + en: 'Where' + de: 'Wo' + comingDates: + en: 'The following dates are scheduled:' + de: 'Folgende Termine stehen an:' + friday: + en: 'friday' + de: 'Freitag' + saturday: + en: 'saturday' + de: 'Samstag' + sunday: + en: 'sunday' + de: 'Sonntag' + until: + en: 'until' + de: 'bis' + theme: + en: 'Theme' + de: 'Thema' + schedule: + en: 'Schedule' + de: 'Zeitplan' + months: + - en: 'January' + de: 'Januar' + - en: 'February' + de: 'Februar' + - en: 'March' + de: 'März' + - en: 'April' + de: 'April' + - en: 'May' + de: 'Mai' + - en: 'June' + de: 'Juni' + - en: 'July' + de: 'Juli' + - en: 'August' + de: 'August' + - en: 'September' + de: 'September' + - en: 'October' + de: 'Oktober' + - en: 'November' + de: 'November' + - en: 'December' + de: 'Dezember' + +baseSchedule: + - day: friday + time: '13:12' + id: start + title: + en: Opening + de: Eröffnung + + - day: friday + time: '17:30' + id: cm + title: + en: Critical Mass + de: Critical Mass + + - day: sunday + time: '15:30' + id: wrapup + title: + en: Wrap-up get-together + de: Abschliessendes zusammenkommen + + - day: sunday + time: '16:20' + id: end + title: + en: Official end + de: Offizielles Ende diff --git a/_includes/HakkenDates.tsx b/_includes/HakkenDates.tsx index 45ca2c3..6327266 100644 --- a/_includes/HakkenDates.tsx +++ b/_includes/HakkenDates.tsx @@ -1,4 +1,107 @@ -export default ({ lang, className }) =>
; +import { md, mdi } from '../filters.ts'; + +const days = { + 'friday': 0, + 'saturday': 1, + 'sunday': 2, +}; + +const day = 24 * 60 * 60 * 1000; +const week = 7 * day; +const endOfWeekend = 2 * day; + +const getStartAndEnd = (date) => { + const [ version, year ] = date.name.split(' '); + const startingMonth = { + Winter: 1, + Spring: 4, + Summer: 7, + Autumn: 10, + }[version]; + + // We start searching on the 20th of that specific month + const d = new Date(); + d.setFullYear(parseInt(year, 10)); + d.setMonth(startingMonth - 1); + d.setDate(20); + + for (let i = 0; i < 14; i++) { + const dateToTry = new Date(d.valueOf() + (i * day)); + if (dateToTry.getDay() !== 5) { + continue; + } + + const oneWeekLater = new Date(dateToTry.valueOf() + week); + if (dateToTry.getMonth() === oneWeekLater.getMonth()) { + continue; + } + + return { + start: dateToTry, + end: new Date(dateToTry.valueOf() + endOfWeekend), + }; + } +}; + +export default ({ data, lang, className }) => { + const strings = data.strings; + const dates = data.dates; + const t = (o) => o?.[lang] || ''; + + console.log(dates); + + return
+

{t(strings.comingDates)}

+ +
; +}; diff --git a/_includes/layouts/default.tsx b/_includes/layouts/default.tsx index db2bd80..f4b8132 100644 --- a/_includes/layouts/default.tsx +++ b/_includes/layouts/default.tsx @@ -14,6 +14,7 @@ export default ({ cacheBust, showHakkenDates, + hakken, }) => <> - {showHakkenDates ? : null} + {showHakkenDates ? : null}
- {showHakkenDates ? : null} + {showHakkenDates ? : null}
diff --git a/_includes/styles/hakken-dates.scss b/_includes/styles/hakken-dates.scss index 7478a97..124a24a 100644 --- a/_includes/styles/hakken-dates.scss +++ b/_includes/styles/hakken-dates.scss @@ -1,4 +1,39 @@ .ps-hakken-dates { margin: 5vw; margin-top: 0; + + &--list { + list-style: none; + padding: 0; + } + + &--item { + border-left: 3px solid var(--accent); + padding-left: 1rem; + } + + &--meta { + font-weight: bold; + } + + &--times { + margin-right: 1rem; + } + + &--schedule { + summary { + margin-bottom: 0.5rem; + } + } + + &--schedule-entry { + display: flex; + align-items: center; + + > * { + margin: 0; + margin-left: 0.5rem; + font-size: 1.4rem; + } + } } diff --git a/deno.lock b/deno.lock index 92f851b..edfb197 100644 --- a/deno.lock +++ b/deno.lock @@ -11,6 +11,7 @@ "npm:postcss-import@15.1.0": "npm:postcss-import@15.1.0_postcss@8.4.24", "npm:postcss-nesting@11.3.0": "npm:postcss-nesting@11.3.0_postcss@8.4.24_postcss-selector-parser@6.0.13", "npm:postcss@8.4.24": "npm:postcss@8.4.24", + "npm:react": "npm:react@18.2.0", "npm:react-dom@18.2.0": "npm:react-dom@18.2.0_react@18.2.0", "npm:react@18.2.0": "npm:react@18.2.0", "npm:sass@1.63.6": "npm:sass@1.63.6", @@ -453,6 +454,19 @@ } }, "remote": { + "https://deno.land/std@0.170.0/_util/asserts.ts": "d0844e9b62510f89ce1f9878b046f6a57bf88f208a10304aab50efcb48365272", + "https://deno.land/std@0.170.0/_util/os.ts": "8a33345f74990e627b9dfe2de9b040004b08ea5146c7c9e8fe9a29070d193934", + "https://deno.land/std@0.170.0/encoding/base64.ts": "8605e018e49211efc767686f6f687827d7f5fd5217163e981d8d693105640d7a", + "https://deno.land/std@0.170.0/fmt/colors.ts": "03ad95e543d2808bc43c17a3dd29d25b43d0f16287fe562a0be89bf632454a12", + "https://deno.land/std@0.170.0/path/_constants.ts": "df1db3ffa6dd6d1252cc9617e5d72165cd2483df90e93833e13580687b6083c3", + "https://deno.land/std@0.170.0/path/_interface.ts": "ee3b431a336b80cf445441109d089b70d87d5e248f4f90ff906820889ecf8d09", + "https://deno.land/std@0.170.0/path/_util.ts": "d16be2a16e1204b65f9d0dfc54a9bc472cafe5f4a190b3c8471ec2016ccd1677", + "https://deno.land/std@0.170.0/path/common.ts": "bee563630abd2d97f99d83c96c2fa0cca7cee103e8cb4e7699ec4d5db7bd2633", + "https://deno.land/std@0.170.0/path/glob.ts": "81cc6c72be002cd546c7a22d1f263f82f63f37fe0035d9726aa96fc8f6e4afa1", + "https://deno.land/std@0.170.0/path/mod.ts": "cf7cec7ac11b7048bb66af8ae03513e66595c279c65cfa12bfc07d9599608b78", + "https://deno.land/std@0.170.0/path/posix.ts": "b859684bc4d80edfd4cad0a82371b50c716330bed51143d6dcdbe59e6278b30c", + "https://deno.land/std@0.170.0/path/separator.ts": "fe1816cb765a8068afb3e8f13ad272351c85cbc739af56dacfc7d93d710fe0f9", + "https://deno.land/std@0.170.0/path/win32.ts": "7cebd2bda6657371adc00061a1d23fdd87bcdf64b4843bb148b0b24c11b40f69", "https://deno.land/std@0.192.0/_util/asserts.ts": "178dfc49a464aee693a7e285567b3d0b555dc805ff490505a8aae34f9cfb1462", "https://deno.land/std@0.192.0/_util/os.ts": "d932f56d41e4f6a6093d56044e29ce637f8dcc43c5a90af43504a889cf1775e3", "https://deno.land/std@0.192.0/async/abortable.ts": "fd682fa46f3b7b16b4606a5ab52a7ce309434b76f820d3221bdfb862719a15d7", @@ -566,6 +580,88 @@ "https://deno.land/std@0.192.0/yaml/schema/mod.ts": "4472e827bab5025e92bc2eb2eeefa70ecbefc64b2799b765c69af84822efef32", "https://deno.land/std@0.192.0/yaml/stringify.ts": "fffc09c65c68d3d63f8159e8cbaa3f489bc20a8e55b4fbb61a8c2e9f914d1d02", "https://deno.land/std@0.192.0/yaml/type.ts": "1aabb8e0a3f4229ce0a3526256f68826d9bdf65a36c8a3890ead8011fcba7670", + "https://deno.land/x/cliffy@v0.25.7/_utils/distance.ts": "02af166952c7c358ac83beae397aa2fbca4ad630aecfcd38d92edb1ea429f004", + "https://deno.land/x/cliffy@v0.25.7/ansi/ansi.ts": "7f43d07d31dd7c24b721bb434c39cbb5132029fa4be3dd8938873065f65e5810", + "https://deno.land/x/cliffy@v0.25.7/ansi/ansi_escapes.ts": "885f61f343223f27b8ec69cc138a54bea30542924eacd0f290cd84edcf691387", + "https://deno.land/x/cliffy@v0.25.7/ansi/chain.ts": "31fb9fcbf72fed9f3eb9b9487270d2042ccd46a612d07dd5271b1a80ae2140a0", + "https://deno.land/x/cliffy@v0.25.7/ansi/colors.ts": "5f71993af5bd1aa0a795b15f41692d556d7c89584a601fed75997df844b832c9", + "https://deno.land/x/cliffy@v0.25.7/ansi/cursor_position.ts": "d537491e31d9c254b208277448eff92ff7f55978c4928dea363df92c0df0813f", + "https://deno.land/x/cliffy@v0.25.7/ansi/deps.ts": "0f35cb7e91868ce81561f6a77426ea8bc55dc15e13f84c7352f211023af79053", + "https://deno.land/x/cliffy@v0.25.7/ansi/mod.ts": "bb4e6588e6704949766205709463c8c33b30fec66c0b1846bc84a3db04a4e075", + "https://deno.land/x/cliffy@v0.25.7/ansi/tty.ts": "8fb064c17ead6cdf00c2d3bc87a9fd17b1167f2daa575c42b516f38bdb604673", + "https://deno.land/x/cliffy@v0.25.7/command/_errors.ts": "a9bd23dc816b32ec96c9b8f3057218241778d8c40333b43341138191450965e5", + "https://deno.land/x/cliffy@v0.25.7/command/_utils.ts": "9ab3d69fabab6c335b881b8a5229cbd5db0c68f630a1c307aff988b6396d9baf", + "https://deno.land/x/cliffy@v0.25.7/command/command.ts": "a2b83c612acd65c69116f70dec872f6da383699b83874b70fcf38cddf790443f", + "https://deno.land/x/cliffy@v0.25.7/command/completions/_bash_completions_generator.ts": "43b4abb543d4dc60233620d51e69d82d3b7c44e274e723681e0dce2a124f69f9", + "https://deno.land/x/cliffy@v0.25.7/command/completions/_fish_completions_generator.ts": "d0289985f5cf0bd288c05273bfa286b24c27feb40822eb7fd9d7fee64e6580e8", + "https://deno.land/x/cliffy@v0.25.7/command/completions/_zsh_completions_generator.ts": "14461eb274954fea4953ee75938821f721da7da607dc49bcc7db1e3f33a207bd", + "https://deno.land/x/cliffy@v0.25.7/command/completions/bash.ts": "053aa2006ec327ccecacb00ba28e5eb836300e5c1bec1b3cfaee9ddcf8189756", + "https://deno.land/x/cliffy@v0.25.7/command/completions/complete.ts": "58df61caa5e6220ff2768636a69337923ad9d4b8c1932aeb27165081c4d07d8b", + "https://deno.land/x/cliffy@v0.25.7/command/completions/fish.ts": "9938beaa6458c6cf9e2eeda46a09e8cd362d4f8c6c9efe87d3cd8ca7477402a5", + "https://deno.land/x/cliffy@v0.25.7/command/completions/mod.ts": "aeef7ec8e319bb157c39a4bab8030c9fe8fa327b4c1e94c9c1025077b45b40c0", + "https://deno.land/x/cliffy@v0.25.7/command/completions/zsh.ts": "8b04ab244a0b582f7927d405e17b38602428eeb347a9968a657e7ea9f40e721a", + "https://deno.land/x/cliffy@v0.25.7/command/deprecated.ts": "bbe6670f1d645b773d04b725b8b8e7814c862c9f1afba460c4d599ffe9d4983c", + "https://deno.land/x/cliffy@v0.25.7/command/deps.ts": "275b964ce173770bae65f6b8ebe9d2fd557dc10292cdd1ed3db1735f0d77fa1d", + "https://deno.land/x/cliffy@v0.25.7/command/help/_help_generator.ts": "f7c349cb2ddb737e70dc1f89bcb1943ca9017a53506be0d4138e0aadb9970a49", + "https://deno.land/x/cliffy@v0.25.7/command/help/mod.ts": "09d74d3eb42d21285407cda688074c29595d9c927b69aedf9d05ff3f215820d3", + "https://deno.land/x/cliffy@v0.25.7/command/mod.ts": "d0a32df6b14028e43bb2d41fa87d24bc00f9662a44e5a177b3db02f93e473209", + "https://deno.land/x/cliffy@v0.25.7/command/type.ts": "24e88e3085e1574662b856ccce70d589959648817135d4469fab67b9cce1b364", + "https://deno.land/x/cliffy@v0.25.7/command/types.ts": "ae02eec0ed7a769f7dba2dd5d3a931a61724b3021271b1b565cf189d9adfd4a0", + "https://deno.land/x/cliffy@v0.25.7/command/types/action_list.ts": "33c98d449617c7a563a535c9ceb3741bde9f6363353fd492f90a74570c611c27", + "https://deno.land/x/cliffy@v0.25.7/command/types/boolean.ts": "3879ec16092b4b5b1a0acb8675f8c9250c0b8a972e1e4c7adfba8335bd2263ed", + "https://deno.land/x/cliffy@v0.25.7/command/types/child_command.ts": "f1fca390c7fbfa7a713ca15ef55c2c7656bcbb394d50e8ef54085bdf6dc22559", + "https://deno.land/x/cliffy@v0.25.7/command/types/command.ts": "325d0382e383b725fd8d0ef34ebaeae082c5b76a1f6f2e843fee5dbb1a4fe3ac", + "https://deno.land/x/cliffy@v0.25.7/command/types/enum.ts": "2178345972adf7129a47e5f02856ca3e6852a91442a1c78307dffb8a6a3c6c9f", + "https://deno.land/x/cliffy@v0.25.7/command/types/file.ts": "8618f16ac9015c8589cbd946b3de1988cc4899b90ea251f3325c93c46745140e", + "https://deno.land/x/cliffy@v0.25.7/command/types/integer.ts": "29864725fd48738579d18123d7ee78fed37515e6dc62146c7544c98a82f1778d", + "https://deno.land/x/cliffy@v0.25.7/command/types/number.ts": "aeba96e6f470309317a16b308c82e0e4138a830ec79c9877e4622c682012bc1f", + "https://deno.land/x/cliffy@v0.25.7/command/types/string.ts": "e4dadb08a11795474871c7967beab954593813bb53d9f69ea5f9b734e43dc0e0", + "https://deno.land/x/cliffy@v0.25.7/command/upgrade/mod.ts": "17e2df3b620905583256684415e6c4a31e8de5c59066eb6d6c9c133919292dc4", + "https://deno.land/x/cliffy@v0.25.7/command/upgrade/provider.ts": "d6fb846043232cbd23c57d257100c7fc92274984d75a5fead0f3e4266dc76ab8", + "https://deno.land/x/cliffy@v0.25.7/command/upgrade/provider/deno_land.ts": "24f8d82e38c51e09be989f30f8ad21f9dd41ac1bb1973b443a13883e8ba06d6d", + "https://deno.land/x/cliffy@v0.25.7/command/upgrade/provider/github.ts": "99e1b133dd446c6aa79f69e69c46eb8bc1c968dd331c2a7d4064514a317c7b59", + "https://deno.land/x/cliffy@v0.25.7/command/upgrade/provider/nest_land.ts": "0e07936cea04fa41ac9297f32d87f39152ea873970c54cb5b4934b12fee1885e", + "https://deno.land/x/cliffy@v0.25.7/command/upgrade/upgrade_command.ts": "3640a287d914190241ea1e636774b1b4b0e1828fa75119971dd5304784061e05", + "https://deno.land/x/cliffy@v0.25.7/flags/_errors.ts": "f1fbb6bfa009e7950508c9d491cfb4a5551027d9f453389606adb3f2327d048f", + "https://deno.land/x/cliffy@v0.25.7/flags/_utils.ts": "340d3ecab43cde9489187e1f176504d2c58485df6652d1cdd907c0e9c3ce4cc2", + "https://deno.land/x/cliffy@v0.25.7/flags/_validate_flags.ts": "16eb5837986c6f6f7620817820161a78d66ce92d690e3697068726bbef067452", + "https://deno.land/x/cliffy@v0.25.7/flags/deprecated.ts": "a72a35de3cc7314e5ebea605ca23d08385b218ef171c32a3f135fb4318b08126", + "https://deno.land/x/cliffy@v0.25.7/flags/flags.ts": "68a9dfcacc4983a84c07ba19b66e5e9fccd04389fad215210c60fb414cc62576", + "https://deno.land/x/cliffy@v0.25.7/flags/mod.ts": "b21c2c135cd2437cc16245c5f168a626091631d6d4907ad10db61c96c93bdb25", + "https://deno.land/x/cliffy@v0.25.7/flags/types.ts": "7452ea5296758fb7af89930349ce40d8eb9a43b24b3f5759283e1cb5113075fd", + "https://deno.land/x/cliffy@v0.25.7/flags/types/boolean.ts": "4c026dd66ec9c5436860dc6d0241427bdb8d8e07337ad71b33c08193428a2236", + "https://deno.land/x/cliffy@v0.25.7/flags/types/integer.ts": "b60d4d590f309ddddf066782d43e4dc3799f0e7d08e5ede7dc62a5ee94b9a6d9", + "https://deno.land/x/cliffy@v0.25.7/flags/types/number.ts": "610936e2d29de7c8c304b65489a75ebae17b005c6122c24e791fbed12444d51e", + "https://deno.land/x/cliffy@v0.25.7/flags/types/string.ts": "e89b6a5ce322f65a894edecdc48b44956ec246a1d881f03e97bbda90dd8638c5", + "https://deno.land/x/cliffy@v0.25.7/keycode/key_code.ts": "c4ab0ffd102c2534962b765ded6d8d254631821bf568143d9352c1cdcf7a24be", + "https://deno.land/x/cliffy@v0.25.7/keycode/key_codes.ts": "917f0a2da0dbace08cf29bcfdaaa2257da9fe7e705fff8867d86ed69dfb08cfe", + "https://deno.land/x/cliffy@v0.25.7/keycode/mod.ts": "292d2f295316c6e0da6955042a7b31ab2968ff09f2300541d00f05ed6c2aa2d4", + "https://deno.land/x/cliffy@v0.25.7/mod.ts": "e3515ccf6bd4e4ac89322034e07e2332ed71901e4467ee5bc9d72851893e167b", + "https://deno.land/x/cliffy@v0.25.7/prompt/_generic_input.ts": "737cff2de02c8ce35250f5dd79c67b5fc176423191a2abd1f471a90dd725659e", + "https://deno.land/x/cliffy@v0.25.7/prompt/_generic_list.ts": "79b301bf09eb19f0d070d897f613f78d4e9f93100d7e9a26349ef0bfaa7408d2", + "https://deno.land/x/cliffy@v0.25.7/prompt/_generic_prompt.ts": "8630ce89a66d83e695922df41721cada52900b515385d86def597dea35971bb2", + "https://deno.land/x/cliffy@v0.25.7/prompt/_generic_suggestions.ts": "2a8b619f91e8f9a270811eff557f10f1343a444a527b5fc22c94de832939920c", + "https://deno.land/x/cliffy@v0.25.7/prompt/_utils.ts": "676cca30762656ed1a9bcb21a7254244278a23ffc591750e98a501644b6d2df3", + "https://deno.land/x/cliffy@v0.25.7/prompt/checkbox.ts": "e5a5a9adbb86835dffa2afbd23c6f7a8fe25a9d166485388ef25aba5dc3fbf9e", + "https://deno.land/x/cliffy@v0.25.7/prompt/confirm.ts": "94c8e55de3bbcd53732804420935c432eab29945497d1c47c357d236a89cb5f6", + "https://deno.land/x/cliffy@v0.25.7/prompt/deps.ts": "4c38ab18e55a792c9a136c1c29b2b6e21ea4820c45de7ef4cf517ce94012c57d", + "https://deno.land/x/cliffy@v0.25.7/prompt/figures.ts": "26af0fbfe21497220e4b887bb550fab997498cde14703b98e78faf370fbb4b94", + "https://deno.land/x/cliffy@v0.25.7/prompt/input.ts": "ee45532e0a30c2463e436e08ae291d79d1c2c40872e17364c96d2b97c279bf4d", + "https://deno.land/x/cliffy@v0.25.7/prompt/list.ts": "6780427ff2a932a48c9b882d173c64802081d6cdce9ff618d66ba6504b6abc50", + "https://deno.land/x/cliffy@v0.25.7/prompt/mod.ts": "195aed14d10d279914eaa28c696dec404d576ca424c097a5bc2b4a7a13b66c89", + "https://deno.land/x/cliffy@v0.25.7/prompt/number.ts": "015305a76b50138234dde4fd50eb886c6c7c0baa1b314caf811484644acdc2cf", + "https://deno.land/x/cliffy@v0.25.7/prompt/prompt.ts": "0e7f6a1d43475ee33fb25f7d50749b2f07fc0bcddd9579f3f9af12d05b4a4412", + "https://deno.land/x/cliffy@v0.25.7/prompt/secret.ts": "58745f5231fb2c44294c4acf2511f8c5bfddfa1e12f259580ff90dedea2703d6", + "https://deno.land/x/cliffy@v0.25.7/prompt/select.ts": "1e982eae85718e4e15a3ee10a5ae2233e532d7977d55888f3a309e8e3982b784", + "https://deno.land/x/cliffy@v0.25.7/prompt/toggle.ts": "842c3754a40732f2e80bcd4670098713e402e64bd930e6cab2b787f7ad4d931a", + "https://deno.land/x/cliffy@v0.25.7/table/border.ts": "2514abae4e4f51eda60a5f8c927ba24efd464a590027e900926b38f68e01253c", + "https://deno.land/x/cliffy@v0.25.7/table/cell.ts": "1d787d8006ac8302020d18ec39f8d7f1113612c20801b973e3839de9c3f8b7b3", + "https://deno.land/x/cliffy@v0.25.7/table/deps.ts": "5b05fa56c1a5e2af34f2103fd199e5f87f0507549963019563eae519271819d2", + "https://deno.land/x/cliffy@v0.25.7/table/layout.ts": "46bf10ae5430cf4fbb92f23d588230e9c6336edbdb154e5c9581290562b169f4", + "https://deno.land/x/cliffy@v0.25.7/table/mod.ts": "e74f69f38810ee6139a71132783765feb94436a6619c07474ada45b465189834", + "https://deno.land/x/cliffy@v0.25.7/table/row.ts": "5f519ba7488d2ef76cbbf50527f10f7957bfd668ce5b9169abbc44ec88302645", + "https://deno.land/x/cliffy@v0.25.7/table/table.ts": "ec204c9d08bb3ff1939c5ac7412a4c9ed7d00925d4fc92aff9bfe07bd269258d", + "https://deno.land/x/cliffy@v0.25.7/table/utils.ts": "187bb7dcbcfb16199a5d906113f584740901dfca1007400cba0df7dcd341bc29", "https://deno.land/x/deno_dom@v0.1.38/build/deno-wasm/deno-wasm.js": "98b1ad24a1c13284557917659402202e5c5258ab1431b3f3a82434ad36ffa05a", "https://deno.land/x/deno_dom@v0.1.38/deno-dom-wasm.ts": "bfd999a493a6974e9fca4d331bee03bfb68cfc600c662cd0b48b21d67a2a8ba0", "https://deno.land/x/deno_dom@v0.1.38/src/api.ts": "0ff5790f0a3eeecb4e00b7d8fbfa319b165962cf6d0182a65ba90f158d74f7d7", @@ -672,6 +768,11 @@ "https://deno.land/x/imagemagick_deno@0.0.24/src/virtual-pixel-method.ts": "ae2f0520e05b382299e4d41f4d7e2c67baf727ef7c816037e601c978948b1451", "https://deno.land/x/imagemagick_deno@0.0.24/src/wasm/magick.ts": "b5ec7d6c3c7379f8f9ba0c23238f7024aa35f3a15edb2d1cbca4ccc44a186ac9", "https://deno.land/x/imagemagick_deno@0.0.24/src/wasm/magick_native.js": "ce63e9894f66443624d09f8d9524d3c985e4174d6848b0e0c77a09d5d5b4759e", + "https://deno.land/x/lume@v1.18.0/cli.ts": "0abaeb7a2fc59e1ec0f6742485a3df599e36263894cf622e3f606eb326e827bb", + "https://deno.land/x/lume@v1.18.0/cli/build.ts": "eda0271fc01685951c01961e19b5eca64f7fabfe6777a4caf670077a1481d44a", + "https://deno.land/x/lume@v1.18.0/cli/create.ts": "3b5ed82e4c81858b53f929502ab3dc7c3e2f63be80c1d41011bc566442bbb4e9", + "https://deno.land/x/lume@v1.18.0/cli/run.ts": "ee2813fe642f22f311f578ef0c6bc0f007e592f82be4d77d4c0b8923b8708d6c", + "https://deno.land/x/lume@v1.18.0/cli/upgrade.ts": "abb558253778b5fa75159eeeb69214fd1f51feabd1e9e12e8e9c1f5b934bf37d", "https://deno.land/x/lume@v1.18.0/core.ts": "be7573baa55a0e34a0cbaf95405bcbeca95e2004d532b07052af51f466d6c143", "https://deno.land/x/lume@v1.18.0/core/cache.ts": "6d770debcedbb7441c2a9d14096ed518907e6615e0d5d014b83d4f5be52a7b3a", "https://deno.land/x/lume@v1.18.0/core/component_loader.ts": "b95db6b450fb71dc3fc0464e806515e4fde59a4d6341042e014b3199a2b3ac5d", @@ -699,6 +800,7 @@ "https://deno.land/x/lume@v1.18.0/core/watcher.ts": "be43625025dcedc68fcb2e2e4f63cceb2d3a82f6c1c13107518035e613726016", "https://deno.land/x/lume@v1.18.0/core/writer.ts": "e5f3f1659900c2500f1f25870e98ad8207f236bf350f83aa99acd74c84cf6291", "https://deno.land/x/lume@v1.18.0/deps/base64.ts": "bac5ee693f82fe967295ae98c6dcf4f1dfba6ae2f158057a1a94c8395cba549b", + "https://deno.land/x/lume@v1.18.0/deps/cliffy.ts": "faff0c2ca187ec9fd1ad8660141f85b9d05b5c36bab25b40eb5038c02590a310", "https://deno.land/x/lume@v1.18.0/deps/colors.ts": "ae078b149896c2e6bf810938f7f812fc5adf6595d96c9864897fbe775de6041b", "https://deno.land/x/lume@v1.18.0/deps/crypto.ts": "8b596129bf45a6f23887f2e28e8bb96f1ae9b28c34b4e1a33d229a4c293ba612", "https://deno.land/x/lume@v1.18.0/deps/date.ts": "a9320999733700f106ddffa9b457e38e879cc86acfcd51a3d9bd2c6d847aef45", @@ -718,6 +820,11 @@ "https://deno.land/x/lume@v1.18.0/deps/sass.ts": "e5f149865d08ae6223cd4517c9a492a7fcd1771d62d5340e248569e2d8bf79f8", "https://deno.land/x/lume@v1.18.0/deps/terser.ts": "0ba786fd4a31dfcf1e0bc4589836c5e7c89bb1a6fc2e9874251c280faf3cbd18", "https://deno.land/x/lume@v1.18.0/deps/yaml.ts": "007f31d978072d721a3923a7d269c558811118a7e81c5499e90876ad8a124d72", + "https://deno.land/x/lume@v1.18.0/middlewares/logger.ts": "69e69099a2e3a8c62d0bb62014381337f6e855c6b330e210e4a705fe8111e10a", + "https://deno.land/x/lume@v1.18.0/middlewares/no_cache.ts": "95fb11d820d931b6aca268fa30aee22e315c556bd214e135bb9b5ddbcbe039d6", + "https://deno.land/x/lume@v1.18.0/middlewares/not_found.ts": "8a2b7d78d0dd4f441cee909682faac9387ca3b801f8e4ae0f6695a007313732e", + "https://deno.land/x/lume@v1.18.0/middlewares/reload.ts": "1162ee5fc3c7e1f6b5fb3da73a648fc71f0a64d30ca48f05ed066c8cb80adbb6", + "https://deno.land/x/lume@v1.18.0/middlewares/reload_client.js": "34d75e01503fae8180796de882af42b1125fac88f22a010a99d5548de1ba7d72", "https://deno.land/x/lume@v1.18.0/mod.ts": "829abdd9fe45f04a6db27caa9e3bcc7f72b65c3810b67ad498582bc05b5e743d", "https://deno.land/x/lume@v1.18.0/plugins/date.ts": "5b5b4a5715db86c39b4342366d3cc1e5ee67fd57d58acc0d0d793f90de4d53f6", "https://deno.land/x/lume@v1.18.0/plugins/imagick.ts": "68fd0fee4f6ff26d0494b1792311ad84a863618d3d3e5af2701b99abceccd1be", @@ -735,6 +842,46 @@ "https://deno.land/x/lume@v1.18.0/plugins/terser.ts": "f7364724e7d1744f9155cb7b6c0c5673155fa834bf6b06d79ae9b1cda1f20005", "https://deno.land/x/lume@v1.18.0/plugins/url.ts": "43d3d47896a7322a8dd34572dedb4baa6f73a382594a2ff7c34a3a064dcc6c9e", "https://deno.land/x/lume@v1.18.0/plugins/utils.ts": "6435d164539d9e408e7e818b080cc1a96ff76ed3c376160577a7df751b57fa07", - "https://deno.land/x/lume@v1.18.0/plugins/yaml.ts": "df24aac4098dba258f1ac331a3b16ba488a336eb63c51afed8f59201228d583c" + "https://deno.land/x/lume@v1.18.0/plugins/yaml.ts": "df24aac4098dba258f1ac331a3b16ba488a336eb63c51afed8f59201228d583c", + "https://jspm.dev/markdown-it": "7fd1292527c2ed524afcc67abcd7ae4c26d2d0a468e98b1f0bd417ca217c9d9a", + "https://jspm.dev/npm:@jspm/core@2.0.1/_/0545670c.js": "468e254a0e5f7801333f217fcee046141186bd0a960018c893d73910bd754b71", + "https://jspm.dev/npm:@jspm/core@2.0.1/nodelibs/punycode": "de15b3b865f8196f62e2100731590c1d499cfffedef3d682861aff306b1f69dc", + "https://jspm.dev/npm:@jspm/core@2/nodelibs/punycode": "0ef16b3299b3928a3b26b7152c99a2bfa6a024189c9c62b769a81b7c931b25e0", + "https://jspm.dev/npm:entities@3.0.1/lib/maps/entities.json!cjs": "cc32e6ad7900d4f2b2f03a2ba983cec31e2a52f7cccac04ddb11e014b75a5842", + "https://jspm.dev/npm:entities@3.0/lib/maps/entities.json!cjs": "808f033fa7e69a2c341b3273d6ec8b5b794a6580ff0567d67d28d61878160c31", + "https://jspm.dev/npm:linkify-it@4!cjs": "2ba478ff45c86cc57f608274348cdd0ddf2e3107c6d28398e94f8b438fa47b47", + "https://jspm.dev/npm:linkify-it@4.0.1!cjs": "4260b67db5f69f3f5f4cdc6fe3c9ffc488bda8cf76637b54e1cec274f1e875b2", + "https://jspm.dev/npm:markdown-it@13.0.1/_/3a9a73fc.js": "e96843bf7f1e4e005c32702e51b7fe95b00f3865dc199c26c7973a63fc769d8d", + "https://jspm.dev/npm:markdown-it@13.0.1/lib!cjs": "3abc8797e2ce94c0b82e3f08e9968285232714382173f9059e58bd11f7fcfa82", + "https://jspm.dev/npm:markdown-it@13.0.1/lib/common/html_blocks!cjs": "443cd7d049a4c203c248677bc531d57ac480ed1f93d5a6e8beec06aa6675be01", + "https://jspm.dev/npm:markdown-it@13.0.1/lib/common/html_re!cjs": "34a455877b2b58b17fafa947fd8f2b859493dca65d430b4ff364cbea3a0ae1b8", + "https://jspm.dev/npm:markdown-it@13.0.1/lib/helpers/parse_link_destination!cjs": "ae2fbae800cd838d1060493878f7bb325c1f799731d58e14321f1da00236b9aa", + "https://jspm.dev/npm:markdown-it@13.0.1/lib/helpers/parse_link_label!cjs": "9b279c83b0d83d4eefbc44d3bf19c4f7a250f540c55bf5e4b85ef1801e05c852", + "https://jspm.dev/npm:markdown-it@13.0.1/lib/helpers/parse_link_title!cjs": "8bd5288ddac2c9d1111e5118ec6087363277687e83bcc957c298edf627a854a9", + "https://jspm.dev/npm:markdown-it@13.0.1/lib/presets/default!cjs": "546880ed70cb9d59113d36c5e243c74da796349dde43fb58c24c3e6492ae9a3a", + "https://jspm.dev/npm:markdown-it@13.0.1/lib/renderer!cjs": "6daff2c7771b3d62d474d192c836fe498dfc0914b18b6157ee060cc3e071c1c8", + "https://jspm.dev/npm:markdown-it@13.0.1/lib/rules_block/fence!cjs": "c75e26f66fe02bcd2a9873a7fc4c7dbfa36bd1703bab6ece4cb58d7ea9f587eb", + "https://jspm.dev/npm:markdown-it@13.0.1/lib/rules_block/state_block!cjs": "1b105f2265adb04ecf418a3d433769f524cd586d1cda76a2a8ecf0365e85462a", + "https://jspm.dev/npm:markdown-it@13.0.1/lib/rules_core/replacements!cjs": "e08f4c08d7375c6c6d7acffd671c566ed898cc74b6b744478dfeb0094e03d12a", + "https://jspm.dev/npm:markdown-it@13.0.1/lib/rules_core/smartquotes!cjs": "776938de2d38bc461ac8a36dbc8a9ce6dbe266465d4c218d537d580c379338e5", + "https://jspm.dev/npm:markdown-it@13.0.1/lib/rules_core/state_core!cjs": "74c572fb1720608480f313c9071f94920aba8cbd40d5b6444d9df034ca3f52ca", + "https://jspm.dev/npm:markdown-it@13.0.1/lib/rules_inline/state_inline!cjs": "515c90218dd6ebdd1edd4af7a5e6595e8787f0503fd4fe73a8f7a571172bb03c", + "https://jspm.dev/npm:markdown-it@13.0.1/lib/token!cjs": "b062e3122d946da2443fac66bc9cdd479898d85ac049ba5ceffb6bc6dbfb7e54", + "https://jspm.dev/npm:mdurl@1!cjs": "79d7e9befa635671886e663b8a295f79032a89da9c39a595b065cf36e953e6d4", + "https://jspm.dev/npm:mdurl@1.0.1!cjs": "7b55713117a89c7777130898abe12354d1e57a50cf5c3f704e21f493736e1b07", + "https://jspm.dev/npm:mdurl@1.0.1/decode!cjs": "c0d3880b8ad68820cc1eb74c438b2298df17d502f23906c90dd41658fbcd7659", + "https://jspm.dev/npm:mdurl@1.0.1/encode!cjs": "5f726382c9e0abacaf6a66f1a279ffb4285a9eda19094a62ff4b54925c381e32", + "https://jspm.dev/npm:mdurl@1.0.1/parse!cjs": "4d42ccc1191b4f78fafca4a37cffe01b9e49bf63e912f303b1133319d6a02fe4", + "https://jspm.dev/npm:uc.micro@1!cjs": "d1f95936ac3ec842fc714b183b9b48d947254e1444346b1cc47ddd9b52e16537", + "https://jspm.dev/npm:uc.micro@1.0.6!cjs": "7a8e688a06110b5b776dbfb75668c9ad541b15c45ca0f48980f99b0039fa6a92", + "https://jspm.dev/npm:uc.micro@1.0.6/categories/Cc/regex!cjs": "5d38e85df8a965f04ad3200f082741d0d946ec6006779c0b34be89b035dc742c", + "https://jspm.dev/npm:uc.micro@1.0.6/categories/Cf/regex!cjs": "3559322645cd5498059936ab622bfec1ad526340cae70f0b81c3a515335fc8f9", + "https://jspm.dev/npm:uc.micro@1.0.6/categories/P/regex!cjs": "1aa197d899ed79eba5d13ad6d5e3d71f5eb78d0af8527a3c16b771db382bd65d", + "https://jspm.dev/npm:uc.micro@1.0.6/categories/Z/regex!cjs": "8cd611ab13531ef42f483b7de5d3f920f2cd59e6f81d5784f8fe01062f2243e6", + "https://jspm.dev/npm:uc.micro@1.0.6/properties/Any/regex!cjs": "563fc432c9071c3902dc1ec804bcf82e21b0753b951b97c45cb28b469036277b", + "https://jspm.dev/npm:uc.micro@1/categories/Cc/regex!cjs": "82e4c2b20918b32106a354344c1c906e78a8834011dc2f0164fb2046ab5f25e9", + "https://jspm.dev/npm:uc.micro@1/categories/P/regex!cjs": "847ab064f5ba7659453a219c69d53973831cd2ae0027c533ee887ec14b4395dc", + "https://jspm.dev/npm:uc.micro@1/categories/Z/regex!cjs": "c65ea2fc5ad9aeef6a8dabdd0d174b83b439938059fa4b64cb3c09b837254fdd", + "https://jspm.dev/npm:uc.micro@1/properties/Any/regex!cjs": "e1656c86b86e5d59376e1b7305675171d4b69296afd6a685d9476a87534e1f9b" } } diff --git a/filters.ts b/filters.ts index d20b73a..3a98542 100644 --- a/filters.ts +++ b/filters.ts @@ -27,5 +27,6 @@ const mdIt = new MarkdownIt({ }); export const md = (string) => mdIt.render(string); +export const mdi = (string) => mdIt.renderInline(string); export const title = (value = '') => value + (value ? " | " : "") + "pub.solar"; diff --git a/hakken.yml b/hakken.yml index 58a1fff..ac8fd80 100644 --- a/hakken.yml +++ b/hakken.yml @@ -3,28 +3,26 @@ layout: layouts/default.tsx title: hakken.irl showHakkenDates: true -extraScripts: - - /scripts/hakken-dates.js - content: en: | # hakken.irl You're invited! - We meet (almost) every three months in Cologne for hakken.irl, a small three-day (Friday to Sunday) hackathon that's just about having fun and nerding around. + We meet (almost) every three months for hakken.irl, a small three-day (Friday to Sunday) hackathon that's just about having fun and nerding around. ## What will we be doing? - There is only one set agenda point: riding with Critical Mass. In general, we'll be hakking on pub.solar related stuff like [PubSolarOS](/os "PubSolarOS git repo") or [our Infra](https://git.pub.solar/pub-solar/infra "pub.solar infra repo"). + There is only one set agenda point: riding with Critical Mass. In general, we'll be hakking on pub.solar related stuff like [our Infrastructure](https://git.pub.solar/pub-solar/infra "pub.solar infra repo"). - Stuff we've done so far: + Examples include: - * [configured Matrix monitoring with Prometheus](https://git.pub.solar/pub-solar/infra/commit/c682a97746770121b419a9ad2c8c94688e5fa0f8), - * [refactored the core module of PubSolarOS](https://git.pub.solar/pub-solar/os/pulls/115), - * [started sway as a systemd service](https://git.pub.solar/pub-solar/os/commit/159ae86722bc706ff42d4d3e4b0f49ede2f253de), - * [added a "paranoid" option that always uses encrypted hibernation instead of sleep](https://git.pub.solar/pub-solar/os/pulls/74), - * [removed nonfree software from PubSolarOS](https://git.pub.solar/pub-solar/os/pulls/113), + * [updating the infrastructure nodes to NixOS 23.11](https://git.pub.solar/pub-solar/infra/pulls/74), + * [migrating our website to a new node](https://git.pub.solar/pub-solar/infra/pulls/20), + * [defining the default directory contents for new Nextcloud users](https://git.pub.solar/pub-solar/infra/pulls/73), + * [configuring nginx to serve Matrix vhosts](https://git.pub.solar/pub-solar/infra/pulls/33), + * creating digital animations, + * touching up photographs and making music, * played Wizard, cards and board games, * cooked, ordered, and ate together, * and made fun of neoliberals. @@ -39,7 +37,7 @@ content: ## Where do I sleep? - If you cannot find an (affordable, cool, safe) place to stay in Cologne, then talk to us. We'll surely be able to set you up with a place to stay somewhere. + If you cannot find an (affordable, cool, safe) place to stay, then talk to us. We'll surely be able to set you up with a place to stay somewhere. ## Where do I sign up? @@ -47,7 +45,7 @@ content: ## When will this happen? - hakken.irl always starts on the last Friday of the month at 13:12 and ends on Sunday 16:20. + hakken.irl starts on the last Friday of the month at 13:12 and ends on Sunday 16:20. We're meeting up every three months, typically on January, April, July and October. @@ -56,22 +54,23 @@ content: Du bist eingeladen! - Wir treffen uns (fast) alle drei Monate in Köln zum hakken.irl, ein kleiner 3-Tägiger (Freitag bis Sonntag) Hackathon bei dem es nur darum geht Spaß zu haben und ab zu nerden. + Wir treffen uns (fast) alle drei Monate zum hakken.irl, ein kleiner 3-Tägiger (Freitag bis Sonntag) Hackathon bei dem es nur darum geht Spaß zu haben und ab zu nerden. ## Was machen wir denn so? - Es gibt nur einen festen Programmpunkt: bei der Critical Mass mitradeln. Tendenziell hakken wir danach an pub.solar relatierten sachen wie z.B. [PubSolarOS](/os "PubSolarOS git repo") oder [unsere Infra](https://git.pub.solar/pub-solar/infra "pub.solar infra repo"). + Es gibt nur einen festen Programmpunkt: bei der Critical Mass mitradeln. Tendenziell hakken wir danach an pub.solar relatierten sachen wie [unsere Infrastruktur](https://git.pub.solar/pub-solar/infra "pub.solar infra repo"). - Was wir bisher so gemacht haben: + Ein paar Beispiele: - * [Matrix monitoring per Prometheus konfiguriert](https://git.pub.solar/pub-solar/infra/commit/c682a97746770121b419a9ad2c8c94688e5fa0f8), - * [das core module in PubSolarOS gerefactored](https://git.pub.solar/pub-solar/os/pulls/115), - * [sway als systemd service starten](https://git.pub.solar/pub-solar/os/commit/159ae86722bc706ff42d4d3e4b0f49ede2f253de), - * [eine "paranoid" Option für PubSolarOS hinzugefügt, bei dem der PC immer in encrypted hibernation locked](https://git.pub.solar/pub-solar/os/pulls/74), - * [nonfree software aus PubSolarOS entfernt](https://git.pub.solar/pub-solar/os/pulls/113), - * Wizard, Karten und Brettspiele gespielt, - * zusammen gekocht, bestellt, und gegessen, - * und über die FDP her gezogen. + * [die Infrastruktur auf NixOS 23.11 heben](https://git.pub.solar/pub-solar/infra/pulls/74), + * [unsere website auf einen neuen Server umziehen](https://git.pub.solar/pub-solar/infra/pulls/20), + * [die Standardinhalte vom Nextcloud Verzeichnis für neue User definieren](https://git.pub.solar/pub-solar/infra/pulls/73), + * [nginx mit den Matrix vhosts konfigurieren](https://git.pub.solar/pub-solar/infra/pulls/33), + * digitale Animationen kreieren, + * Fotos bearbeiten und Musik machen, + * Wizard, Karten, und Brettspiele zocken, + * kochen, bestellen, und gemeinsam essen, + * und über die FDP herziehen. ## Ist das also nur für über-nerds? @@ -83,7 +82,7 @@ content: ## Wo schlafe ich? - Falls du keine (bezahlbare, coole, sichere) Übernachtungsmöglichkeit in Köln finden kannst, dann rede mit uns. Wir kriegen garantiert einen Schlafplatz organisiert. + Falls du keine (bezahlbare, coole, sichere) Übernachtungsmöglichkeit finden kannst, dann rede mit uns. Wir kriegen garantiert einen Schlafplatz organisiert. ## Wo melde ich mich an? @@ -91,6 +90,6 @@ content: ## Und wann soll das sein? - hakken.irl startet immer am letzten Freitag der Monats um 13:12 und geht bis Sonntag 16:20. + hakken.irl am letzten Freitag der Monats um 13:12 und geht bis Sonntag 16:20. Wir treffen uns alle drei monate, üblicherweise im Januar, April, Juli und Oktober. diff --git a/scripts/hakken-dates.js b/scripts/hakken-dates.js deleted file mode 100644 index 2d0166f..0000000 --- a/scripts/hakken-dates.js +++ /dev/null @@ -1,119 +0,0 @@ -const skippedMonths = [ - { m: 8, y: 2022 }, - { m: 12, y: 2022 }, - { m: 4, y: 2023 }, - { m: 5, y: 2023, repeat: true }, - { m: 6, y: 2023, repeat: true }, - { m: 8, y: 2023, repeat: true }, - { m: 9, y: 2023, repeat: true }, - { m: 11, y: 2023, repeat: true }, - { m: 12, y: 2023, repeat: true }, - { m: 2, y: 2024, repeat: true }, - { m: 3, y: 2024, repeat: true }, -]; - -const i18n = { - en: { - comingDates: 'The following dates are scheduled:', - friday: 'friday', - sunday: 'sunday', - until: 'until', - months: [ - 'Jan.', - 'Feb.', - 'Mar.', - 'Apr.', - 'May', - 'Jun.', - 'Jul.', - 'Aug.', - 'Sep.', - 'Oct.', - 'Nov.', - 'Dec.', - ], - }, - de: { - comingDates: 'Folgende Termine stehen an:', - friday: 'Freitag', - sunday: 'Sonntag', - until: 'bis', - months: [ - 'Jan.', - 'Feb.', - 'Mär.', - 'Apr.', - 'Mai', - 'Jun.', - 'Jul.', - 'Aug.', - 'Sep.', - 'Okt.', - 'Nov.', - 'Dez.', - ], - }, -}; - -const datesLists = { - en: document.getElementById('dates-list-en'), - de: document.getElementById('dates-list-de'), -}; - -const day = 24 * 60 * 60 * 1000; -const week = 7 * day; -const endOfWeekend = 2 * day; -const start = new Date(); -const hakkens = []; -// We'll be looking about a year into the future -for (let i = 0; i < 366; i++) { - const dateToTry = new Date(start.valueOf() + (i * day)); - if (dateToTry.getDay() !== 5) { - continue; - } - - const oneWeekLater = new Date(dateToTry.valueOf() + week); - if (dateToTry.getMonth() === oneWeekLater.getMonth()) { - continue; - } - - const m = dateToTry.getMonth() + 1; - const y = dateToTry.getFullYear(); - if (skippedMonths.find((s) => s.m === m && s.y === y)) { - continue; - } - if (skippedMonths.find((s) => s.repeat && s.m === m && s.y <= y)) { - continue; - } - hakkens.push(dateToTry); -} - -// Helper function to add leading zeros to dates -const d = (num) => ('0' + num).slice(-2); - -const writeText = (lang) => { - const p = document.createElement('p'); - p.innerHTML = i18n[lang].comingDates; - datesLists[lang].appendChild(p); -} - -const writeDateList = (lang) => { - const ul = document.createElement('ul'); - hakkens.forEach(hakken => { - hakkend = new Date(hakken.valueOf() + endOfWeekend); - const showFirstMonth = hakken.getMonth() !== hakkend.getMonth(); - const li = document.createElement('li'); - li.innerHTML = ` - ${i18n[lang].friday} ${d(hakken.getDate())}. ${showFirstMonth ? i18n[lang].months[hakken.getMonth()] : ''} - ${i18n[lang].until} - ${d(hakkend.getDate())}. ${i18n[lang].months[hakkend.getMonth()]} - `; - ul.appendChild(li); - }); - datesLists[lang].appendChild(ul); -} - -writeText('de'); -writeText('en'); -writeDateList('de'); -writeDateList('en');