Energy. Climate.

Development.

We work to ensure everyone, everywhere can live a dignified life on a healthy planet, powered by sustainable energy.

Learn more
${node.field_featured_image ? `${node.field_featured_image.alt}` : ''}
${node.type === 'event' ? `
${node.field_event_subtypes ? node.field_event_subtypes.toUpperCase() : ''} | ${formatEventDate(node.field_start_date)}
` : ''} ${node.type === 'event' ? `
${node.field_location ? node.field_location.toUpperCase() : ''}
` : ''} ${node.type === 'news' ? `
${formatDate(node.field_date)}
` : ''}
`; return newCard; } // Gather manually set elements and fixed card information const manualCards = Array.from(document.querySelectorAll('.news-and-events-carousel .card')).map((card, index) => ({ element: card, isFixed: card.dataset.fixed === 'true', originalIndex: index })); let currentRightIndex = totalCards; let currentLeftIndex = latestNewsAndEvents.length - 1; // Function to render initial set of cards including manually set elements function renderInitialCards() { // Get the current screen width const screenWidth = window.innerWidth; // Loop through the manualCards array and create cards manualCards.forEach((manualCard, index) => { if (!manualCard.isFixed) { const newCard = createCard(latestNewsAndEvents[index - 1], index - 1); manualCard.element.replaceWith(newCard); } }); } renderInitialCards(); arrowRight.addEventListener('click', function(event) { event.preventDefault(); let nonFixedCardIndices = []; manualCards.forEach((manualCard, index) => { if (!manualCard.isFixed) { nonFixedCardIndices.push(index); } }); if (nonFixedCardIndices.length) { const firstIndex = nonFixedCardIndices[0]; cardsContainer.children[firstIndex].remove(); const newCard = createCard(latestNewsAndEvents[currentRightIndex], currentRightIndex); cardsContainer.appendChild(newCard); currentRightIndex = (currentRightIndex + 1) % latestNewsAndEvents.length; // Update non-fixed card indices nonFixedCardIndices = nonFixedCardIndices.map(i => (i + 1) % latestNewsAndEvents.length); } }); arrowLeft.addEventListener('click', function(event) { event.preventDefault(); let nonFixedCardIndices = []; manualCards.forEach((manualCard, index) => { if (!manualCard.isFixed) { nonFixedCardIndices.push(index); } }); if (nonFixedCardIndices.length) { const lastIndex = nonFixedCardIndices[nonFixedCardIndices.length - 1]; cardsContainer.children[lastIndex].remove(); currentLeftIndex = (currentLeftIndex - 1 + latestNewsAndEvents.length) % latestNewsAndEvents.length; const newCard = createCard(latestNewsAndEvents[currentLeftIndex], currentLeftIndex); cardsContainer.insertBefore(newCard, cardsContainer.children[nonFixedCardIndices[0]]); } }); });

Impactful support to Brazil, India and Nigeria

These countries are taking some of the boldest steps towards promoting and implementing a just and equitable energy transition – domestically and internationally.

READ MORE

Country Spotlights

  Brazil

Brazil

SEforALL is supporting the Brazil G20 Presidency with accelerating financing for energy transitions, especially in emerging markets and developing economies, and the social dimensions of the energy transition.

Learn more
  India

India

SEforALL is working with the Indian government to advance its climate and energy goals through energy efficiency, coordinated through a Mission Efficiency Unit within the Bureau of Energy Efficiency.

Learn more
  Nigeria

Nigeria

The energy transition is an opportunity to build a more sustainable future for Africa's most populous country. SEforALL is working on a wide set of initiatives with the Government of Nigeria and other partners

Learn more
  Sierra Leone

Sierra Leone

SEforALL's work in Sierra Leone is diverse and impactful - from installing solar PV and batteries on hospitals to improve healthcare services, to providing grant financing for mini-grid projects, and more.

Learn more
VIEW MORE
${country.field_featured_image.alt}
${ country.field_flag ? `${country.field_flag.alt}` : "" } ${country.title}
${country.body || "No description available."}
${country.link_title || "Learn More"}
`; countryPanelContent.innerHTML = cardHTML; // Attach event listeners to the dynamically created buttons const prevArrow = document.getElementById("country-panel-prev-arrow"); const nextArrow = document.getElementById("country-panel-next-arrow"); if (prevArrow) { prevArrow.addEventListener("click", () => { updatePanel(currentIndex - 1); }); } else { console.error("Previous arrow not found in DOM after dynamic update."); } if (nextArrow) { nextArrow.addEventListener("click", () => { updatePanel(currentIndex + 1); }); } else { console.error("Next arrow not found in DOM after dynamic update."); } } // Function to update the panel with a new country's data based on index function updatePanel(index) { // Update the current index and ensure it's within bounds currentIndex = (index + latest_countries_json.length) % latest_countries_json.length; // Get the country data by the updated index const country = latest_countries_json[currentIndex]; if (!country) { console.error(`No country found at index: ${currentIndex}`); return; } // Populate the panel with the new country's data populateCountryCard(country.title); MakeMarkerOutstand(country.title) } function GetOtherMarkers(CountryName) { const otherMarkers = []; // Loop through all markers Object.keys(markers).forEach((name) => { if (name !== CountryName) { const marker = markers[name]; // Get the marker object if (marker && marker._icon) { const markerElement = marker._icon; // Get the element if (markerElement) { otherMarkers.push(markerElement); // Add to the list of other markers } } } }); return otherMarkers; // Return the list of elements } function MakeMarkerOutstand(CountryName) { const myMarker = markers[CountryName]; // Look up the marker by name in the object if (!myMarker) { console.error(`Marker for "${CountryName}" not found.`); return; } const markerElement = myMarker._icon; if (!markerElement) { console.error(`Marker icon for "${CountryName}" not found.`); return; } // Change the src attribute to the new image URL markerElement.src = "https://www.seforall.org/sites/default/files/2024-12/circle_ffb800.png"; // Get all other markers except "Brazil" const otherMarkerImgs = GetOtherMarkers(CountryName); // Change their src attributes to the default image otherMarkerImgs.forEach((img) => { img.src = "https://www.seforall.org/sites/default/files/2024-09/white.png"; }); } // Wait for the DOM to load before adding event listeners and initializing document.addEventListener("DOMContentLoaded", () => { // Populate the first country on load if (latest_countries_json.length > 0) { //populateCountryCard(latest_countries_json[0].title); populateCountryCard("Brazil"); MakeMarkerOutstand("Brazil"); } else { console.error("latest_countries_json is empty or not defined."); } });

Transitioning Energy.

Transforming Lives.

We use global advocacy, scalable solutions and tailored country support to end energy poverty and fight climate change.

Learn more

Latest Research

VIEW MORE
VIEW MORE