-- This module implements {{tasks}}.localitemHeadings=mw.loadData('Module:Tasks/headings')localp={}functionp.main(frame)localorigArgs=frame:getParent().argslocalargs={}fork,vinpairs(origArgs)doifv~=''thenargs[k]=vendendreturnp.luaMain(args)endfunctionp.luaMain(args)-- Make an array of list items.localitems={}fork,vinpairs(args)dolocalheading=itemHeadings[k]ifheadingthenitems[#items+1]={key=k,heading=heading,content=v}endendtable.sort(items,function(t1,t2)localkey1=t1.keylocalkey2=t2.keyifkey1=='reason'thenreturntrueelsereturnkey1<key2endend)-- Add the "other" argument to the list item array.ifargs.otherthentable.insert(items,{key='other',heading=args.othertextor'Other',content=args.other})end-- Make the list wikitext.locallist=mw.html.create('ul')list:css{['font-size']='100%',padding='.3em 0 .3em 25px',margin='0'}ifargs.listclassthenlist:addClass(args.listclass)endfori,tinipairs(items)dolist:tag('li'):wikitext(string.format("'''''%s''''':\n%s",t.heading,t.content))endlist=tostring(list)-- Make the surrounding div tags.locallistDiv=mw.html.create('div')listDiv:css{position='relative',left='0px',['margin-right']='-0px',['z-index']='15'}:wikitext("Here are some ".."'''[[Wikipedia:Community portal/Opentask|tasks you can do]]''':"):newline():wikitext(list)listDiv=tostring(listDiv)-- Construct the wikitable.localimageifargs.image=='off'thenimage=''elseimage='[[File:Nuvola apps korganizer.svg|50px|<nowiki></nowiki>]]'..'<br /><div style="width:65px;height:0px;"></div>'endlocaltableFormat=[[{| style="background:none;width:auto;"| style="vertical-align:top" |%s|%s|}]]returnstring.format(tableFormat,image,listDiv)endreturnp