torah sections

This commit is contained in:
Lazy Hippopotamus
2024-04-08 20:10:02 -04:00
parent 9241e5aa92
commit a8c3793083
6 changed files with 167 additions and 23 deletions

View File

@@ -74,7 +74,7 @@
</div> </div>
<div id="library"> <div id="libpages"> <a href="http://localhost:8080/library/library-entry.html"> <span>Library Entry</span> <p> This library entry is sure to boggle the mind! Lorem ipsum dolor sit amet, consectetur adipisicing elit. Magnam nam unde sequi nemo voluptatem voluptate autem quaerat perspiciatis! Error ut, velit sed rerum voluptatum officiis pariatur unde facilis inventore eligendi? <div id="library"> <div id="libpages"> <a href="http://localhost:8080/library/library-entry.html"> <span>Library Entry</span> <p> This library entry is sure to boggle the mind! Lorem ipsum dolor sit amet, consectetur adipisicing elit. Magnam nam unde sequi nemo voluptatem voluptate autem quaerat perspiciatis! Error ut, velit sed rerum voluptatum officiis pariatur unde facilis inventore eligendi?
</p> <span><img src="http://localhost:8080/res/librarrow.svg"></span> </a> <a href="http://localhost:8080/library/library-entry-2.html"> <span>Library Entry Two</span> <p> This is the second Library Entry, for testing. This is a very real blurb! It has important information, just enough to entice the visitor to click! </p> <span><img src="http://localhost:8080/res/librarrow.svg"></span> </a> <a href="http://localhost:8080/library/library-entry-2.html"> <span>Library Entry Two</span> <p> This is the second Library Entry, for testing. This is a very real blurb! It has important information, just enough to entice the visitor to click!
</p> <span><img src="http://localhost:8080/res/librarrow.svg"></span> </a> </div> <div id="study"> <div id="study-inner"> <h1 style="color: var(--kuwaitred);">Daily Study</h1> <div> Something to study! </div> <div> Something else to study! </div> </div> </div> </div> </p> <span><img src="http://localhost:8080/res/librarrow.svg"></span> </a> </div> <div id="study"> <div id="study-inner"> <h1 style="color: var(--kuwaitred);">Daily Study</h1> <div> Weekly Chok L'Yisrael Torah section: <b id="torahsection"></b> </div> </div> </div> </div> <script src="http://localhost:8080/torahstudy.js"></script>
<div class="bottom"> <div class="bottom">
<img src="http://localhost:8080/res/Avraham_Society.png"> <img src="http://localhost:8080/res/Avraham_Society.png">
<div> <div>

View File

@@ -55,7 +55,7 @@ img {
} }
#main > div, #main > p { #main > div, #main > p {
background-color: var(--cream); background-color: var(--scrollpaperlight);
} }
#main > p:first-of-type { #main > p:first-of-type {
@@ -73,7 +73,7 @@ img {
#main > div.space { #main > div.space {
background-color: transparent; background-color: transparent;
height: clamp(150px, 30vh, 500px); height: clamp(150px, 30vh, 500px);
border-bottom: 50px solid var(--cream); border-bottom: 50px solid var(--scrollpaperlight);
} }
#main > div.bottom { #main > div.bottom {
@@ -120,7 +120,7 @@ img {
top: 3px; top: 3px;
left: 0px; left: 0px;
clip-path: inherit; clip-path: inherit;
background-color: var(--cream); background-color: var(--scrollpaperlight);
} }
#title { #title {
@@ -145,7 +145,7 @@ img {
top: -3px; top: -3px;
left: 0px; left: 0px;
z-index: -1; z-index: -1;
background-color: var(--cream); background-color: var(--scrollpaperlight);
clip-path: inherit; clip-path: inherit;
} }
@@ -175,8 +175,8 @@ div#nav {
} }
div#banner { div#banner {
background-color: var(--scrollpaperlight); background-color: var(--humanbody);
color: black; color: white;
/*--colorslant-point: clamp(20px, 10vw, 200px); /*--colorslant-point: clamp(20px, 10vw, 200px);
background-image: linear-gradient(90deg, var(--kuwaitred) 0px, var(--kuwaitred) var(--colorslant-point), white var(--colorslant-point), white calc(100% - var(--colorslant-point)), var(--kuwaitred) calc(100% - var(--colorslant-point)));*/ background-image: linear-gradient(90deg, var(--kuwaitred) 0px, var(--kuwaitred) var(--colorslant-point), white var(--colorslant-point), white calc(100% - var(--colorslant-point)), var(--kuwaitred) calc(100% - var(--colorslant-point)));*/
border-bottom: 4px solid var(--scrollight); border-bottom: 4px solid var(--scrollight);
@@ -198,7 +198,7 @@ div#banner {
} }
#nav > a { #nav > a {
color: black; color: inherit;
} }
#banner > a > img { #banner > a > img {
@@ -349,7 +349,7 @@ h1 {
left: 0px; left: 0px;
width: 100%; width: 100%;
height: 50px; height: 50px;
background-image: linear-gradient(transparent 0%, white 100%); background-image: linear-gradient(transparent 0%, var(--scrollpaperlight) 100%);
z-index: 100000; z-index: 100000;
} }
@@ -393,7 +393,6 @@ h1 {
background-color: var(--deepcream); background-color: var(--deepcream);
padding: 40px; padding: 40px;
margin: 10px; margin: 10px;
border-radius: 20px;
position: sticky; position: sticky;
top: 40%; top: 40%;
} }

