-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
290 lines (248 loc) · 15 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
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Brihat Calendar</title>
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta property="og:title" content="Brihat Calendar" />
<meta property="og:image" content="./assets/brihat_calendar.png" />
<meta property="og:type" content="calendar" />
<meta property="og:site_name" content="Brihat Calendar" />
<meta property="og:url" content="https://calendar.brihatrb.com.np" />
<meta property="og:description" content="Brihat Calendar" />
<meta name="twitter:card" content="summary" />
<meta name="twitter:site" content="@Brihat9" />
<meta name="twitter:title" content="Brihat Calendar" />
<meta name="twitter:description" content="Bikram Sambat, Anno Domini and Solar Nepal Sambat Calendar (proposed) with Lunar (Pakshya), National, International Events Information and Muhoorttas, Nepalese Public Holidays" />
<meta name="twitter:image" content="./assets/brihat_calendar.png" />
<meta name="twitter:image:alt" content="Brihat Calendar" />
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.0/css/bootstrap.min.css" integrity="sha384-9gVQ4dYFwwWSjIDZnLEWnxCjeSWFphJiwGPXr1jddIhOegiu1FwO5qRGvFXOdJZ4" crossorigin="anonymous">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" />
<link rel="stylesheet" href="./css/public_holidays.css" />
<link rel="stylesheet" href="./css/index.css" />
<link rel="stylesheet" href="./css/index_cal_conv.css" />
<link rel="stylesheet" href="./css/index_details.css" />
<link rel="stylesheet" href="./css/parvas.css" />
<link rel="stylesheet" href="./css/settings.css" />
<link rel="stylesheet" href="./css/muhoortta.css" />
<link rel="stylesheet" href="./css/clock.css" />
<link rel="icon" href="./assets/logo.svg">
<meta name="theme-color" content="#ffa500">
<link rel="manifest" href="./manifest.json">
<link rel="apple-touch-icon" href="./assets/logo.svg">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Gotu&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Laila&display=swap" rel="stylesheet">
</head>
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-VPYN9860PL"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-VPYN9860PL');
</script>
<body onbeforeunload="return on_unload()" onload="loading_anim();">
<div id="loading">
<img id="loading_anim" src="./assets/loading_anim.svg" alt="Generating Calendar ..." />
<span id="loading_title">Brihat Calendar</span>
<noscript>Please enable JavaScript and reload</noscript>
</div>
<main>
<div class="container-md" align="center">
<div class="clockcontainer">
<div class="clock">
<span class="ticks" style="--ticks:5"><b>·</b></span>
<span class="ticks" style="--ticks:10"><b>·</b></span>
<span class="ticks num" style="--ticks:15"><b>3</b></span>
<span class="ticks" style="--ticks:20"><b>·</b></span>
<span class="ticks" style="--ticks:25"><b>·</b></span>
<span class="ticks num" style="--ticks:30"><b>6</b></span>
<span class="ticks" style="--ticks:35"><b>·</b></span>
<span class="ticks" style="--ticks:40"><b>·</b></span>
<span class="ticks num" style="--ticks:45"><b>9</b></span>
<span class="ticks" style="--ticks:50"><b>·</b></span>
<span class="ticks" style="--ticks:55"><b>·</b></span>
<span class="ticks num" style="--ticks:00"><b>12</b></span>
<div id="timetype">---</div>
<div class="hand iniani" id="clockyear"><i></i></div>
<div id="digital">
<span id="digital_hour">00</span>
<span id="digital_minute">00</span>
<span id="digital_second">00</span>
</div>
<div class="hand iniani" id="hour"><i></i></div>
<div class="handrev iniani" id="rev_hour"><i></i></div>
<div class="hand iniani" id="minute"><i></i></div>
<div class="handrev iniani" id="rev_minute"><i></i></div>
<div class="hand iniani" id="second"><i></i></div>
<div class="handrev iniani" id="rev_second"><i></i></div>
<div style="--clr:white;--ht:10px;--wt:10px; z-index: 999;" class="hand" id="dot" onclick="toggle_lang();">
<i></i>
</div>
</div>
</div>
<div class="card">
<h3 class="card-header" id="monthAndYear"></h3>
<table class="table table-bordered table-responsive-md mx-auto" id="calendar">
<thead>
<tr id="table_header_row" align="center"></tr>
</thead>
<tbody align="center" id="calendar-body"></tbody>
</table>
<!-- added on 2023 FEB 21 to display muhoorttas BS Calendar -->
<div id="muhoortta_box"></div>
<!-- added on 2022 OCT 24 to display event list under calendar (different for each calendar view) -->
<div id="parvas" style="display: none;"></div>
<!-- added on 2023 FEB 19 to display public holiday list under AD and Solar Nepal Sambat Calendar -->
<div id="public_holiday_box"></div>
<div id="prev_today_next" class="form-inline">
<button class="btn btn-outline-dark btn-sm" id="previous" onclick="previous()">« PREV </button>
<button class="btn btn-info" id="default" onclick="go_to_today()">TODAY</button>
<button class="btn btn-outline-dark btn-sm" id="next" onclick="next()">NEXT »</button>
</div>
<button class="btn btn-outline-dark btn-sm" id="app_open_link" style="display: none;" onclick="location.href='brihat://calendar'">OPEN IN APP</button>
<div id="date_converter_div" style="display: none;">
<a id="solarnsconverter" href="https://brihatrb.com.np/solarnsconverter/solarnsconverter.html"> » Solar Nepal Sambat Converter « </a>
</div>
<button class="btn btn-outline-dark btn-sm" id="print" onclick="print()" style="display: none;">⎙ PRINT THIS MONTH ⎙</button>
<form id="brihat_calendar_date_jumper" class="form-inline">
<label class="col-sm-2" for="month">Jump To: </label>
<select class="form-control col-sm-5" name="month" id="month" onchange="jump()"></select>
<label for="year"></label>
<select class="form-control col-sm-5" name="year" id="year" onchange="jump()"></select>
</form>
</div>
<!-- For Date Details onClick -->
<div class="modal" id="myModal" tabindex="-1">
<div class="modal-dialog modal-dialog-centered">
<div class="modal-content">
<!-- Modal Header -->
<div class="modal-header text-center d-block">
<button type="button" class="close" data-dismiss="modal">×</button>
<h4 class="modal-title" id="modal_title">Loading Date ...</h4>
</div>
<!-- Modal body -->
<div class="modal-body" id="modal_body">
Loading Details ...
</div>
<span id="suggestion" onclick="show_suggest_form()">Suggest an edit</span>
<span id="suggestion_info"></span>
<form id="javascript_form">
<input type="text" name="subject" placeholder="Subject" id="suggest_subject" />
<textarea name="text" placeholder="Message" id="suggest_message"></textarea>
<input type="submit" id="js_send" value="SEND SUGGESTION" />
<!-- not required, but we'd appreciate it if you'd link to us somewhere on your site -->
<span id="credit">Powered by <a href="https://postmail.invotes.com" target="_blank">PostMail</a></span>
</form>
<!-- Modal footer -->
<div class="modal-footer">
<span class="mr-auto" id='modal_author'>brihat (brihatbajracharya@gmail.com)</span>
<button type="button" class="btn btn-danger" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<!-- USER INOFS (HIDDEN via CSS) -->
<div id="user_info"></div>
<div id="g_info"></div>
</div>
<!-- added on 25 OCT 2022: preferences -->
<div id="settings"><i class="fa fa-cog fa-3x fa-spin-hover" aria-hidden="true"></i></div>
<nav id="settings_pane" class="sidebar">
<div id="settings_title">PREFERENCES</div>
<div id="settings_dismiss" class="dismiss">
<i class="fa fa-arrow-left fa-2x"></i>
</div>
<br /><br />
<ul id="preferences_list" class="list-unstyled">
<li>Show/Hide Components</li>
<hr class="gear_hr" />
<li><input type="checkbox" id="check_all" onchange="toggle_all()" autocomplete="off"/><label for="check_all"> Show All Components</label></li>
<li><input type="checkbox" id="check_tithis" onchange="toggle_tithis()" checked autocomplete="off"/><label for="check_tithis"> Show Tithis</label></li>
<li><input type="checkbox" id="check_info_box" onchange="toggle_info_box()" autocomplete="off"/><label for="check_info_box"> Show Event Info Box</label></li>
<li><input type="checkbox" id="check_muhoortta_box" onchange="toggle_muhoortta_box()" autocomplete="off"/><label for="check_muhoortta_box"> Show Muhoortta Box</label></li>
<li><input type="checkbox" id="check_converter_link" onchange="toggle_converter_link()" autocomplete="off"/><label for="check_converter_link"> Show Date Converter Link</label></li>
<li><input type="checkbox" id="check_print_button" onchange="toggle_print_button()" autocomplete="off"/><label for="check_print_button"> Show Print Button</label></li>
<li><input type="checkbox" id="check_date_jumper" onchange="toggle_date_jumper()" checked autocomplete="off"/><label for="check_date_jumper"> Show Date Jumper</label></li>
<br />
<li>Appearance</li>
<hr class="gear_hr" />
<li><input type="checkbox" id="invert_color" onchange="toggle_invert_color()" autocomplete="off"/><label for="invert_color"> Invert Color</label></li>
<li><input type="checkbox" id="check_pakshya_lang" onchange="toggle_pakshya_lang()" autocomplete="off"/><label for="check_pakshya_lang"> Show Pakshya in NEPALI</label></li>
<li><input type="checkbox" id="check_public_holiday_lang" onchange="toggle_public_holiday_lang()" autocomplete="off"/><label for="check_public_holiday_lang"> Show Holiday Box in ENGLISH</label></li>
<li style="margin-top: 10px; font-size: small;">Event Info Box Language Config</li>
<hr class="gear_hr_2" />
<li><input type="checkbox" id="check_lang_info_solarns" onchange="toggle_lang_info_solarns('solarns')" autocomplete="off"/><label for="check_lang_info_solarns"> <span>Show Solar Nepal Sambat Events in ENGLISH</span></label></li>
<li><input type="checkbox" id="check_lang_info_national" onchange="toggle_lang_info_solarns('national')" autocomplete="off"/><label for="check_lang_info_national"> <span>Show National Events in ENGLISH</span></label></li>
<li><input type="checkbox" id="check_lang_info_international" onchange="toggle_lang_info_international()" autocomplete="off"/><label for="check_lang_info_international"> <span>Show International Events in NEPALI</span></label></li>
<li><input type="checkbox" id="check_lang_info_other" onchange="toggle_lang_info_solarns('other')" autocomplete="off"/><label for="check_lang_info_other"> <span>Show Other Events in NEPALI</span></label></li>
</ul>
<div id="config_mgmt">
<button id="save_preferences" class="btn btn-info" onclick="save_current_config()">SAVE CURRENT CONFIG</button>
<button id="reset_default" class="btn btn-dark" onclick="reset_default_config()">RESTORE DEFAULT CONFIG</button>
</div>
<br />
<div id="setting_pane_author"></div>
</nav>
<!-- <button name="jump" onclick="jump()">Go</button> -->
<!-- Custom Scripts -->
<script src="./js/base/NS.js"></script>
<script src="./js/base/NS_AD.js"></script>
<script src="./js/base/NS_BS.js"></script>
<script src="./js/base/AD_BS.js"></script>
<script src="./js/addons/utils.js"></script>
<script src="./js/addons/public_holidays.js"></script>
<script src="./js/addons/muhoortta.js"></script>
<script src="./js/addons/parvas.js"></script>
<script src="./js/calendar/index.js"></script>
<script src="./js/calendar/index_cal_conv.js"></script>
<script src="./js/calendar/index_details.js"></script>
<script src="./js/addons/clock.js"></script>
<script src="./js/addons/infos.js"></script>
<script src="./js/addons/suggest_edit.js"></script>
<script src="./js/addons/swipe_actions.js"></script>
<script src="./js/addons/keypress_actions.js"></script>
<script src="./js/settings.js"></script>
<script>
function on_window_resize() {
let table = document.getElementById("calendar");
if (window.innerWidth > 768) {
table.classList.remove("w-auto");
} else {
table.classList.add("w-auto");
}
}
window.onresize = on_window_resize;
on_window_resize()
function on_unload() {
// return 'Are you sure you want to leave?';
};
</script>
<script src="https://ipinfo.io/json?callback=recordData&token=6630ba13ce995d"></script>
<!-- Optional JavaScript for bootstrap -->
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.0/umd/popper.min.js" integrity="sha384-cs/chFZiN24E4KMATLdqdvsezGxaGsi4hLGOzlXwp5UZB1LY//20VyM2taTB4QvJ" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.0/js/bootstrap.min.js" integrity="sha384-uefMccjFJAIv6A+rW+L4AHf99KvxDjWSu1z9VI8SKNVmz4sk7buKt/6v9KI65qnm" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/sweetalert/2.1.1/sweetalert.min.js"></script>
<script>
function loading_anim() {
document.getElementById('loading').style.display = "none";
// init_anim();
}
</script>
<script>
if ("serviceWorker" in navigator) {
window.addEventListener("load", function() {
navigator.serviceWorker
.register("./serviceWorker.js")
.then(res => console.info("service worker registered"))
.catch(err => console.warn("service worker not registered", err));
});
}
</script>
</main>
</body>
</html>