/* Add custom Js code below */ //////////////first////////////// // Define the image URL and link // Function to add a banner to a specific grid function addBanner(imageURL, linkURL, gridSelector) { // Create the new banner element const newBanner = document.createElement('a'); newBanner.className = 'banner-entry square-photos'; newBanner.href = linkURL; const newDiv = document.createElement('div'); newDiv.className = 'lazy__bg lazy entered loaded'; newDiv.setAttribute('data-bg', imageURL); newDiv.style.backgroundImage = `url("${imageURL}")`; // Append the div to the banner newBanner.appendChild(newDiv); // Append the new banner to the specified grid container const gridContainer = document.querySelector(gridSelector); if (gridContainer) { gridContainer.appendChild(newBanner); } } // Add the first item to the first grid addBanner( "https://cdn.salla.sa/form-builder/Je36TFHnYEIhcUuuaqegK8oVgrcRXXQKCxH6L6ou.png", "https://marinestuffksa.com/ar/%D8%B9%D9%88%D8%A7%D9%85%D8%A7%D8%AA-%D9%85%D8%A7%D8%A6%D9%8A%D8%A9-%D9%88-%D8%AA%D8%B4%D9%85%D9%8A%D8%B3/c191242053", "section:nth-child(1 of .s-block.s-block--banners.container) .grid" ); // Add the second item to the second grid addBanner( "https://cdn.salla.sa/form-builder/gHNmRHDBz3q0praXXbegTrNwUf8nf4cTFEwgDee5.png", "https://marinestuffksa.com/ar/%D8%B1%D9%85%D8%A7%D9%86%D8%A7%D8%AA/c1899591930", "section:nth-child(2 of .s-block.s-block--banners.container) .grid" ); //////////////////////////////////// let esm = "ورقة"; let link = "https://warrqa.com"; document.addEventListener("DOMContentLoaded", function () { document.querySelector(".copyright-text p").innerHTML = ` صنع بإتقان على | 2024 ${esm} `; }); ////////////////////// Location /* const footer = document.querySelector (`footer`); console.log(footer) const map = `
`; footer.insertAdjacentHTML('afterbegin', map);*/ /*const footerGrid = document.querySelector('footer .lg\\:grid-cols-6'); console.log(footerGrid); const map = `
`; // Insert the map inside the grid if (footerGrid) { footerGrid.insertAdjacentHTML('beforeend', map); }*/ // Select the container grid and the reference element const footerGrid = document.querySelector('footer .lg\\:grid-cols-6'); const referenceElement = footerGrid.querySelector('.lg\\:col-span-2.rtl\\:lg\\:pl-20.ltr\\:lg\\:pr-20'); console.log(referenceElement); const map = `
`; // Insert the map after the reference element if (referenceElement) { referenceElement.insertAdjacentHTML('afterend', map); }