74
output/torahstudy.js Executable file
View File

@@ -0,0 +1,74 @@
// Manages the Torah Study section of the Library
var chocklyisrael = [ // 54 Torah sections, updates every sunday (or whatever day he wants really)
"Bereishit",
"Noach",
"Lech Lecha",
"Vayeira",
"Chayei Sarah",
"Toldot",
"Vayeitzei",
"Vayishlach",
"Vayeishev",
"Mikeitz",
"Vayigash",
"Vayechi",
"Shemot",
"Vaeira",
"Bo",
"Beshalach",
"Yitro",
"Mishpatim",
"Terumah",
"Tetzaveh",
"Ki Tissa",
"Vayakhel",
"Pekudei",
"Vayikra",
"Tzav",
"Shemini",
"Tazria",
"Metzora",
"Acharei Mot",
"Kedoshim",
"Emor",
"Behar",
"Bechukotai",
"Bamidbar",
"Naso",
"Behalotkha",
"Shelach",
"Korach",
"Chukat",
"Balak",
"Pinchas",
"Mattot",
"Masei",
"Devarim",
"Vaetchanan",
"Eikev",
"Reaih",
"Shoftim",
"Ki Teitzei",
"Ki Tavo",
"Nitzavim",
"Vayelech",
"Haazinu",
"Zot Haberakha"
];
const oneDay = 24 * 60 * 60 * 1000; // hours * minutes * seconds * milliseconds
const tripDay = 0; // sunday
var startDate = new Date("2024-4-8");
var now = new Date();
var dif = now - startDate;
var difDays = Math.round(dif / oneDay);
/*difDays 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
day sun mon tue wed thu fri sat sun mon tue wed thu fri sat sun mon tue wed thu fri sat sun mon tue wed thu fri sat sun mon tue wed thu fri sat
*/
var tripsSince = Math.floor(difDays / 7);
if (now.getDay() == tripDay) {
tripsSince++;
}
document.getElementById("torahsection").innerText = chocklyisrael[tripsSince];

View File

@@ -16,14 +16,12 @@
<div id="study-inner"> <div id="study-inner">
<h1 style="color: var(--kuwaitred);">Daily Study</h1> <h1 style="color: var(--kuwaitred);">Daily Study</h1>
<div> <div>
Something to study! Weekly Chok L'Yisrael Torah section: <b id="torahsection"></b>
</div>
<div>
Something else to study!
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<script src="[^baseurl]/torahstudy.js"></script>
[/] [/]
[=title "Library"] [=title "Library"]

View File

