%
// the skills information of theme _config.yml.
var mySkills = theme.mySkills.data;
var topSkillArr = [];
%>
<%- __('mySkills') %>
<% if (mySkills) { %>
<% Object.keys(mySkills).forEach(function(skill) { %>
<% topSkillArr.push(skill); %>
<%- skill %>
<%- mySkills[skill].percent %>
<% }); %>
<% } %>
<%
/**
* Determine if an element is included in the array.
*
* @param arr array
* @param value value
*/
var isInArray = function (arr, value) {
for (var i = 0; i < arr.length; i++) {
if (value == arr[i]) {
return true;
}
}
return false;
}
%>
<% if (site.tags) { %>
<%- __('otherSkills') %>
<% site.tags.map(function(tag) { %>
<% if (!isInArray(topSkillArr, tag.name)) { %>
<%- tag.name %>
<% } %>
<% }); %>
<% } %>