diff --git a/content/papermod/index.njk b/content/papermod/index.njk
index 21f4d83..98467e3 100644
--- a/content/papermod/index.njk
+++ b/content/papermod/index.njk
@@ -37,6 +37,18 @@
#settings :first-child {
margin: 0;
}
+ #settings .form {
+ margin-top: var(--m2);
+ width: fit-content;
+ }
+ #settings .form div {
+ display: flex;
+ flex-direction: row;
+ }
+ #settings .form div * {
+ flex: 1;
+ float: left;
+ }
#document {
display: flex;
@@ -163,26 +175,36 @@
the analog organizer
I used to use this thing called PocketMod to lay out my paper organizer every week. It's defunct unless you can get Silverlight running somehow, so I made my own version with HTML and CSS.
Just fill out the form, click "generate", and use your browser's "print to pdf" function to get an 8 page document. To convert it into a booklet, I recommend using The Zine Arranger by Nash High or Pocketverter by Laur401 .
-
- start date:
-
-
-
- show week number
-
-
-
- always start on monday
-
-
-
- your name:
-
-
+
generate
clear all
print
@@ -339,6 +361,14 @@
return Math.ceil((((date - januaryFirst) / 86_400_000) + januaryFirst.getDay()+1) / 7);
}
+ function formatDate(date) {
+ const formatStr = document.querySelector('#settings-dateformat').value;
+ return (formatStr
+ .replace('mm', date.getMonth() + 1)
+ .replace('dd', date.getDate())
+ );
+ }
+
function update() {
document.querySelector('#user-name').textContent = document.querySelector('#settings-name').value;
document.querySelector('#user-contact').textContent = document.querySelector('#settings-contact').value;
@@ -356,13 +386,9 @@
document.querySelector('.week').textContent += `W${getWeek(startDate)}`;
}
- const mm1 = startDate.getMonth() + 1;
- const dd1 = startDate.getDate();
d = new Date(startDate);
d.setDate(d.getDate() + 6);
- const mm2 = d.getMonth() + 1;
- const dd2 = d.getDate();
- document.querySelector('.date').textContent = `${mm1}-${dd1} ⋯ ${mm2}-${dd2}`
+ document.querySelector('.date').textContent = `${formatDate(startDate)} ⋯ ${formatDate(d)}`
/* set up month */
const startDay = startDate.getDay();
@@ -378,7 +404,7 @@
/* set up week */
d = new Date(startDate);
for (const [i, el] of document.querySelectorAll('.week tr:nth-child(odd) td').entries()) {
- el.textContent = `${d.getMonth()+1}-${d.getDate()} ${weekday[d.getDay()]}`
+ el.textContent = `${formatDate(d)} ${weekday[d.getDay()]}`
d.setDate(d.getDate() + 1);
}
}