|
def update_footer(): |
|
return """ |
|
function update_footer() { |
|
var footer = document.querySelector('footer') |
|
footer.innerHTML = "<a href='https://rsf.org/fr' class='footer-ekimetrics' target='_blank' rel='noreferrer'>脌 l'initiative de RSF</a>"; |
|
footer.innerHTML += "<a href='https://www.alliancepresse.fr/' class='footer-ekimetrics' target='_blank' rel='noreferrer'>et l'Alliance Presse</a>"; |
|
footer.innerHTML += "<div class='footer-ekimetrics'> 路 </div>"; |
|
footer.innerHTML += "<a href='https://www.culture.gouv.fr/' class='footer-ekimetrics' target='_blank' rel='noreferrer'>Avec le soutien du Minist猫re de la Culture</a>"; |
|
footer.innerHTML += "<div class='footer-ekimetrics'> 路 </div>"; |
|
footer.innerHTML += "<a href='https://ekimetrics.com/' class='footer-ekimetrics' target='_blank' rel='noreferrer'>Con莽u par Ekimetrics</a>"; |
|
} |
|
""" |
|
|
|
|
|
def accordion_trigger(): |
|
return """ |
|
function accordion_trigger() { |
|
var input_textbox = document.getElementById("input-textbox"); |
|
input_textbox.addEventListener('keyup', function (e) { |
|
if (e.key === 'Enter' || e.keyCode === 13) { |
|
document.querySelectorAll(".loader, .loader-helper").forEach(el => el.remove()); |
|
var accordions = document.querySelectorAll('.accordion-agent'); |
|
accordions.forEach(function (accordion) { |
|
var agentName = "Agent " + accordion.id.split('-')[1]; |
|
var buttonSpan = accordion.querySelector('button > span'); |
|
if (!accordion.classList.contains('spinoza-agent')) { |
|
buttonSpan.textContent = agentName; |
|
buttonSpan.innerHTML += "<span class='loader-helper'> - </span><span class='loader'>loading</span>"; |
|
} |
|
}); |
|
} |
|
}); |
|
} |
|
""" |
|
|
|
|
|
def accordion_trigger_end(): |
|
return """ |
|
function accordion_trigger_end() { |
|
var accordions = document.querySelectorAll('.accordion-agent'); |
|
|
|
accordions.forEach(function (accordion) { |
|
if (!accordion.classList.contains('spinoza-agent')) { |
|
var agentName = "Agent " + accordion.id.split('-')[1]; |
|
var buttonSpan = accordion.querySelector('button > span'); |
|
buttonSpan.textContent = agentName + " - ready"; |
|
} |
|
}); |
|
} |
|
""" |
|
|
|
|
|
def accordion_trigger_spinoza(): |
|
return """ |
|
function accordion_trigger_spinoza() { |
|
var accordion_spinoza = document.querySelector('.spinoza-agent'); |
|
document.querySelectorAll(".loader, .loader-helper").forEach(el => el.remove()); |
|
var buttonSpan = accordion_spinoza.querySelector('button > span'); |
|
buttonSpan.textContent = "Spinoza"; |
|
buttonSpan.innerHTML += "<span class='loader-helper'> - </span><span class='loader'>generating</span>"; |
|
} |
|
""" |
|
|
|
|
|
def accordion_trigger_spinoza_end(): |
|
return """ |
|
function accordion_trigger_spinoza_end() { |
|
var accordion_spinoza = document.querySelector('.spinoza-agent'); |
|
var buttonSpan = accordion_spinoza.querySelector('button > span'); |
|
buttonSpan.textContent = "Spinoza - ready"; |
|
} |
|
""" |
|
|