From 47ee2787df3d888136d4e83b23f976f16a025665 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Hozman?= <tomas.hozman@pm.me>
Date: Tue, 20 Dec 2022 23:57:09 +0100
Subject: [PATCH] relative URLs

---
 content/static/js/avatar/internal_ui.js                |  2 +-
 content/static/js/avatar/template.js                   |  6 +++---
 content/static/js/base.js                              |  4 ++--
 content/static/js/spolu/template.js                    |  2 +-
 content/static/js/templates/event-text-bottom.js       |  6 +++---
 content/static/js/templates/event-text-right.js        |  6 +++---
 .../templates/no-image-big-text-icon-with-terciary.js  |  2 +-
 content/static/js/templates/no-image-big-text-icon.js  |  2 +-
 content/static/js/templates/no-image-icon-text.js      |  2 +-
 content/static/js/templates/no-image-quote.js          |  6 +++---
 content/static/js/templates/no-image-text-more-info.js |  2 +-
 content/static/js/templates/story-with-rectangle.js    |  4 ++--
 content/static/js/ui.js                                | 10 +++++-----
 13 files changed, 27 insertions(+), 27 deletions(-)

diff --git a/content/static/js/avatar/internal_ui.js b/content/static/js/avatar/internal_ui.js
index 43bf5bd..5c8f4af 100644
--- a/content/static/js/avatar/internal_ui.js
+++ b/content/static/js/avatar/internal_ui.js
@@ -675,7 +675,7 @@ $("#set-pirate-candidate").on(
 		// Make absolutely sure Bebas Neue is loaded.
 		// Quick fix
 		await (
-			fetch("/static/fonts/bebas-neue/BebasNeue.woff")
+			fetch("static/fonts/bebas-neue/BebasNeue.woff")
 			.then(resp => resp.arrayBuffer())
 			.then(font => {
 				const fontFace = new FontFace("Bebas Neue", font);
diff --git a/content/static/js/avatar/template.js b/content/static/js/avatar/template.js
index 38cbb5c..1c657b4 100644
--- a/content/static/js/avatar/template.js
+++ b/content/static/js/avatar/template.js
@@ -4,8 +4,8 @@ class AvatarTemplate {
 		this.context = this.canvas.getContext("2d");
 	}
 	
-	darkIconDefaultSource = "/static/images/badges/default-dark.png";
-	lightIconDefaultSource = "/static/images/badges/default-light.png";
+	darkIconDefaultSource = "static/images/badges/default-dark.png";
+	lightIconDefaultSource = "static/images/badges/default-light.png";
 	
 	text = "";
 	number = "";
@@ -338,7 +338,7 @@ class AvatarTemplate {
 									resolve();
 								}
 								
-								gradient.src = "/static/images/gradient.png";
+								gradient.src = "static/images/gradient.png";
 							}
 						);
 						
diff --git a/content/static/js/base.js b/content/static/js/base.js
index 692704f..f1ebb8b 100644
--- a/content/static/js/base.js
+++ b/content/static/js/base.js
@@ -69,8 +69,8 @@ class Template {
 	
 	defaultResolution = 2000;
 	
-	lightLogoDefaultSource = "/static/images/logos/default-light.png";
-	darkLogoDefaultSource = "/static/images/logos/default-dark.png";
+	lightLogoDefaultSource = "static/images/logos/default-light.png";
+	darkLogoDefaultSource = "static/images/logos/default-dark.png";
 
 	primaryColorSchemes = [];
 	
diff --git a/content/static/js/spolu/template.js b/content/static/js/spolu/template.js
index 68d3184..0e30da7 100644
--- a/content/static/js/spolu/template.js
+++ b/content/static/js/spolu/template.js
@@ -35,7 +35,7 @@ class PrimaryLocalizationTextBackgroundImageTemplate extends Template {
 	localizationText = "";
 	
 	backgroundImageSources = [
-		"/static/images/spolu/backgrounds/1.png",
+		"static/images/spolu/backgrounds/1.png",
 		
 	];
 	backgroundImage = null;
diff --git a/content/static/js/templates/event-text-bottom.js b/content/static/js/templates/event-text-bottom.js
index 0dc787c..7a53751 100644
--- a/content/static/js/templates/event-text-bottom.js
+++ b/content/static/js/templates/event-text-bottom.js
@@ -594,7 +594,7 @@ class EventTextBottom extends Template {
 								resolve();
 							}
 							
-							dateIcon.src = "/static/images/mini-icons/calendar.png";
+							dateIcon.src = "static/images/mini-icons/calendar.png";
 						}
 					);
 					
@@ -622,7 +622,7 @@ class EventTextBottom extends Template {
 								resolve();
 							}
 							
-							timeIcon.src = "/static/images/mini-icons/time.png";
+							timeIcon.src = "static/images/mini-icons/time.png";
 						}
 					);
 					
