Skip to content

Commit

Permalink
Add Haftara, fix Monthly Tehilim, etc, further refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
NightScript370 committed Sep 1, 2024
1 parent 593387a commit a4019c4
Show file tree
Hide file tree
Showing 14 changed files with 139 additions and 99 deletions.
89 changes: 74 additions & 15 deletions _data/learning.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,85 @@
---
- limud: dafBavli
text:
en: Babylon Talmud
et: Talmud Bavli
hb: תלנוד בבלי
ru:
short: Бавли
full: Талмуд Бавли
hb:
short: בבלי
full: תלמוד בבלי
en:
short: Babylonian
full: Babylonian Talmud
et:
short: Bavli
full: Talmud Bavli
- limud: DafYerushalmi
text:
en: Jerusalemite Tractate (Vilna)
et: Talmud Yerushalmi (Vilna)
hb: תלמוד ירושלמי (וילנה)
ru:
short: Ерушалми-В
full: Талмуд Ерушалми (Вильна)
hb:
short: ירושלמי (ו)
full: תלמוד ירושלמי (וילנה)
en:
short: Jerusalemite-V
full: Jerusalemite Talmud (Vilna)
et:
short: Yerushalmi-V
full: Talmud Yerushalmi (Vilna)
- limud: ccYomi
text:
en: Daily Chafetz Chayim
et: Chafetz Chayim Yomi
hb: חפץ חיים יומי
ru:
short: Хафец Хаим
full: Хафец Хаим Ёми
hb:
short: חפץ חיים
full: חפץ חיים יומי
en:
short: Ḥafes Ḥayim
full: Daily Ḥafes Ḥayim
et:
short: Ḥafes Ḥayim
full: Ḥafes Ḥayim Yomi
- limud: TehilimHodshi
text:
en: Daily Psalms (Monthly)
et: Tehilim Yomi (Monthly)
hb: תהילים יומי (חדשי)
ru:
short: Теилим (месячный)
full: Теилим (месячный)
hb:
short: תהילים (חדשי)
full: תהילים יומי (חדשי)
en:
short: Psalms (Monthly)
full: Daily Psalms (Monthly)
et:
short: Tehilim (Monthly)
full: Tehilim Yomi (Monthly)
- limud: TehilimShvui
text:
en: Daily Psalms (Weekly)
et: Tehilim Yomi (Weekly)
hb: תהילים יומי (שבועי)
ru:
short: Теилим (недельной)
full: Теилим (недельной)
hb:
short: תהילים (שבועי)
full: תהילים יומי (שבועי)
en:
short: Psalms (Weekly)
full: Daily Psalms (Weekly)
et:
short: Tehilim (Weekly)
full: Tehilim Yomi (Weekly)
- limud: Haftara
text:
ru:
short: Haftara
full: Haftara
hb:
short: הפטרה
full: הפטרה
en:
short: Haftara
full: Haftara
et:
short: Haftara
full: Haftara
37 changes: 0 additions & 37 deletions _data/tv/tvLearn.yml

This file was deleted.

2 changes: 1 addition & 1 deletion assets/js/flyers/multiZman.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const rYisraeliCal = new rYisraelizmanim(fallbackGL);

/** @type {string[]} */
let calendars = [];
const jCal = new WebsiteLimudCalendar(5784, KosherZmanim.JewishDate.AV, 20)
const jCal = new WebsiteLimudCalendar(5784, KosherZmanim.JewishDate.AV, 27)
const shabbatDate = jCal.getDate();

