-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathindex.html
252 lines (246 loc) · 16.6 KB
/
index.html
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
<!doctype html>
<html lang="en" dir="rtl">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="svg/Fa6SolidScrollTorah.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="manifest" href="manifest.json" />
<meta name="description"
content="קריאת שניים מקרא ואחד תרגום אונליין. האתר יציג לכם בצורה נוחה ובהתאמה אישית את הקריאה של הפסוקים ואת התרגום, תצוגה רספונסיבית, מותאמת לשימוש בנייד." />
<title>שניים מקרא ואחד תרגום - קריאה נוחה מותאמת אישית</title>
<script async src="https://www.googletagmanager.com/gtag/js?id=G-VHF5M16TPC"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag() { dataLayer.push(arguments); }
gtag('js', new Date());
gtag('config', 'G-VHF5M16TPC');
</script>
</head>
<body class="bg-[#f1f3f6] dark:bg-gray-900 dark:text-white transition-colors duration-300" x-data="app">
<div class="max-w-4xl mx-auto">
<!-- slide over for settings -->
<div class="relative z-50 w-auto h-auto">
<template x-teleport="body">
<div x-show="slideOverOpen" @keydown.window.escape="slideOverOpen=false" class="relative z-[99]">
<div x-show="slideOverOpen" x-transition.opacity.duration.600ms @click="slideOverOpen = false"
class="fixed inset-0 bg-black bg-opacity-10"></div>
<div class="fixed inset-0 overflow-hidden">
<div class="absolute inset-0 overflow-hidden">
<div class="fixed inset-y-0 right-0 flex max-w-full pl-10">
<div x-show="slideOverOpen" @click.away="slideOverOpen = false"
x-transition:enter="transform transition ease-in-out duration-500 sm:duration-700"
x-transition:enter-start="translate-x-full" x-transition:enter-end="translate-x-0"
x-transition:leave="transform transition ease-in-out duration-500 sm:duration-700"
x-transition:leave-start="translate-x-0" x-transition:leave-end="translate-x-full"
class="w-screen max-w-md">
<div
class="flex flex-col h-full py-5 bg-white dark:bg-gray-900 border-l shadow-lg border-neutral-100/70 dark:border-gray-700">
<div class="px-4 sm:px-5">
<div class="flex items-start justify-between pb-1">
<h2 class="text-base font-semibold leading-6 text-gray-900" id="slide-over-title">הגדרות</h2>
<div class="flex items-center h-auto ml-3">
<button @click="slideOverOpen=false"
class="flex items-center justify-center px-3 py-2 text-xs font-medium uppercase border rounded-md border-neutral-200 text-neutral-600 hover:bg-neutral-100 dark:border-gray-600 dark:text-gray-300 dark:hover:bg-gray-700">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5"
stroke="currentColor" class="w-4 h-4">
<path stroke-linecap="round" stroke-linejoin="round" d="M6 18L18 6M6 6l12 12"></path>
</svg>
<span>סגור</span>
</button>
</div>
</div>
</div>
<div class="relative flex-1 px-4 mt-5 sm:px-5">
<div class="absolute inset-0 px-4 sm:px-5">
<div
class="relative h-full overflow-hidden border border-dashed rounded-md border-neutral-300 dark:border-gray-600 p-2">
<div x-init="$watch('settings', () => onSettingsChangeHandler())">
<div class="mt-5 gap-4">
<div class="mb-5">
<button @click="toggleDarkMode()" class="flex items-center justify-center p-2 rounded-lg transition-colors duration-200
bg-gray-100 hover:bg-gray-200 dark:bg-gray-800 dark:hover:bg-gray-700
focus:outline-none focus:ring-2 focus:ring-blue-500"
:aria-label="isDarkMode ? 'עבור למצב בהיר' : 'עבור למצב כהה'">
<!-- Sun Icon -->
<svg x-show="isDarkMode" class="w-5 h-5 text-gray-200"
xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24"
stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
d="M12 3v1m0 16v1m9-9h-1M4 12H3m15.364 6.364l-.707-.707M6.343 6.343l-.707-.707m12.728 0l-.707.707M6.343 17.657l-.707.707M16 12a4 4 0 11-8 0 4 4 0 018 0z" />
</svg>
<!-- Moon Icon -->
<svg x-show="!isDarkMode" class="w-5 h-5 text-gray-700"
xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24"
stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
d="M20.354 15.354A9 9 0 018.646 3.646 9.003 9.003 0 0012 21a9.003 9.003 0 008.354-5.646z" />
</svg>
</button>
</div>
<div>חלוקה לפי:</div>
<div class="flex gap-2">
<div class="flex items-center gap-2">
<label for="pasuk" class="text-sm">פסוק</label>
<input type="radio" id="pasuk" value="pasuk" x-model="settings.order" class="h-4 w-4">
</div>
<div class="flex items-center gap-2">
<label for="parasha" class="text-sm">פרשה (פ/ס)</label>
<input type="radio" value="parasha" id="parasha" x-model="settings.order"
class="h-4 w-4">
</div>
<div class="flex items-center gap-2">
<label for="ali" class="text-sm">עלייה</label>
<input type="radio" id="ali" value="aliya" x-model="settings.order" class="h-4 w-4">
</div>
</div>
</div>
<div class="flex items-center gap-2 mt-5" x-show="settings.order === 'pasuk'">
<label for="pre-ine">הצג כל פסוק בשורה נפרדת</label>
<input type="checkbox" id="pre-ine" x-model="settings.preLine" class="h-4 w-4">
</div>
<div class="flex items-center gap-2 mt-5">
<label for="by-day">הצג עלייה לפי ימים</label>
<input type="checkbox" id="by-day" x-model="settings.aliyaByDay" class="h-4 w-4">
</div>
<div class="mt-5">
<div>פרשת השבוע:</div>
<div class="flex gap-2">
<div class="flex items-center gap-2">
<label for="israel" class="text-sm">א"י</label>
<input type="radio" value="israel" id="israel" x-model="settings.location"
class="h-4 w-4">
</div>
<div class="flex items-center gap-2">
<label for="chul" class="text-sm">חו"ל</label>
<input type="radio" id="chul" value="chul" x-model="settings.location"
class="h-4 w-4">
</div>
</div>
</div>
<div class="flex items-center gap-2 mt-5">
<label for="checkbox">הצג רש"י</label>
<input type="checkbox" id="checkbox" x-model="settings.showRashi" class="h-4 w-4">
</div>
<div x-show="settings.showRashi" class="text-sm flex gap-3">
<div class="flex items-center gap-2">
<label for="font-rashi">כתב רש"י</label>
<input type="checkbox" id="font-rashi" x-model="settings.fontRashi">
</div>
<div class="flex items-center gap-2">
<label for="nikud">הצג ניקוד</label>
<input type="checkbox" id="nikud" x-model="settings.rashiNikud">
</div>
</div>
<div class="mt-5">
<div> <label for="fontSize">גודל טקסט</label>
</div>
<input type="range" id="fontSize" name="cowbell" min="14" max="28"
x-model="settings.fontSize" step="2" />
</div>
</div>
<div class="absolute bottom-0 right-0 left-0 bg-gray-100 dark:bg-gray-800 w-full p-3">
<div class="text-center text-sm">
צור קשר: <a href="mailto:[email protected]">[email protected]</a>
</div>
<div class="flex items-center justify-center gap-2 mt-2">
<a href="https://github.com/meirlamdan/shnayim-mikra">
<svg height="24" aria-hidden="true" viewBox="0 0 16 16" version="1.1" width="24"
class="hover:fill-slate-600">
<path
d="M8 0c4.42 0 8 3.58 8 8a8.013 8.013 0 0 1-5.45 7.59c-.4.08-.55-.17-.55-.38 0-.27.01-1.13.01-2.2 0-.75-.25-1.23-.54-1.48 1.78-.2 3.65-.88 3.65-3.95 0-.88-.31-1.59-.82-2.15.08-.2.36-1.02-.08-2.12 0 0-.67-.22-2.2.82-.64-.18-1.32-.27-2-.27-.68 0-1.36.09-2 .27-1.53-1.03-2.2-.82-2.2-.82-.44 1.1-.16 1.92-.08 2.12-.51.56-.82 1.28-.82 2.15 0 3.06 1.86 3.75 3.64 3.95-.23.2-.44.55-.51 1.07-.46.21-1.61.55-2.33-.66-.15-.24-.6-.83-1.23-.82-.67.01-.27.38.01.53.34.19.73.9.82 1.13.16.45.68 1.31 2.69.94 0 .67.01 1.3.01 1.49 0 .21-.15.45-.55.38A7.995 7.995 0 0 1 0 8c0-4.42 3.58-8 8-8Z">
</path>
</svg>
</a>
<a href="https://www.buymeacoffee.com/meirl" title="Buy Me a Coffee">
<img src="svg/buymeacoffee.svg" alt="buy mea coffee">
</a>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</template>
</div>
<!-- end slide over -->
<div class="px-2 pt-6 pb-2">
<h1 class="text-center text-2xl font-semibold print:text-xl">שניים מקרא ואחד תרגום</h1>
<div class="hidden print:block text-center text-xl print:text-lg font-semibold mb-7">פרשת <span
x-text="selectParasha"></span>
</div>
<div x-cloak class="flex items-center justify-between my-10 print:hidden">
<div x-text="heDateAndParasha()"></div>
<div class="flex gap-4">
<div @click="window.print()" class="cursor-pointer">
<svg xmlns="http://www.w3.org/2000/svg" class="stroke-1 hover:stroke-[8]" width="24" height="24"
viewBox="0 0 256 256" stroke-linecap="round" stroke="currentColor">
<path fill="currentColor"
d="M214.67 76H196V40a4 4 0 0 0-4-4H64a4 4 0 0 0-4 4v36H41.33C29.57 76 20 85 20 96v80a4 4 0 0 0 4 4h36v36a4 4 0 0 0 4 4h128a4 4 0 0 0 4-4v-36h36a4 4 0 0 0 4-4V96c0-11-9.57-20-21.33-20M68 44h120v32H68Zm120 168H68v-56h120Zm40-40h-32v-20a4 4 0 0 0-4-4H64a4 4 0 0 0-4 4v20H28V96c0-6.62 6-12 13.33-12h173.34C222 84 228 89.38 228 96Zm-32-56a8 8 0 1 1-8-8a8 8 0 0 1 8 8" />
</svg>
</div>
<div @click="toggleSettings" class="cursor-pointer">
<svg xmlns="http://www.w3.org/2000/svg" class="stroke-1 hover:stroke-2" width="24" height="24"
viewBox="0 0 24 24" stroke-width="1" stroke="currentColor" fill="none" stroke-linecap="round"
stroke-linejoin="round">
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
<path
d="M10.325 4.317c.426 -1.756 2.924 -1.756 3.35 0a1.724 1.724 0 0 0 2.573 1.066c1.543 -.94 3.31 .826 2.37 2.37a1.724 1.724 0 0 0 1.065 2.572c1.756 .426 1.756 2.924 0 3.35a1.724 1.724 0 0 0 -1.066 2.573c.94 1.543 -.826 3.31 -2.37 2.37a1.724 1.724 0 0 0 -2.572 1.065c-.426 1.756 -2.924 1.756 -3.35 0a1.724 1.724 0 0 0 -2.573 -1.066c-1.543 .94 -3.31 -.826 -2.37 -2.37a1.724 1.724 0 0 0 -1.065 -2.572c-1.756 -.426 -1.756 -2.924 0 -3.35a1.724 1.724 0 0 0 1.066 -2.573c-.94 -1.543 .826 -3.31 2.37 -2.37c1 .608 2.296 .07 2.572 -1.065z" />
<path d="M9 12a3 3 0 1 0 6 0a3 3 0 0 0 -6 0" />
</svg>
</div>
</div>
</div>
<div x-cloak class="flex justify-center items-center gap-x-10 mb-10 print:hidden">
<div @click="moveParasha(true)">
<svg xmlns="http://www.w3.org/2000/svg" class="cursor-pointer stroke-1 hover:stroke-2" width="24" height="24"
viewBox="0 0 24 24" stroke-width="1" stroke="currentColor" fill="none" stroke-linecap="round"
stroke-linejoin="round">
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
<path d="M9 6l6 6l-6 6"></path>
</svg>
</div>
<select
class="border border-gray-300 dark:border-gray-600 text-gray-900 dark:text-gray-300 dark:bg-gray-800 text-sm rounded-lg focus:ring-blue-500 dark:focus:ring-blue-400 focus:outline-none p-1 custom-scrollbar"
x-model="selectParasha" @change="getText(selectParasha)">
<template x-for="p in parshiyotList">
<option :selected="selectParasha === p" x-text="p"></option>
</template>
</select>
<div @click="moveParasha()"><svg xmlns="http://www.w3.org/2000/svg"
class="cursor-pointer stroke-1 hover:stroke-2" width="24" height="24" viewBox="0 0 24 24"
stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
<path d="M15 6l-6 6l6 6"></path>
</svg></div>
</div>
</div>
<div class="sticky top-0 p-2 bg-[#f1f3f6] dark:bg-gray-900 m-x[-5px] print:hidden">
<div x-cloak class="font-medium mb-1">פרשת <span x-text="selectParasha"></span> </div>
<div>
<template x-for="(aliya,i) in ['ראשון','שני','שלישי','רביעי','חמישי','שישי','שביעי']" :key="aliya">
<button class=" ml-3 p-1 text-sm shadow rounded transition-colors"
:class="i===currentAliya ? 'bg-gray-300 dark:bg-gray-700': 'bg-white dark:bg-gray-800'" x-text="aliya"
@click="scrollToAliya(i)">
</button>
</template>
</div>
</div>
<div x-cloak x-show="text" id="text" x-ref="text"
class="text-justify bg-white dark:dark:bg-gray-800 py-3 px-5 shadow rounded print:shadow-none print:rounded-none"
:class="{'whitespace-pre-line':settings.preLine, 'font-rashi': settings.fontRashi}"
:style="{'font-size': `${settings.fontSize}px`}" x-html="text">
</div>
<div class="hidden print:block text-center mt-5"><a :href="location.href">הודפס מאתר <span x-text="location.host"
class="text-blue-950 underline"></span></a></div>
<div class="flex justify-center items-center h-screen" x-show="!text">
<div class="loader"></div>
</div>
</div>
<script type="module" src="/main.js"></script>
</body>
</html>