@@ -649,7 +649,7 @@ class EventTextBottom extends Template {
 								resolve();
 							}
 							
-							locationIcon.src = "/static/images/mini-icons/location.png";
+							locationIcon.src = "static/images/mini-icons/location.png";
 						}
 					);
 					
diff --git a/content/static/js/templates/event-text-right.js b/content/static/js/templates/event-text-right.js
index 456060d..c904ca3 100644
--- a/content/static/js/templates/event-text-right.js
+++ b/content/static/js/templates/event-text-right.js
@@ -561,7 +561,7 @@ class EventTextRight extends Template {
 								resolve();
 							}
 							
-							dateIcon.src = "/static/images/mini-icons/calendar.png";
+							dateIcon.src = "static/images/mini-icons/calendar.png";
 						}
 					);
 					
@@ -590,7 +590,7 @@ class EventTextRight extends Template {
 								resolve();
 							}
 							
-							timeIcon.src = "/static/images/mini-icons/time.png";
+							timeIcon.src = "static/images/mini-icons/time.png";
 						}
 					);
 					
@@ -619,7 +619,7 @@ class EventTextRight extends Template {
 								resolve();
 							}
 							
-							locationIcon.src = "/static/images/mini-icons/location.png";
+							locationIcon.src = "static/images/mini-icons/location.png";
 						}
 					);
 					
