-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathlayout.html
237 lines (188 loc) · 8.93 KB
/
layout.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>{{ store.name }} | {{ __(page.title) }}</title>
<link rel="shortcut icon" href="{{ store.favicon }}">
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-36735942-3']);
_gaq.push(['_trackPageview']);
{% if store.googleAnalytics %}
_gaq.push(['b._setAccount', '{{ store.googleAnalytics }}']);
_gaq.push(['b._trackPageview']);
{% endif %}
(function () {
var ga = document.createElement('script');
ga.type = 'text/javascript';
ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') +
'.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(ga, s);
})();
</script>
<!-- Fonts -->
<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=Lato:ital,wght@0,100;0,300;0,400;0,700;0,900;1,100;1,300;1,400;1,700;1,900&display=swap" rel="stylesheet">
<!-- Generated via SASS -->
<link href="{{ asset('store.css') }}" rel="stylesheet">
<!-- FontAwesome -->
<script src="https://kit.fontawesome.com/a43b53df44.js" crossorigin="anonymous"></script>
<!-- Custom Theme CSS Output -->
<style>{{ store.css|raw }}</style>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-GLhlTQ8iRABdZLl6O3oVMWSktQOp6b7In1Zl3/Jr59b6EGGoI1aFkw7cmDA6j6gD" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.10.3/font/bootstrap-icons.css">
</head>
<body>
{% include "header_1.html" %}
<div class="notification">
{% if page.message.display %}
<div class="alert alert-{{ page.message.type}} mb-0 mb-4 container" role="alert">
{{ page.message.text }}
</div>
{% endif %}
</div>
{% block content %}{% endblock %}
<footer class="container-fluid px-0 px-lg-3">
<div class="footer-copyright py-3 container d-flex justify-content-between align-items-center">
<div>
<a href="#" class="font-weight-bold">Ether @ 2023</a>
</div>
<div class="row no-gutters align-items-center">
<div class="col-12 text-heading-font text-center text-md-left mb-4 mb-md-0">
<span class="branding">
{% if store.useCheckout %}
<a href="/terms/checkout" class="font-weight-bold">Terms |</a>
<a href="/terms/privacy" class="font-weight-bold">Privacy |</a>
<a href="/terms/impressum" class="font-weight-bold">Impressum</a>
{% endif %}
</span>
</div>
<div class="col-12 text-center text-md-right text-heading-font text-white">
{% if store.locales|length > 1 %}
<div class="btn-group dropup">
<button type="button" class="btn btn-primary d-block d-sm-inline-block dropdown-toggle"
data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<i class="fas fa-globe mr-2"></i> {{__("Language") }}
</button>
<div class="dropdown-menu">
{% for locale, name in store.locales %}
<a class="dropdown-item" href="?locale={{ locale }}">{{ name }}</a>
{% endfor %}
</div>
</div>
{% endif %}
</div>
</div>
</div>
</footer>
<div class="modal fade remote-modal" tabindex="-1" role="dialog" aria-labelledby="popup-modal" aria-hidden="true" id="popup-modal">
</div>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/js/bootstrap.bundle.min.js" integrity="sha384-w76AqPfDkMBDXo30jS1Sgez6pr3x5MlQ1ZAGC+nuZB+EYdgRZgiwxhTBTkF7CXvN" crossorigin="anonymous"></script>
{% if page.category == "checkout" %}
<script src="https://js.stripe.com/v2/"></script>
{% endif %}
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49"
crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.min.js" integrity="sha384-smHYKdLADwkXOn1EmN1qk/HfnUcbVRZyYmZ4qpPea6sjB/pTJ0euyQp0Mk8ck+5T"
crossorigin="anonymous"></script>
<script src="/templates/209/js/skin.min.js"></script>
<script src="/templates/209/js/site.js"></script>
<script>
jQuery(function () {
var countdowns = $(".countdown-to");
countdowns.each(function () {
setInterval(function (ele) {
timeLeft = parseInt(ele.attr("data-countdown"));
if (timeLeft == 0) {
ele.html("Time Expired!");
} else {
timeLeft--;
ele.attr("data-countdown", timeLeft);
var days = Math.floor(timeLeft / (60 * 60 * 24));
var hours = Math.floor((timeLeft % (60 * 60 * 24)) / (60 * 60));
var minutes = Math.floor((timeLeft % (60 * 60)) / (60));
var seconds = Math.floor((timeLeft % 60));
ele.html(days + "d " + hours + "h " + minutes + "m " + seconds + "s");
}
}, 1000, jQuery(this));
});
});
// PLAYER COUNT
try {
fetch(`https://api.minetools.eu/ping/mc.hypixel.net/25565`).then(res => res.json()).then(data => setServerCount(data.players.online));
} catch { console.log("Unable to fetch server player count from API.") }
try {
fetch(`https://discord.com/api/v9/invites/bedwars?with_counts=true`).then(res => res.json()).then(data => setDiscordCount(data.approximate_presence_count));
} catch { console.log("Unable to fetch Discord player count from API.") }
function setServerCount(count) {
try {
document.getElementById("serverCount").innerHTML = count;
} catch { console.log("Unable to set server player count.") }
}
function setDiscordCount(count) {
try {
document.getElementById("discordCount").innerHTML = count;
} catch { console.log("Unable to set Discord player count.") }
}
// SERVER COPY FUNCTIONALITY
let serverBtn = document.getElementById("serverLink");
let closePopupBtn = document.getElementById("closePopup");
let popup = document.querySelector(".popup");
let popupBack = document.querySelector(".popupBack");
serverBtn.addEventListener("click", () => {
popupDisplay(popup, popupBack, "block");
copyTextToClipboard(document.getElementById("serverText").dataset.ip)
});
closePopupBtn.addEventListener("click", () => popupDisplay(popup, popupBack, "none"));
function copyAddress() {
navigator.clipboard.writeText("mc.hypixel.net");
}
function popupDisplay(pop, popBack, value) {
pop.style.display = value;
popBack.style.display = value;
}
function fallbackCopyTextToClipboard(text) {
var textArea = document.createElement("textarea");
textArea.value = text;
textArea.style.top = "0";
textArea.style.left = "0";
textArea.style.position = "fixed";
document.body.appendChild(textArea);
textArea.focus();
textArea.select();
try {
var successful = document.execCommand('copy');
var msg = successful ? 'successful' : 'unsuccessful';
console.log('Fallback: Copying text command was ' + msg);
} catch (err) {
console.error('Fallback: Oops, unable to copy', err);
}
document.body.removeChild(textArea);
}
function copyTextToClipboard(text) {
if (!navigator.clipboard) {
fallbackCopyTextToClipboard(text);
return;
}
navigator.clipboard.writeText(text).then(function () {
console.log('Async: Copying to clipboard was successful!');
}, function (err) {
console.error('Async: Could not copy text: ', err);
});
}
function subtractPackage(id) {
let inputs = [...document.querySelectorAll(".package__quantity")].filter(i => i.name == `quantity[${id}]`);
inputs.forEach(input => input.setAttribute('value', input.value-1));
document.getElementById(`package--${id}`).submit();
}
</script>
</body>
</html>