local p =
p.main = function(frame) local args = frame.args local pargs = frame:getParent.args -- Use a thumbnail div, like an image. This part is from Module:Chessboard local root = mw.html.create('div') :addClass('thumb') :addClass('noviewer') :addClass('tright') local div = root:tag('div') :addClass('thumbinner') :css('width', '246px') local b = div:tag('table') :attr('cellpadding', '0') :attr('cellspacing', '0') :css('background', 'white') :css('font-size', '88%') :css('border', '1px #c8ccd1 solid') :css('padding', '0') :css('margin', 'auto') :css('width', '100%') local row = b:tag('tr') for i = 1, 9 do row:tag('td') :css('text-align', 'center') :wikitext(i) end for i = 1, 9 do local row = b:tag('tr') :css('vertical-align', 'middle') for j = 1, 9 do local cell = row:tag('td') :css('padding', '0') :css('vertical-align', 'top') :css('text-align', 'center') :css('width', '26px') :css('height', '26px') :css('background-color', 'tan') :css('box-sizing', 'border-box') :css('border', '1px solid black') :css('position', 'relative') if (i
7) and (j
7) then cell:tag('div') :css('width', '6px') :css('height', '6px') :css('position', 'absolute') :css('top', '-4px') :css('left', '-4.01px') :css('border-radius', '6px') :css('background-color', 'black') end if (i
8 and j
div:tag('div'):wikitext(pargs.test)
return tostring(root)endreturn p