Commit 9ade5d5f authored by Traboulsi's avatar Traboulsi
Browse files

Update public/js/add_content.js

parent 4107b256
Pipeline #8986 passed with stage
in 9 seconds
......@@ -86,7 +86,10 @@ function addcontent(item) {
if ('sdgImage' in 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-"></a> &nbsp;`;
var imageSize = '20px'; // Adjust this value to your desired size
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').style.width='${imageSize}'; document.querySelector('.btn-outline- img').style.height='${imageSize}'; 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-"></a> &nbsp;`;
}
//-- fin (new idea)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment