From 0288c98d7f3f39ab5967025a5a8e4d72a3843ff9 Mon Sep 17 00:00:00 2001
From: Traboulsi <salam.traboulsi@hft-stuttgart.de>
Date: Tue, 9 Jan 2024 07:59:39 +0000
Subject: [PATCH] Update public/js/add_content.js

---
 public/js/add_content.js | 34 ++--------------------------------
 1 file changed, 2 insertions(+), 32 deletions(-)

diff --git a/public/js/add_content.js b/public/js/add_content.js
index d41ae5f..3026954 100644
--- a/public/js/add_content.js
+++ b/public/js/add_content.js
@@ -82,39 +82,9 @@ function addcontent(item) {
       sdgProjectHTML = `<a class="btn btn-sm btn-outline-info mt-1" 
                          href="${sdgProjectLink}" 
                          target="_blank"
-                         onclick="var popupWindow=window.open('', '_blank'); popupWindow.document.body.innerHTML='<div style=\'text-align: center;\'><h2>SDG</h2><img src=\'${sdgProjectLink}\' alt=\'SDG Project Image\' style=\'width: 100%; max-width: 400px; background-color: white;\'><p>${titleLink}</p></div>'; popupWindow.document.title='${titleLink}';">
-                         <img src="imgs/thumbnails/sdg.png" alt="SDG" width="20" height="20"> Global Goals </a> &nbsp;`;
+                         onclick="var popupWindow=window.open('', '_blank'); popupWindow.document.body.innerHTML='<div style=\'text-align: center;\'><h2>SDG</h2><img src=\'${sdgProjectLink}\' alt=\'SDG Project Image\' style=\'width: 100%; max-width: 400px; background-color: white;\'><p>${titleLink}</p></div>'; popupWindow.document.title='${titleLink}';"><img src="imgs/thumbnails/sdg.png" alt="SDG" width="20" height="20"> Global Goals </a> &nbsp;`;
     }
-   /* var sdgProjectHTML = '';
-    if ('sdgImage' in item) {
-    var sdgProjectLink = item.sdgImage;
-    var customColor = '#8A2BE2';
-    //sdgProjectHTML = `<a class="btn btn-sm btn-outline-info mt-1" href="${sdgProjectLink}" target="_blank"> <i class="fas fa-sdg"></i> SDG Project</a> &nbsp;`
-    sdgProjectHTML = `<a class="btn btn-sm btn-outline- mt-1" style="color: ${customColor}; border-color: ${customColor};" href="${sdgProjectLink}" target="_blank"> <i class="fas fa-sdg"></i> SDG Project</a> &nbsp;`;
-    }*/
-    //-- debut
-    /*var sdgProjectHTML = '';
-    if ('sdgImage' in item.item) {
-    var sdgProjectLink = item.sdgImage;
-    var customColor = '#8A2BE2';
-    
-
-    sdgProjectHTML = `<a class="btn btn-sm btn-outline- mt-1" style="color: ${customColor}; border-color: ${customColor};" href="javascript:void(0);" onclick="document.querySelector('.btn-outline- img').src='${sdgProjectLink}'; document.querySelector('.btn-outline- img').alt='SDG Project Image'; document.querySelector('.btn-outline- img').onclick=function(){window.open('${sdgProjectLink}', '_blank');}"><img src="imgs/thumbnails/SDG-HFT.png" alt="SDG Project Image" class="btn-outline-" style="max-width:100px ; max-height:60px;"></a> &nbsp;`;*/
-
-    // Add a JavaScript function to change the image and open the link
-   /* sdgProjectHTML += `
-    <script>
-        function changeImage(sdgProjectLink) {
-            var img = document.querySelector('.btn-outline- img');
-            img.src = sdgProjectLink;
-            img.alt = 'SDG Project Image';
-            window.open(sdgProjectLink, '_blank');
-        }
-    </script>`;*/
-    //}
-
-
-    //-- fin (new idea)
+   
 
 // Salam ...
 
-- 
GitLab