67,6,156,21,121,30,365,35,344,37,683,29,134,18,1094,10,533,12,5299 _info {"project":"app01-news-list","branch":"master","version":127,"versionDate":"2024-06-03T07:23:50.000Z","fromVersion":0,"reset":true,"checksumDocs":"8-8749"} calcNewsList/calc.ls (function(){ return function(){ var list; list = _.uniq(inc("../newsList")()[engine.guiLanguage]); return list; }; })(); checkNews/checkDates/check.ls (function(){ return function(page, fullList){ var i$, len$, newsId, date; for (i$ = 0, len$ = fullList.length; i$ < len$; ++i$) { newsId = fullList[i$]; date = newsId.split("_")[0]; if (isNaN(new Date(date)) || date.split("-").length !== 3) { page.onError("The news folder name must start with YYYY-MM-DD_ but is:", newsId); return false; } } return true; }; })(); checkNews/checkDuplicates/check.ls (function(){ return function(page, fullList){ var duplicates; duplicates = fullList.filter(function(s){ return function(v){ return s.has(v) || !s.add(v); }; }(new Set)); if (duplicates.length > 0) { page.onError("Warning: There are duplicate ids in your newsList:

" + duplicates.toString()); return false; } return true; }; })(); checkNews/checkIncludePaths/check.ls (function(){ return function(page, fullList, onDone){ var project; project = { name: "app01-news", branch: "master", server: "https://projects.solocode.com" }; delete projects.projectVersions; return inc("/../app01/lib/util/loadProject/load")(project, function(){ var i$, ref$, len$, newsId, news, that; for (i$ = 0, len$ = (ref$ = fullList).length; i$ < len$; ++i$) { newsId = ref$[i$]; news = inc("/../app01-news/news/" + newsId + "/news", { silentError: true }); if (that = news.includeError) { page.onError("Warning: " + that + ".

Please ensure the file name is correct and app01-news is merged live!"); onDone(false); return; } } return onDone(true); }); }; })(); checkNews/onError/onError.ls (function(){ return function(page){ return function(error){ return page.html(Div({ color: Color.red[500] }).html(error)); }; }; })(); checkNews/page.ls (function(){ return function(page){ return { top: function(){ return inc("/../app01/addons/topbar2/topbar")({ close: true }); }, start: function(){ var fullList, loadNews, checkDuplicates, checkIncludePaths, checkDates, onFinished; page.onError = inc("onError/onError")(page); loadNews = function(){ var news; news = inc("../newsList")(); fullList = _.reduce(news, function(full, cur){ return full = full.concat(cur); }, []); return checkDuplicates(); }; checkDuplicates = function(){ if (inc("checkDuplicates/check")(page, fullList)) { return checkIncludePaths(); } }; checkIncludePaths = function(){ return inc("checkIncludePaths/check")(page, fullList, function(ok){ if (ok) { return checkDates(); } }); }; checkDates = function(){ if (inc("checkDates/check")(page, fullList)) { return onFinished(); } }; onFinished = function(){ return page.html(Div({ color: Color.green[500] }).html("All looking good, you can merge this project now!")); }; page.css({ width: "35em", maxWidth: "90%", margin: "0 auto" }).append(inc("/../app01/lib/gui/spinner/spinner")()); return loadNews(); } }; }; })(); howto.txt adding a new news for debug users or live users: 1. go to app01-news 2. copy folder name of new news (you can do this easily by clicking on rename of the respective folder and then copy the path) # image: 21570b20eaff9c0000 3. come back here and open newsList.ls 4. add the news id either in the bottom to the debug news item or to the top to the live news items 5. ensure app01-news is merged live (double check commits that are not by yourself!) 6. double click checkNews/page.ls to run a check of all the included news ids newsList.ls (function(){ return function(){ var news, debugItem, lang, id; news = { de: ["2018-10-10_oktober", "2018-11-09_november", "2018-11-23_quotes-competition", "2018-11-30_grosses-update", "2019-01-18_januar-2019", "2019-03-28_march-2019", "2019-10-25_october-2019", "2019-10-31_halloween-2019", "2019-12-01_de-xmas", "2020-01-01_de-happy-new-year", "2020-01-24_de-bio-release", "2020-02-14_de-plus-family-lehrer", "2020-03-06_de-avatar-superstar", "2020-03-13_de-avatar-superstar-competition-result", "2020-03-14_de-covid-19", "2020-07-15_de-summer-history-usa-certificate", "2020-08-13_de-physics-biology", "2020-10-09_de-october-2020", "2020-10-23_de-halloween-2020", "2020-11-02_de-avatar-contest-2020", "2020-11-27_de-calendar-sci-avatar", "2020-12-31_de-happy-new-year-bio-spanish", "2021-04-01_de_easter_msa_sci_natdeu", "2021-07-08_de-summer-holidays", "2021-09-08_de-back2school", "2021-10-26_de_halloween", "2021-11-30_de_adventskalender", "2022-01-05_de_new_year", "2022-03-24_de_mathe_english", "2022-06-08_de_oberstufe-sachkunde", "2022-07-12_de_holidays", "2022-09-28_de_languages", "2022-10-24_de_halloween", "2022-12-01_de_adventskalender_preschool", "2023-02-03_de_preschool", "2023-03-10_de_preschool", "2023-09-06_de_back-to-school", "2023-10-24_de_halloween", "2023-11-30_de_geographie-adventskalender", "2024-03-27_de_abitur"], en_us: ["2019-11-15_en-usa-beta", "2019-12-01_en-xmas", "2020-03-06_en-avatar-superstar", "2020-03-13_en-avatar-superstar-competition-result", "2020-05-28_en-usa-launch", "2020-07-15_en-summer-content-certificate", "2020-10-09_en-october-2020", "2020-10-23_en-halloween-2020", "2020-11-02_en-avatar-contest-2020", "2020-11-27_en-calendar-nateng-avatar", "2020-12-31_en-happy-new-year", "2021-05-20_en_us-uk-release", "2021-10-29_en_us-happy-halloween", "2021-12-01_en_us-adventcalendar", "2022-03-08_en_us-community", "2022-04-07_en_us-earth-day", "2022-08-08_en_us-back-to-school", "2022-09-28_en_us-september", "2022-10-28_en_us-halloween", "2022-11-23_en_us-thanksgiving", "2022-12-22_en_us-seasonsgreetings", "2023-02-10_en_us-blackhistory", "2023-03-17_en_us-patricks", "2023-04-04_en_us-earth-day", "2023-05-02_en_us-earth-day-winner", "2023-05-26_en_us-end-of-school-year", "2023-07-21_en_us-summer-releases", "2023-08-25_en_us-back-to-school", "2023-09-29_en_us-september", "2023-10-30_en_us-halloween", "2023-12-01_en_us-advent-calendar", "2024-01-01_en_us-new_years", "2024-02-16_en_us-february", "2024-03-28_en_us-Easter", "2024-04-01_en_us-earthContest", "2024-04-26_en_us-april", "2024-05-02_en_us-earth-day-contest-winner"], en_gb: ["2021-05-20_en_gb-release", "2021-12-01_en_gb-adventcalendar", "2022-09-01_en_gb-back-to-school", "2022-12-01_en_gb-adventcalendar", "2023-03-17_en_gb-reception", "2023-04-05_en_gb-earth-day", "2023-05-02_en_gb-earth-day-winner", "2023-05-05_en_gb-coronation", "2023-09-11_en_gb-back-to-school", "2023-10-30_en_gb-halloween", "2023-12-18_en_gb-xmas", "2024-01-08_en_gb-new-year", "2024-02-19_en_gb-february", "2024-03-25_en_gb-easter", "2024-04-22_en_gb-earth-day", "2024-06-03_en_gb-june"], fr: ["2020-10-09_fr-october-2020", "2020-10-23_fr-halloween-2020", "2020-11-02_fr-avatar-contest-2020", "2020-11-27_fr-calendar-avatar-grade-3", "2020-12-31_fr-happy-new-year", "2021-04-01_fr-natfra-1-easter", "2021-06-21_fr-music-science", "2021-07-06_fr-summer-holidays", "2021-09-02_fr-back-to-school", "2021-10-29_fr-joyeux-halloween", "2021-12-01_fr_calendrier-de-l-avent", "2022-04-05_fr_easter_new_content", "2022-07-11_fr-summer-holidays", "2022-08-30_fr-back-to-school", "2022-12-01_fr_calendrier-de-l-avent", "2023-06-12_fr_new-content", "2023-07-08_fr-summer-holidays", "2023-09-02_fr-back-to-school", "2023-11-30_fr-advent-calendar-educatech", "2024-01-01_fr-bonne-annee", "2024-03-29_fr-paques"], es: ["2020-12-31_es-happy-new-year", "2021-05-15_es-dia-del-maestro", "2021-07-06_es-summer-holidays", "2021-08-31_regreso-a-clases", "2021-10-29_es-dia-de-muertos-halloween", "2021-12-01_es_calendario_de_adviento", "2021-12-23_es_saludo_navidad", "2022-01-05_es_ano_nuevo", "2022-05-15_es-dia-del-maestro", "2022-07-29_es-vacaciones-de-verano-inivierno", "2022-08-30_es-regreso-a-clases", "2022-10-29_es_halloween", "2022-12-01_es_calendario-de-adviento", "2022-12-22_es_noche_buena", "2023-03-21_es-primavera-otono", "2023-04-06_es-semana-santa", "2023-05-15_es-dia-del-maestro", "2023-06-21_es-solsticio", "2023-07-19_vacaciones-largas", "2023-08-21_es-regreso-a-clases", "2023-10-02_es-dia-no-violencia", "2023-10-27_es-dia-de-muertos", "2023-12-01_es_calendario-de-adviento", "2024-01-01_es-ano-nuevo", "2024-05-15_es_dia-del-maestro"], pt: ["2021-12-22_pt_release_news", "2022-07-13_pt-ferias-de-inverno", "2022-07-28_pt-volta-as-aulas-julho", "2022-12-01_pt_portugues-ciencias-calendario-do-advento", "2023-02-06_pt_volta-as-aulas", "2023-07-10_pt_pre-ferias-de-julho", "2023-07-24_pt_pos-ferias-de-julho", "2023-10-15_pt_semana-das-criancas-e-professores", "2023-12-01_pt_calendario-do-advento", "2023-12-22_pt_boas-festas", "2024-02-05_pt_volta-as-aulas", "2024-03-29_pt_pascoa"] }; if (engine.isDebug) { debugItem = { de: "", en_us: "", en_gb: "", fr: "", es: "", pt: "" }; for (lang in debugItem) { id = debugItem[lang]; if (id) { news[lang] = news[lang].concat(id); } } } return news; }; })();