Module:InfoboxCharacter: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 19: Line 19:
     local infobox = mw.html.create('div'):addClass('infobox-character');
     local infobox = mw.html.create('div'):addClass('infobox-character');
     infobox:tag('div'):addClass('infobox-character-header'):css('background-color', args.color:gsub("%#", "#")):css(
     infobox:tag('div'):addClass('infobox-character-header'):css('background-color', args.color:gsub("%#", "#")):css(
         'color', args.textcolor):wikitext(args.name);
         'color', args.textcolor):wikitext(args.class:gsub("%[%[a%]%]", ""));
     infobox:tag('div'):addClass('infobox-character-image'):wikitext(args.image);
     infobox:tag('div'):addClass('infobox-character-image'):wikitext(args.image);


Line 49: Line 49:
     end
     end


     if (args.classes1 == nil and args.classes2 == nil and args.fullname1 == nil and args.fullname2 == nil) then
     addField('fullname', 'Full Name');
        addField('fullname', 'Full Name');
    end
     addField2('fullname', 'Full Name');
     addField2('fullname', 'Full Name');
     addField('class');
     addField('class');