Added to template.ftl x-twitter svg and js to replace twitter icon

This commit is contained in:
Vincenzo Cestone 2024-04-22 16:17:19 +02:00
parent 8e5c8b90ca
commit dd97c7da4b
2 changed files with 9 additions and 1 deletions

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--!Font Awesome Free 6.5.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons, Inc.--><path fill="#6a6e73" d="M389.2 48h70.6L305.6 224.2 487 464H345L233.7 318.6 106.5 464H35.8L200.7 275.5 26.8 48H172.4L272.9 180.9 389.2 48zM364.4 421.8h39.1L151.1 88h-42L364.4 421.8z"/></svg>

After

Width:  |  Height:  |  Size: 402 B

View File

@ -222,7 +222,14 @@
<#if properties.footerRow?has_content><div style="padding-top: 10px;">${kcSanitize(properties.footerRow)?no_esc}</div></#if>
</#if>
</footer>
<script>
let url = '${url.resourcesPath}/img/twitter.svg';
let iele = document.querySelectorAll('.fa-twitter');
iele.forEach(e => {
e.classList.remove('fa-twitter');
e.innerHTML = '<img src="' + url + '" style="width: 80%; height: 80%;" />';
})
</script>
</div>
</div>
</body>