33 lines
881 B
JavaScript
33 lines
881 B
JavaScript
#include utility.js
|
|
|
|
var AmiCopyright = function(parent) {
|
|
var container = $e({ attrs: { id: 'copyright' } });
|
|
parent.appendChild(container);
|
|
|
|
return {
|
|
addLine: function(line) {
|
|
var children = [];
|
|
|
|
for(var i in line) {
|
|
var section = line[i];
|
|
if(typeof section === 'string')
|
|
children.push(section);
|
|
else if(Array.isArray(section))
|
|
children.push({
|
|
tag: 'a',
|
|
attrs: {
|
|
href: section[1],
|
|
target: '_blank',
|
|
},
|
|
child: section[0],
|
|
});
|
|
}
|
|
|
|
container.appendChild($e({
|
|
tag: 'p',
|
|
child: children,
|
|
}))
|
|
},
|
|
};
|
|
};
|