|
|
@ -19,6 +19,31 @@
|
|
|
|
onMount(async () => {
|
|
|
|
onMount(async () => {
|
|
|
|
window.showSlides(1, "mySlides2", "slideIndex2", 'dot2');
|
|
|
|
window.showSlides(1, "mySlides2", "slideIndex2", 'dot2');
|
|
|
|
window.showSlides(1, "mySlides3", "slideIndex3", 'dot3');
|
|
|
|
window.showSlides(1, "mySlides3", "slideIndex3", 'dot3');
|
|
|
|
|
|
|
|
const setup = () => {
|
|
|
|
|
|
|
|
const pList = document.querySelectorAll('p, li, a, span');
|
|
|
|
|
|
|
|
pList.forEach(p => noMoreLonelyWords(p));
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const clearWordBreaks = (target) => target.textContent = target.textContent.replace(/\u00a0/g, ' ');
|
|
|
|
|
|
|
|
const noMoreLonelyWords = (target) => {
|
|
|
|
|
|
|
|
let textArray = target.textContent.split(' ');
|
|
|
|
|
|
|
|
let newTextArray = [];
|
|
|
|
|
|
|
|
textArray.forEach((word, i, list) => {
|
|
|
|
|
|
|
|
let textEntry = '';
|
|
|
|
|
|
|
|
if(word.length === 1)
|
|
|
|
|
|
|
|
textEntry = word + '\xa0';
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
textEntry = word + ' ';
|
|
|
|
|
|
|
|
newTextArray.push(textEntry);
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
target.textContent = newTextArray.join('');
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
const updateWordBreaks = (target) => {
|
|
|
|
|
|
|
|
clearWordBreaks(target);
|
|
|
|
|
|
|
|
noMoreLonelyWords(target);
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
setup();
|
|
|
|
});
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|