mirror of
https://github.com/TryGhost/Ruby.git
synced 2024-10-30 04:48:33 +02:00
29 lines
830 B
JavaScript
29 lines
830 B
JavaScript
|
$(function () {
|
||
|
'use strict';
|
||
|
social();
|
||
|
});
|
||
|
|
||
|
function social() {
|
||
|
'use strict';
|
||
|
var data = {
|
||
|
facebook: {name: 'Facebook', icon: 'facebook'},
|
||
|
twitter: {name: 'Twitter', icon: 'twitter'},
|
||
|
instagram: {name: 'Instagram', icon: 'instagram'},
|
||
|
dribbble: {name: 'Dribbble', icon: 'dribbble'},
|
||
|
behance: {name: 'Behance', icon: 'behance'},
|
||
|
github: {name: 'GitHub', icon: 'github-circle'},
|
||
|
linkedin: {name: 'LinkedIn', icon: 'linkedin'},
|
||
|
vk: {name: 'VK', icon: 'vk'},
|
||
|
rss: {name: 'RSS', icon: 'rss'},
|
||
|
};
|
||
|
var links = themeOptions.social_links;
|
||
|
var output = '';
|
||
|
|
||
|
for (var key in links) {
|
||
|
if (links[key] != '') {
|
||
|
output += '<a class="social-item" href="' + links[key] + '" target="_blank"><i class="icon icon-' + data[key]['icon'] + '"></i></a>';
|
||
|
}
|
||
|
}
|
||
|
|
||
|
$('.social').html(output);
|
||
|
}
|