diff --git a/content/static/js/templates/no-image-big-text-icon-with-terciary.js b/content/static/js/templates/no-image-big-text-icon-with-terciary.js
index 05fa863..57d7841 100644
--- a/content/static/js/templates/no-image-big-text-icon-with-terciary.js
+++ b/content/static/js/templates/no-image-big-text-icon-with-terciary.js
@@ -18,7 +18,7 @@ class NoImageBigTextIconWithTerciary extends Template {
 	iconSource = null;
 	backgroundHasPattern = true;
 	
-	backgroundPatternSource = "/static/images/background_pattern.svg";
+	backgroundPatternSource = "static/images/background_pattern.svg";
 
 	primaryColorSchemes = [
 		"black-on-white",
diff --git a/content/static/js/templates/no-image-big-text-icon.js b/content/static/js/templates/no-image-big-text-icon.js
index 96b872d..f6d11f7 100644
--- a/content/static/js/templates/no-image-big-text-icon.js
+++ b/content/static/js/templates/no-image-big-text-icon.js
@@ -16,7 +16,7 @@ class NoImageBigTextIcon extends Template {
 	iconSource = null;
 	backgroundHasPattern = true;
 	
-	backgroundPatternSource = "/static/images/background_pattern.svg";
+	backgroundPatternSource = "static/images/background_pattern.svg";
 
 	primaryColorSchemes = [
 		"black-on-white",
diff --git a/content/static/js/templates/no-image-icon-text.js b/content/static/js/templates/no-image-icon-text.js
index 73e5dd2..bae399c 100644
--- a/content/static/js/templates/no-image-icon-text.js
+++ b/content/static/js/templates/no-image-icon-text.js
@@ -13,7 +13,7 @@ class NoImageIconText extends Template {
 	iconSource = null;
 	backgroundHasPattern = true;
 	
-	backgroundPatternSource = "/static/images/background_pattern.svg";
+	backgroundPatternSource = "static/images/background_pattern.svg";
 
 	primaryColorSchemes = [
 		"black-on-white",
diff --git a/content/static/js/templates/no-image-quote.js b/content/static/js/templates/no-image-quote.js
index 03bb61e..2496967 100644
--- a/content/static/js/templates/no-image-quote.js
+++ b/content/static/js/templates/no-image-quote.js
@@ -15,10 +15,10 @@ class NoImageQuote extends Template {
 	iconSource = null;
 	backgroundHasPattern = true;
 	
-	backgroundPatternSource = "/static/images/background_pattern.svg";
+	backgroundPatternSource = "static/images/background_pattern.svg";
 
-	quoteImageDarkSource = "/static/images/quote_light.png";
-	quoteImageLightSource = "/static/images/quote_dark.png";
+	quoteImageDarkSource = "static/images/quote_light.png";
+	quoteImageLightSource = "static/images/quote_dark.png";
 
 	primaryColorSchemes = [
 		"black-on-white",
diff --git a/content/static/js/templates/no-image-text-more-info.js b/content/static/js/templates/no-image-text-more-info.js
index 40b2ad0..e1edf44 100644
--- a/content/static/js/templates/no-image-text-more-info.js
+++ b/content/static/js/templates/no-image-text-more-info.js
@@ -17,7 +17,7 @@ class NoImageTextMoreInfo extends Template {
 	
 	terciaryText = "";
 	
-	quoteImageSource = "/static/images/quote_nontransparent.png";
+	quoteImageSource = "static/images/quote_nontransparent.png";
 	
 	primaryColorSchemes = [
 		"black-on-white",
diff --git a/content/static/js/templates/story-with-rectangle.js b/content/static/js/templates/story-with-rectangle.js
index 54397e8..bfb8bf5 100644
--- a/content/static/js/templates/story-with-rectangle.js
+++ b/content/static/js/templates/story-with-rectangle.js
@@ -48,8 +48,8 @@ class StoryWithRectangleTemplate extends Template {
 		"requesterTextColor"
 	];
 	
-	lightLogoDefaultSource = "/static/images/icon_light.png";
-	darkLogoDefaultSource = "/static/images/icon_dark.png";
+	lightLogoDefaultSource = "static/images/icon_light.png";
+	darkLogoDefaultSource = "static/images/icon_dark.png";
 	
 	aspectRatio = 0.5625;
 	defaultResolution = 1920;
diff --git a/content/static/js/ui.js b/content/static/js/ui.js
index 3f1621b..81120b2 100644
--- a/content/static/js/ui.js
+++ b/content/static/js/ui.js
@@ -1692,11 +1692,11 @@ async function setCoalition(coalition, template) {
 		switch (coalition) {
 			case "louny-spolecne":
 				if (template.changeableAttributes.includes("logoImage")) {
-					template.setDarkLogoSource("/static/images/logos/louny_spolecne-dark.png", true);
-					template.setLightLogoSource("/static/images/logos/louny_spolecne.png", true);
+					template.setDarkLogoSource("static/images/logos/louny_spolecne-dark.png", true);
+					template.setLightLogoSource("static/images/logos/louny_spolecne.png", true);
 				} else if (template.changeableAttributes.includes("verticalLogoImage")) {
-					template.setDarkLogoSource("/static/images/vertical-logos/Louny-dark.png", true);
-					template.setLightLogoSource("/static/images/vertical-logos/Louny-light.png", true);
+					template.setDarkLogoSource("static/images/vertical-logos/Louny-dark.png", true);
+					template.setLightLogoSource("static/images/vertical-logos/Louny-light.png", true);
 				}
 				
 				if (template.changeableAttributes.includes("locationImage")) {
@@ -1798,7 +1798,7 @@ $(window).ready(
 		// Make absolutely sure Bebas Neue is loaded.
 		// Quick fix
 		await (
-			fetch("/static/fonts/bebas-neue/BebasNeue.woff")
+			fetch("static/fonts/bebas-neue/BebasNeue.woff")
 			.then(resp => resp.arrayBuffer())
 			.then(font => {
 				const fontFace = new FontFace("Bebas Neue", font);
-- 
GitLab