From 46949d74b06642f8354c76375926d1e822ae27af Mon Sep 17 00:00:00 2001 From: Tomas Dvorak Date: Thu, 29 May 2025 10:16:21 +0200 Subject: [PATCH] img fetch --- index.html | 33 ++++++++++++++++++++++++++++++--- 1 file changed, 30 insertions(+), 3 deletions(-) diff --git a/index.html b/index.html index f769906..7453895 100644 --- a/index.html +++ b/index.html @@ -104,10 +104,11 @@ `; // Create image container - let imgContainer = ` + const imgContainer = ` `; + // Add image to content + content += imgContainer; + // Wrap image with link if URL is provided if (bannerLink) { imgContainer = ` @@ -190,7 +195,29 @@ } } - // Close the banner content container + // Add text if it exists + if (bannerText) { + const textStyle = ` + margin: 0; + padding: 10px; + line-height: 1.6; + color: ${textColor}; + text-align: ${textAlign}; + font-size: ${fontSize}; + `; + + // Wrap text in link if URL is provided + const textElement = bannerLink + ? `${bannerText}` + : bannerText; + + content += ` + `; + } + + // Set the content and make banner visible bannerContent.innerHTML = content; // Log the content for debugging