summaryrefslogtreecommitdiff
path: root/public/javascripts/public.js
diff options
context:
space:
mode:
Diffstat (limited to 'public/javascripts/public.js')
-rw-r--r--public/javascripts/public.js39
1 files changed, 1 insertions, 38 deletions
diff --git a/public/javascripts/public.js b/public/javascripts/public.js
index 10f04e8..07ee05a 100644
--- a/public/javascripts/public.js
+++ b/public/javascripts/public.js
@@ -1,23 +1,6 @@
1Shadowbox.init({
2 skipSetup : true
3});
4
5
6$(document).ready(function(){ 1$(document).ready(function(){
7 2
8 Shadowbox.setup(".shadowbox_image", {gallery : "fofo"}) 3 GLightbox({ selector: '.glightbox' });
9
10 if ($("#headline_image img").length != 0) {
11 image_handler.initialize();
12 }
13
14 $("div#headline_image a").bind("click", function() {
15 return false;
16 });
17
18 $("div#headline_image a img").bind("click", function(){
19 $(".shadowbox_image:first").trigger("click");
20 });
21 4
22 document.getElementById("light-mode").addEventListener("change", () => { 5 document.getElementById("light-mode").addEventListener("change", () => {
23 if (document.getElementById("light-mode").checked) 6 if (document.getElementById("light-mode").checked)
@@ -26,23 +9,3 @@ $(document).ready(function(){
26 localStorage.removeItem("override-prefers-color-scheme"); 9 localStorage.removeItem("override-prefers-color-scheme");
27 }); 10 });
28}); 11});
29
30
31var image_handler = {
32 initialize : function() {
33
34 path_name = window.location.pathname;
35 locale_rexexp = /^\/(en|de)\\/;
36 locale_match = locale_rexexp.exec(path_name);
37
38 if (locale_match) {
39 locale = locale_match[0];
40 }
41 else {
42 locale = "/de/";
43 }
44
45 path = path_name.replace(/\/(de|en)*\/*/, "");
46 gallery_path = "";
47 }
48};