-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
155 lines (139 loc) · 7.28 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="description"
content="List of Lunar, National and International Events with Public Holidays observed in Nepal" />
<meta name="keywords"
content="brihat, ratna, bajracharya, events, public holidays, events, national, lunar, international, brihat events" />
<meta name="author" content="Brihat Ratna Bajracharya" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="og:title" content="Brihat Ratna Bajracharya" />
<meta property="og:image" content="./assets/brihat_events_logo.png" />
<meta property="og:type" content="blog" />
<meta property="og:site_name" content="Brihat Events" />
<meta property="og:url" content="https://events.brihatrb.com.np" />
<meta property="og:description" content="Brihat Events" />
<meta name="twitter:card" content="summary" />
<meta name="twitter:site" content="@Brihat9" />
<meta name="twitter:title" content="Brihat Events" />
<meta name="twitter:description"
content="List of Lunar, National and International Events with Public Holidays observed in Nepal" />
<meta name="twitter:image" content="./assets/brihat_events_logo.png" />
<meta name="twitter:image:alt" content="Brihat Events" />
<link rel="icon" href="./assets/favicon.ico" type="image/x-icon" />
<link rel="stylesheet" href="./css/index.css" />
<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">
<title>Brihat Events | Lunar, National, International Events, Nepalese Public Holidays</title>
</head>
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-TL6DN30DV4"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag() { dataLayer.push(arguments); }
gtag('js', new Date());
gtag('config', 'G-TL6DN30DV4');
</script>
<body onload="loading_anim();">
<div id="loading">
<img id="loading_anim" src="./assets/loading_anim.svg" alt="Populating Events ..." />
<span id="loading_title">Brihat Events</span>
<noscript>Please enable JavaScript and reload</noscript>
</div>
<div id="top">
<div id="compiled_by_header">Compiled by: Brihat Ratna Bajracharya <span id="list_view"
style="position: absolute; right:5px;"><a style="color: darkblue; text-decoration: none;"
href="./index_list.html">View in Searchable List</a></span></div>
<div id="option_div">
<div class="nav_div" id="national_events" onclick="show_content(1);">National Events</div>
<div class="nav_div" id="lunar_events" onclick="show_content(2);">Lunar Events</div>
<div class="nav_div" id="holiday_events" onclick="show_content(3);">Public Holidays</div>
<div class="nav_div" id="international_events" onclick="show_content(4);">International Events</div>
</div>
</div>
<div id="year_select" class="public">
<label for="year">वि. सं. </label>
<select name="year" id="year" onchange="show_content();">
<option value="2076">२०७६</option>
<option value="2077">२०७७</option>
<option value="2078">२०७८</option>
<option value="2079">२०७९</option>
<option value="2080">२०८०</option>
<option value="2081" selected>२०८१</option>
</select>
</div>
<div id="main_div"></div>
<div id="special_note"></div>
<div id="compiled_by_footer">Compiled by: Brihat Ratna Bajracharya</div>
<script>
function loading_anim() {
document.getElementById('loading').style.display = "none";
}
</script>
<script type="text/javascript" src="https://calendar.brihatrb.com.np/js/base/NS.js"
crossorigin="anonymous"></script>
<script type="text/javascript" src="https://calendar.brihatrb.com.np/js/base/NS_AD.js"
crossorigin="anonymous"></script>
<script type="text/javascript" src="https://calendar.brihatrb.com.np/js/base/NS_BS.js"
crossorigin="anonymous"></script>
<script type="text/javascript" src="https://calendar.brihatrb.com.np/js/base/AD_BS.js"
crossorigin="anonymous"></script>
<script type="text/javascript" src="./js/addons.js"></script>
<script type="text/javascript" src="./js/constants.js"></script>
<script type="text/javascript" src="./js/index.js"></script>
<script type="text/javascript" src="./js/swipe_actions.js"></script>
<script type="text/javascript">
const containers = document.getElementsByClassName('scrollable-container');
const contents = document.getElementsByClassName('scrollable-content');
// Check if content overflows
function checkOverflow() {
for (let i = 0; i < containers.length; i++) {
const container = containers[i];
const content = contents[i];
const isOverflowing = content.offsetWidth > container.offsetWidth;
if (isOverflowing) {
const scrollDistance = content.offsetWidth - container.offsetWidth + 20; // Calculate distance
const animationDuration = (scrollDistance / 100) + 10 + 's'; // Adjust duration based on distance and pause time
content.style.animationDuration = animationDuration; // Set duration
// Adjust keyframes dynamically
const keyframes = `
@keyframes scroll-${i} {
0% {
transform: translateX(0);
}
40% {
transform: translateX(-${scrollDistance}px); /* Scroll until right end is visible */
}
50% {
transform: translateX(-${scrollDistance}px); /* Hold position for delay */
}
90% {
transform: translateX(0); /* Scroll back to starting position */
}
100% {
transform: translateX(0); /* Hold position for delay */
}
}
`;
// Create a style element for keyframes
const styleSheet = document.createElement("style");
styleSheet.type = "text/css";
styleSheet.innerText = keyframes;
document.head.appendChild(styleSheet);
// Apply the specific keyframes animation
content.style.animation = `scroll-${i} ${animationDuration} linear infinite`;
} else {
content.style.animationPlayState = 'paused'; // Pause if no overflow
content.style.transform = 'translateX(0)'; // Reset position to the start
}
}
}
// Initial check
checkOverflow();
// Re-check on window resize
window.addEventListener('resize', checkOverflow);
</script>
</body>
</html>