Skip to content

Commit

Permalink
Add Makam support to the Ish Matzliach TV, adjust more things there
Browse files Browse the repository at this point in the history
  • Loading branch information
NightScript370 committed Jan 3, 2025
1 parent 5ea6e92 commit 4c8d6a3
Show file tree
Hide file tree
Showing 6 changed files with 70 additions and 22 deletions.
11 changes: 8 additions & 3 deletions assets/js/shul-wall/auto-schedule/ish-matzliach.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// @ts-check

import { GeoLocation, Temporal } from "../../../libraries/kosherZmanim/kosher-zmanim.esm.js";
import { GeoLocation, Temporal, Makam } from "../../../libraries/kosherZmanim/kosher-zmanim.esm.js";
import WebsiteCalendar from '../../WebsiteCalendar.js';
import { AmudehHoraahZmanim, OhrHachaimZmanim } from '../../ROYZmanim.js';
import preSettings from '../preSettings.js';
Expand Down Expand Up @@ -36,10 +36,10 @@ export default async function autoSchedule() {
document.getElementById('minchaErev').lastElementChild.innerHTML = friCL.with({ minute: Math.floor(friCL.minute / 5) * 5 }).toLocaleString(...dtF);

let arvitMS = zmanCalc.getTzaitShabbath().subtract({ minutes: 5 });
if (Math.trunc(arvitMS.with({ minute: Math.floor(arvitMS.minute / 5) * 5 }).until(arvitMS).total('minutes')) < 2)
if (Math.trunc(arvitMS.with({ minute: Math.floor(arvitMS.minute / 5) * 5 }).until(arvitMS).total('minutes')) < 3)
arvitMS = arvitMS.with({ minute: Math.floor(arvitMS.minute / 5) * 5 });
document.getElementById('arvitMS').lastElementChild.innerHTML = arvitMS.toLocaleString(...dtF);
document.getElementById('minchaS').lastElementChild.innerHTML = "3:50 PM";//arvitMS.with({ minute: Math.floor(arvitMS.minute / 10) * 10 }).subtract({ hours: 1 }).toLocaleString(...dtF);
document.getElementById('minchaS').lastElementChild.innerHTML = arvitMS.with({ minute: Math.floor(arvitMS.minute / 15) * 15 }).subtract({ hours: 1 }).toLocaleString(...dtF);

const flyerURLs = (await (await fetch('https://zemaneh-yosef.github.io/extras/ls.txt')).text())
.split('\n')
Expand All @@ -50,4 +50,9 @@ export default async function autoSchedule() {
.map((url, index) =>
`<div class="carousel-item ${index == 0 ? "active" : ''}"><img src="${url.replace('./', 'https://zemaneh-yosef.github.io/extras/')}" class="d-block w-100"></div>`)
.join('');

const makam = new Makam();
if (document.getElementById('makam')) {
document.getElementById('makam').innerHTML += makam.getTodayMakam(jCalShab);
}
}
37 changes: 35 additions & 2 deletions assets/libraries/kosherZmanim/kosher-zmanim.esm.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1201,6 +1201,12 @@ export interface OutputMetadata {
timeZoneID: string;
timeZoneOffset: string;
}
export type Enumerate<N extends number, Acc extends number[] = [
]> = Acc["length"] extends N ? Acc[number] : Enumerate<N, [
...Acc,
Acc["length"]
]>;
export type Range<F extends number, T extends number> = Exclude<Enumerate<T>, Enumerate<F>>;
/**
* The JewishDate is the base calendar class, that supports maintenance of a {@link java.util.GregorianCalendar}
* instance along with the corresponding Jewish date. This class can use the standard Java Date and Calendar
Expand Down Expand Up @@ -1992,7 +1998,7 @@ export declare class JewishDate {
*
* @return the day of the week as a number between 1-7.
*/
getDayOfWeek(): 1 | 2 | 3 | 4 | 5 | 6 | 7;
getDayOfWeek(): Range<1, 8>;
/**
* Sets the Gregorian month.
*
Expand Down Expand Up @@ -3681,6 +3687,12 @@ export declare class DafYomiYerushalmi extends Daf {
*/
getMasechta(): string;
}
export type Enumerate$1<N extends number, Acc extends number[] = [
]> = Acc["length"] extends N ? Acc[number] : Enumerate$1<N, [
...Acc,
Acc["length"]
]>;
export type Range$1<F extends number, T extends number> = Exclude<Enumerate$1<T>, Enumerate$1<F>>;
/**
* List of <em>parshiyos</em> or special <em>Shabasos</em>. {@link #NONE} indicates a week without a <em>parsha</em>, while the enum for
* the <em>parsha</em> of {@link #VZOS_HABERACHA} exists for consistency, but is not currently used. The special <em>Shabasos</em> of
Expand Down Expand Up @@ -4275,7 +4287,7 @@ export declare class JewishCalendar extends JewishDate {
* @return the day of <em>Chanukah</em> or -1 if it is not <em>Chanukah</em>.
* @see #isChanukah()
*/
getDayOfChanukah(): number;
getDayOfChanukah(): Range$1<1, 9> | -1;
/**
* Returns true if the current day is one of the 8 days of <em>Chanukah</em>.
* @return if the current day is one of the 8 days of <em>Chanukah</em>.
Expand Down Expand Up @@ -5040,6 +5052,26 @@ declare class WeeklyHaftarahReading {
source: string;
};
}
/**
* This class's main goal is to return the Weekly Haftorah reading said after the Weekly Parasha
* reading. Which readings to say were taken from the Chumash "L'maan Shemo B'Ahavah" according to
* the Sepharadic Minhag.
* @see WeeklyParashaReadings
*/
export type Unpacked<T> = T extends (infer U)[] ? U : T;
declare const entries: ("ADES: 24793" | "GABRIEL A SHREM 1964 SUHV" | "TABBUSH Ms NLI 8*7622, Aleppo" | "R COHEN \"SHIR USHBAHA\" Jerusalem, 1905" | "TEBELE Pre1888" | "ELIE SHAUL COHEN FROM AINTAB, ~1880" | "YAAQOB ABADI-PARSIYA" | "YISHAQ YEQAR ARGENTINA" | "Dibre Shelomo S KASSIN Pre1915" | "Knis Betesh Geniza List, Aleppo" | "ABRAHAM DWECK Pre1920" | "IDELSOHN Pre1923" | "S SAGIR Laniado" | "M H Elias, SHIR HADASH, Jerusalem, 1930" | "ASHEAR list" | "ASHEAR NOTES 1936-1940" | "ABRAHAM E SHREM ~1945" | "Argentina 1947 & Ezra Mishanieh" | "Shire Zimra H S ABOUD Jerusalem, 1950" | "D KASSIN/ ISAAC CAIN; RODFE SEDEQ; MEXICO" | "YOSEF YEHEZKEL Jerusalem 1975" | "Ish Massliah \"Abia Renanot\" Tunisians" | "Shaare Zimra YANANI Buenos Aires, 01" | "BOZO, Ades, Shir Ushbaha 2005" | "Yishaq Yeranen Halabi" | "MOSHE AMASH (Shami)" | "EZRA MASLATON TARAB (Shami)" | "ABRAHAM SHAMRICHA (Shami)" | "Victor Afya, Istanbul List" | "Izak Alaluf, Izmir List" | "Hallel VeZimrah, Salonika, 1928" | "Hallel VeZimrah, Greece List, 1926" | "SASSOON #647 Aleppo, 1850" | "Eliahou Yaaqob DWECK-KESAR")[];
declare class WeeklyMakamReading {
hierarchy: (Unpacked<typeof entries> | "MAJORITY")[];
constructor(hierarchy?: (Unpacked<typeof entries> | "MAJORITY")[]);
getTodayMakam(jCal: JewishCalendar): string[] | undefined;
/**
* This method returns a string that contains the weekly Makam. The {@link JewishCalendar}
* object passed into this method should be preset with the correct date.
* @param jCal the JewishCalendar object set to Saturday
* @return All the data fields
*/
static getMakamData(jCal: JewishCalendar): Partial<Record<Unpacked<typeof entries>, string[]>>;
}
export declare function getZmanimJson(options: Options): JsonOutput;
export interface Options {
/**
Expand Down Expand Up @@ -5070,6 +5102,7 @@ export declare const temporalExtended: {
export {
Temporal,
WeeklyHaftarahReading as Haftara,
WeeklyMakamReading as Makam,
};

export {};
10 changes: 5 additions & 5 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.

24 changes: 17 additions & 7 deletions pages/shul-wall/ish-matzliach-bk-small.html
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,11 @@
font-weight: 500;
font-size: 1.2rem;
}

.carousel-item > img {
height: 65vh;
object-fit: contain;
}
</style>

<div id="content" data-current-page="1" data-page-count="2">
Expand All @@ -225,7 +230,7 @@
<div id="background"></div>
<div id="shulBar"></div>
<div id="poweredBy">
Powered using זמני יוסף, developed by Maor Na'im. All Halachic times based on Maran Ovadia Yosef zt"l
Donated by Binyamin Kalimi ברכה והצלחה | Powered using זמני יוסף, developed by Maor Na'im. All Halachic times based on Maran Ovadia Yosef zt"l
</div>
<div id="topBar">
<div>
Expand All @@ -243,20 +248,20 @@
</div>
</div>
<div id="dataGrid">
<div>
<div style="line-height: 1.3;">
<dl class="list-group list-group-flush lh-sm" data-zfFind="DafYomi">
<div class="list-group-item d-flex justify-content-between">
<dt class="langTV lang-hb">תלמוד בבלי</dt>
<dt class="langTV lang-en">Talmud Bavli</dt>
<dd class="m-0" data-zfReplace="dafBavli"></dd>
</div>
</dl>
<h1 class="text-center mb-0 pt-3">Weekday Schedule</h1>
<div class="card">
<h1 class="text-center mb-0 pt-3" style="font-size: 1.75rem;">Weekday Schedule</h1>
<div class="card" style="font-size: 1.02rem;">
<ul class="list-group list-group-flush">
<li class="list-group-item d-flex justify-content-between align-items-center">
<b>Shaḥarit</b>
<span style="text-align: right;">Sun, 8:30 AM<br>Mon-Thu, 6:30 AM</span>
<span style="text-align: right;">Sun, 8:00 AM<br>Mon-Thu, 6:30 AM</span>
</li>
<li class="list-group-item d-flex justify-content-between">
<b>Weekly Events</b>
Expand All @@ -270,7 +275,7 @@ <h1 class="text-center mb-0 pt-3">Weekday Schedule</h1>
</div>
<h1 class="text-center mb-0 pt-3">Hiloulot of...</h1>
<div class="card hiloulotCard">
<div class="marquee" style="height: 75px;">
<div class="marquee" style="height: 60px; --length: 27.5s;">
<ul class="list-group list-group-flush marquee__content" data-fillText="There aren't any today" data-zfFind="hiloulah" data-zfIndex="en">
<li class="list-group-item">There aren't any today</li>
</ul>
Expand All @@ -285,7 +290,8 @@ <h1 class="text-center mb-0 pt-3">Hiloulot of...</h1>
</div>
</div>
<div>
<h1 class="text-center" style="font-size: 2rem;">Shabbat Schedule</h1>
<h1 class="text-center mb-0" style="font-size: 2rem; line-height: 1;">Shabbat Schedule</h1>
<h3 class="text-center" style="font-size: 1rem;" id="makam">🎵Makam </h3>
<div class="card" style="line-height: 1.25; font-size: 1.15rem;">
<ul class="list-group list-group-flush">
<li class="list-group-item d-flex justify-content-between" id="shirHashirim">
Expand All @@ -312,6 +318,10 @@ <h1 class="text-center" style="font-size: 2rem;">Shabbat Schedule</h1>
<b>Arvit</b>
<span>9:00 PM</span>
</li>
<li class="list-group-item d-flex justify-content-between" id="arvitMS">
<b>10th Tevet Fast</b>
<span>6:14 AM-5:04 PM</span>
</li>
</ul>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion pages/shul-wall/ish-matzliach-bk.html
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@
<div>
<dl class="list-group list-group-flush lh-sm" data-zfFind="DafYomi">
<div class="list-group-item d-flex justify-content-between">
<dt class="langTV lang-hb">תלנוד בבלי</dt>
<dt class="langTV lang-hb">תלמוד בבלי</dt>
<dt class="langTV lang-en">Talmud Bavli</dt>
<dd class="m-0" data-zfReplace="dafBavli"></dd>
</div>
Expand Down

0 comments on commit 4c8d6a3

Please sign in to comment.