@@ -55,7 +55,7 @@ img {
} }
#main > div, #main > p { #main > div, #main > p {
background-color: var(--cream); background-color: var(--scrollpaperlight);
} }
#main > p:first-of-type { #main > p:first-of-type {
@@ -73,7 +73,7 @@ img {
#main > div.space { #main > div.space {
background-color: transparent; background-color: transparent;
height: clamp(150px, 30vh, 500px); height: clamp(150px, 30vh, 500px);
border-bottom: 50px solid var(--cream); border-bottom: 50px solid var(--scrollpaperlight);
} }
#main > div.bottom { #main > div.bottom {
@@ -120,7 +120,7 @@ img {
top: 3px; top: 3px;
left: 0px; left: 0px;
clip-path: inherit; clip-path: inherit;
background-color: var(--cream); background-color: var(--scrollpaperlight);
} }
#title { #title {
@@ -145,7 +145,7 @@ img {
top: -3px; top: -3px;
left: 0px; left: 0px;
z-index: -1; z-index: -1;
background-color: var(--cream); background-color: var(--scrollpaperlight);
clip-path: inherit; clip-path: inherit;
} }
@@ -175,8 +175,8 @@ div#nav {
} }
div#banner { div#banner {
background-color: var(--scrollpaperlight); background-color: var(--humanbody);
color: black; color: white;
/*--colorslant-point: clamp(20px, 10vw, 200px); /*--colorslant-point: clamp(20px, 10vw, 200px);
background-image: linear-gradient(90deg, var(--kuwaitred) 0px, var(--kuwaitred) var(--colorslant-point), white var(--colorslant-point), white calc(100% - var(--colorslant-point)), var(--kuwaitred) calc(100% - var(--colorslant-point)));*/ background-image: linear-gradient(90deg, var(--kuwaitred) 0px, var(--kuwaitred) var(--colorslant-point), white var(--colorslant-point), white calc(100% - var(--colorslant-point)), var(--kuwaitred) calc(100% - var(--colorslant-point)));*/
border-bottom: 4px solid var(--scrollight); border-bottom: 4px solid var(--scrollight);
@@ -198,7 +198,7 @@ div#banner {
} }
#nav > a { #nav > a {
color: black; color: inherit;
} }
#banner > a > img { #banner > a > img {
@@ -349,7 +349,7 @@ h1 {
left: 0px; left: 0px;
width: 100%; width: 100%;
height: 50px; height: 50px;
background-image: linear-gradient(transparent 0%, white 100%); background-image: linear-gradient(transparent 0%, var(--scrollpaperlight) 100%);
z-index: 100000; z-index: 100000;
} }
@@ -393,7 +393,6 @@ h1 {
background-color: var(--deepcream); background-color: var(--deepcream);
padding: 40px; padding: 40px;
margin: 10px; margin: 10px;
border-radius: 20px;
position: sticky; position: sticky;
top: 40%; top: 40%;
} }

74
site/torahstudy.js Normal file
View File

@@ -0,0 +1,74 @@
// Manages the Torah Study section of the Library
var chocklyisrael = [ // 54 Torah sections, updates every sunday (or whatever day he wants really)
"Bereishit",
"Noach",
"Lech Lecha",
"Vayeira",
"Chayei Sarah",
"Toldot",
"Vayeitzei",
"Vayishlach",
"Vayeishev",
"Mikeitz",
"Vayigash",
"Vayechi",
"Shemot",
"Vaeira",
"Bo",
"Beshalach",
"Yitro",
"Mishpatim",
"Terumah",
"Tetzaveh",
"Ki Tissa",
"Vayakhel",
"Pekudei",
"Vayikra",
"Tzav",
"Shemini",
"Tazria",
"Metzora",
"Acharei Mot",
"Kedoshim",
"Emor",
"Behar",
"Bechukotai",
"Bamidbar",
"Naso",
"Behalotkha",
"Shelach",
"Korach",
"Chukat",
"Balak",
"Pinchas",
"Mattot",
"Masei",
"Devarim",
"Vaetchanan",
"Eikev",
"Reaih",
"Shoftim",
"Ki Teitzei",
"Ki Tavo",
"Nitzavim",
"Vayelech",
"Haazinu",
"Zot Haberakha"
];
const oneDay = 24 * 60 * 60 * 1000; // hours * minutes * seconds * milliseconds
const tripDay = 0; // sunday
var startDate = new Date("2024-4-8");
var now = new Date();
var dif = now - startDate;
var difDays = Math.round(dif / oneDay);
/*difDays 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
day sun mon tue wed thu fri sat sun mon tue wed thu fri sat sun mon tue wed thu fri sat sun mon tue wed thu fri sat sun mon tue wed thu fri sat
*/
var tripsSince = Math.floor(difDays / 7);
if (now.getDay() == tripDay) {
tripsSince++;
}
document.getElementById("torahsection").innerText = chocklyisrael[tripsSince];