switch (document.getElementById('gridElement').getAttribute('data-flyerType')) {
Expand Down
2 changes: 1 addition & 1 deletion assets/js/shul-wall/date-and-time.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ function updateTime() {

if (portElem) {
portElem.childNodes.forEach(node => node.remove());
portElem.appendChild(document.createTextNode(curTime.hour >= 13 ? "PM" : "AM"))
portElem.appendChild(document.createTextNode(curTime.hour >= 12 ? "PM" : "AM"))
}

// @ts-ignore
Expand Down
21 changes: 12 additions & 9 deletions assets/js/shul-wall/limud.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
// @ts-check

import * as KosherZmanim from "../../libraries/kosherZmanim/kosher-zmanim.esm.js";
import { HebrewNumberFormatter } from "../WebsiteCalendar.js";
import { HebrewNumberFormatter, default as webCal } from "../WebsiteCalendar.js";
const hiloulahIndex = new KosherZmanim.HiloulahYomiCalculator();

const todayDate = KosherZmanim.Temporal.Now.plainDateISO().add({ days: 1});
const jCal = new KosherZmanim.JewishCalendar(todayDate);
const todayDate = KosherZmanim.Temporal.Now.plainDateISO();
const jCal = new webCal(todayDate);

const hNum = new HebrewNumberFormatter();

Expand All @@ -27,12 +27,15 @@ for (const dafYerushalmi of document.querySelectorAll('[data-zfReplace="DafYerus
dafYerushalmi.innerHTML = dafYerushalmiObject.getMasechta() + " " + hNum.formatHebrewNumber(dafYerushalmiObject.getDaf());
}
}
for (const tehilimShvui of document.querySelectorAll('[data-zfReplace="TehilimShvui"]')) {
tehilimShvui.innerHTML = KosherZmanim.TehilimYomi.byWeek(jCal).map(num => num.toString()).join(' - ');
}
for (const TehilimHodshi of document.querySelectorAll('[data-zfReplace="TehilimHodshi"]')) {
TehilimHodshi.innerHTML = KosherZmanim.TehilimYomi.byDayOfMonth(jCal).map(met => met.toString()).join(' - ');
}

document.querySelector('[data-zfReplace="TehilimShvui"]').innerHTML
= KosherZmanim.TehilimYomi.byWeek(jCal).map(num => num.toString()).join(' - ');
document.querySelector('[data-zfReplace="TehilimHodshi"]').innerHTML
= KosherZmanim.TehilimYomi.byDayOfMonth(jCal).map(met => met.toString()).join(' - ');

const haftara = KosherZmanim.Haftara.getThisWeeksHaftarah(jCal.shabbat())
document.querySelector('[data-zfReplace="Haftara"]').innerHTML
= `<b>${haftara.text}</b> (${haftara.source})`;

const chafetzChayimYomi = jCal.getChafetzChayimYomi();
for (const ccYomi of document.querySelectorAll('[data-zfReplace="ccYomi"]'))
Expand Down
14 changes: 8 additions & 6 deletions assets/js/zmanimListUpdater.js
Original file line number Diff line number Diff line change
Expand Up @@ -1048,12 +1048,14 @@ class zmanimListUpdater {
const chafetzChayimYomi = this.jCal.getChafetzChayimYomi();
dafContainer.querySelector('[data-zfReplace="ccYomi"]').innerHTML = (chafetzChayimYomi.title + (chafetzChayimYomi.section ? (": " + chafetzChayimYomi.section) : "")) || "N/A";

for (const tehilimShvui of dafContainer.querySelectorAll('[data-zfReplace="TehilimShvui"]')) {
tehilimShvui.innerHTML = KosherZmanim.TehilimYomi.byWeek(this.jCal).map(num => num.toString()).join(' - ');
}
for (const TehilimHodshi of dafContainer.querySelectorAll('[data-zfReplace="TehilimHodshi"]')) {
TehilimHodshi.innerHTML = KosherZmanim.TehilimYomi.byDayOfMonth(this.jCal).map(met => met.toString()).join(' - ');
}
dafContainer.querySelector('[data-zfReplace="TehilimShvui"]').innerHTML
= KosherZmanim.TehilimYomi.byWeek(this.jCal).map(num => num.toString()).join(' - ');
dafContainer.querySelector('[data-zfReplace="TehilimHodshi"]').innerHTML
= KosherZmanim.TehilimYomi.byDayOfMonth(this.jCal).map(met => met.toString()).join(' - ');

const haftara = KosherZmanim.Haftara.getThisWeeksHaftarah(this.jCal.shabbat())
dafContainer.querySelector('[data-zfReplace="Haftara"]').innerHTML
= `<b>${haftara.text}</b> (${haftara.source})`;
}

/** @param {HTMLElement} [tefilahRuleContainer] */
Expand Down
2 changes: 1 addition & 1 deletion assets/libraries/kosherZmanim/hiloulah-en.json

Large diffs are not rendered by default.

18 changes: 17 additions & 1 deletion assets/libraries/kosherZmanim/kosher-zmanim.esm.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8836,10 +8836,11 @@ export type hiloulahObj = {
src: string;
}[];
export declare class HiloulahYomiCalculator {
folderWithHiloulotJSON: string;
initFlag: boolean;
hiloulot_en: Record<string, hiloulahObj>;
hiloulot_he: Record<string, hiloulahObj>;
constructor();
constructor(dir?: string);
init(): Promise<void>;
getHiloulah(jewishCalendar: JewishDate): Promise<{
en: hiloulahObj;
Expand All @@ -8859,6 +8860,20 @@ export declare class TehilimYomi {
number
];
}
declare class WeeklyHaftarahReading {
/**
* This method returns a string that contains the weekly Haftorah. The {@link JewishCalendar}
* object passed into this method should be set to Saturday because the {@link JewishCalendar#getParshah()}
* method returns {@link com.kosherjava.zmanim.hebrewcalendar.JewishCalendar.Parsha#NONE} during
* the week.
* @param jCal the JewishCalendar object set to Saturday
* @return The haftorah for this week as a string
*/
static getThisWeeksHaftarah(jCal: JewishCalendar): {
text: string;
source: string;
};
}
/**
* The HebrewDateFormatter class formats a {@link JewishDate}.
*
Expand Down Expand Up @@ -9435,6 +9450,7 @@ export declare const temporalExtended: {

export {
Temporal,
WeeklyHaftarahReading as Haftara,
};

export {};
6 changes: 3 additions & 3 deletions assets/libraries/kosherZmanim/kosher-zmanim.esm.js

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions assets/libraries/kosherZmanim/kosher-zmanim.esm.js.map

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions pages/calendar.html
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ <h5 class="mb-0">
<dt class="lang lang-et">
MG"A (Maghen Avraham)<br>
<small class="fw-normal">
From Alot Hashahar until Tzeit Hakokhavim
From Alot Hashahar until Tzet Hakokhavim
<span data-zfFind="luachAmudehHoraah">(Amudeh Horaah Calendar)</span>
<span data-zfFind="luachOhrHachaim">(Ohr Hachaim Calendar)</span>
</small>
Expand Down Expand Up @@ -287,9 +287,9 @@ <h5 class="mb-0">
<dl class="list-group list-group-flush lh-sm" data-zfFind="DafYomi">
{% for learning in site.data.learning %}
<div class="list-group-item d-flex justify-content-between">
<dt class="lang lang-hb">{{ learning.text.hb }}</dt>
<dt class="lang lang-et">{{ learning.text.et }}</dt>
<dt class="lang lang-en">{{ learning.text.en }}</dt>
<dt class="lang lang-hb">{{ learning.text.hb.full }}</dt>
<dt class="lang lang-et">{{ learning.text.et.full }}</dt>
<dt class="lang lang-en">{{ learning.text.en.full }}</dt>
<dd class="m-0" data-zfReplace="{{ learning.limud }}"></dd>
</div>
{% endfor %}
Expand Down
9 changes: 3 additions & 6 deletions pages/flyers/shabbat/print/darche-emet.html
Original file line number Diff line number Diff line change
Expand Up @@ -477,11 +477,11 @@ <h1 id="zemanim">Zemanim - Halachic Times</h1>
</div>
<div>
<span><b>Shiur</b><br>w/ HaRav Kalatizadeh</span>
<span>6:00 PM</span>
<span>5:45 PM</span>
</div>
<div>
<span><b>Minḥa, Seudat Shelishit<br>& Arvit</b></span>
<span>7:00 PM</span>
<span>6:45 PM</span>
</div>
</div>
<p id="advertSide">
Expand All @@ -498,10 +498,7 @@ <h1 id="zemanim">Zemanim - Halachic Times</h1>
<span id="likratKalah" class="lechaDodi">לִקְרַאת כַּלָּה</span>
<span id="pnehShabbathNekabelah" class="lechaDodi">פְּנֵי שַׁבָּת נְקַבְּלָה</span>
<div id="advertFooter">Minyan of HaRav Kalatizadeh<br><span style="font-size: .5em;">Graphic Design by Maor Neim</span></div>
<div id="kiddushSponsor">
Please continue to have<br><b>Nissan Ben Agdass & Tzipora</b><br>
in mind as you pray
</div>
<div id="kiddushSponsor">You can pay all your pledges and donation to Darkhe Emet through ZELLE<br><br>[email protected]</div>
</div>

<script type="module" src="/assets/js/flyers/multiZman.js"></script>
12 changes: 6 additions & 6 deletions pages/shul-wall/pomona.html
Original file line number Diff line number Diff line change
Expand Up @@ -473,19 +473,19 @@ <h5 class="mb-0">
</div>
<div class="marquee" style="height: 125px;">
<dl class="list-group list-group-flush lh-sm marquee__content" data-zfFind="DafYomi">
{% for learning in site.data.tv.tvLearn.multiLang %}
{% for learning in site.data.learning %}
<div class="list-group-item d-flex justify-content-between">
<dt class="langTV lang-hb">{{ learning.text.hb }}</dt>
<dt class="langTV lang-ru">{{ learning.text.en }}</dt>
<dt class="langTV lang-hb">{{ learning.text.hb.short }}</dt>
<dt class="langTV lang-ru">{{ learning.text.et.short }}</dt>
<dd class="m-0" data-zfReplace="{{ learning.limud }}"></dd>
</div>
{% endfor %}
</dl>
<dl class="list-group list-group-flush lh-sm marquee__content" data-zfFind="DafYomi">
{% for learning in site.data.tv.tvLearn.multiLang %}
{% for learning in site.data.learning %}
<div class="list-group-item d-flex justify-content-between">
<dt class="langTV lang-hb">{{ learning.text.hb }}</dt>
<dt class="langTV lang-ru">{{ learning.text.en }}</dt>
<dt class="langTV lang-hb">{{ learning.text.hb.short }}</dt>
<dt class="langTV lang-ru">{{ learning.text.et.short }}</dt>
<dd class="m-0" data-zfReplace="{{ learning.limud }}"></dd>
</div>
{% endfor %}
Expand Down
10 changes: 5 additions & 5 deletions pages/shul-wall/sha'areh-tefila-queens.html
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
}

#clock {
font-size: 4em;
font-size: 4.75em;
font-family: "dharma_gothic_e";
}

Expand All @@ -67,7 +67,7 @@
color: black;
z-index: 3;
line-height: 1;
margin-top: 1rem;
height: 12vh;
align-items: center;
font-size: 1.15em;
font-weight: 500;
Expand Down Expand Up @@ -465,10 +465,10 @@ <h1 style="text-align: center;">
<span class="langTV lang-ru">лимуд ёми</span>
</h1>
<dl data-zfFind="DafYomi">
{% for learning in site.data.tv.tvLearn.multiLang %}
{% for learning in site.data.learning %}
<div style="text-align: center;">
<dt class="langTV lang-hb">{{ learning.text.hb }}</dt>
<dt class="langTV lang-ru">{{ learning.text.ru }}</dt>
<dt class="langTV lang-hb">{{ learning.text.hb.short }}</dt>
<dt class="langTV lang-ru">{{ learning.text.ru.short }}</dt>
<dd class="m-0" data-zfReplace="{{ learning.limud }}"></dd>
</div>
{% endfor %}
Expand Down

0 comments on commit a4019c4

Please sign in to comment.