Skip to content

Instantly share code, notes, and snippets.

@proweb
Last active November 17, 2021 09:34
Show Gist options
  • Save proweb/17272710a9268bd839459c076bf7d560 to your computer and use it in GitHub Desktop.
Save proweb/17272710a9268bd839459c076bf7d560 to your computer and use it in GitHub Desktop.
VK render in Yootheme builder
UIkit.icon.add('vk','<svg height="20px" style="enable-background:new 0 0 20 20;" version="1.1" viewBox="0 0 512 512" width="20px" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g id="comp_x5F_364-vk"><g><path d="M475.515,137.899c3.16-10.674,0-18.53-15.2-18.53h-50.297c-12.809,0-18.702,6.746-21.861,14.261 c0,0-25.617,62.422-61.825,102.899c-11.698,11.699-17.078,15.457-23.482,15.457c-3.158,0-8.027-3.758-8.027-14.432v-99.655 c0-12.809-3.588-18.53-14.176-18.53h-79.075c-8.027,0-12.809,5.978-12.809,11.528c0,12.125,18.104,14.943,19.983,49.101v74.123 c0,16.225-2.904,19.212-9.308,19.212c-17.079,0-58.581-62.678-83.174-134.409c-4.952-13.919-9.821-19.555-22.715-19.555H43.25 c-14.346,0-17.25,6.746-17.25,14.261c0,13.32,17.079,79.502,79.502,166.945c41.587,59.689,100.167,92.056,153.453,92.056 c32.022,0,35.951-7.173,35.951-19.555c0-57.045-2.903-62.425,13.152-62.425c7.428,0,20.237,3.757,50.127,32.534 c34.155,34.158,39.792,49.445,58.92,49.445h50.297c14.347,0,21.606-7.173,17.421-21.351 c-9.564-29.801-74.208-91.114-77.111-95.213c-7.429-9.564-5.295-13.835,0-22.375C407.799,253.608,469.195,167.189,475.515,137.899 L475.515,137.899z"/></g></g><g id="Layer_1"/></svg>');
UIkit.icon.add('ok','<svg enable-background="new 0 0 30 30" height="20px" id="Odnoklassniki" version="1.1" viewBox="0 0 30 30" width="30px" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><path d="M22,15c-1,0-3,2-7,2s-6-2-7-2c-1.104,0-2,0.896-2,2c0,1,0.568,1.481,1,1.734C8.185,19.427,12,21,12,21l-4.25,5.438 c0,0-0.75,0.935-0.75,1.562c0,1.104,0.896,2,2,2c1.021,0,1.484-0.656,1.484-0.656S14.993,23.993,15,24 c0.007-0.007,4.516,5.344,4.516,5.344S19.979,30,21,30c1.104,0,2-0.896,2-2c0-0.627-0.75-1.562-0.75-1.562L18,21 c0,0,3.815-1.573,5-2.266C23.432,18.481,24,18,24,17C24,15.896,23.104,15,22,15z" id="K"/><path d="M15,0c-3.866,0-7,3.134-7,7s3.134,7,7,7c3.865,0,7-3.134,7-7S18.865,0,15,0z M15,10.5c-1.933,0-3.5-1.566-3.5-3.5 c0-1.933,1.567-3.5,3.5-3.5c1.932,0,3.5,1.567,3.5,3.5C18.5,8.934,16.932,10.5,15,10.5z" id="O"/></svg>');
document.addEventListener('DOMContentLoaded', function () {
document.querySelectorAll('a[uk-icon][href*="vk.com"]').forEach(function (vkIcon) {
vkIcon.setAttribute('uk-icon', vkIcon.getAttribute('uk-icon')
.replace('social', 'vk'));
});
document.querySelectorAll('a[uk-icon][href*="t.me"]').forEach(function (vkIcon) {
vkIcon.setAttribute('uk-icon', vkIcon.getAttribute('uk-icon')
.replace('social', 'telegram'));
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment