Module:Credits: Difference between revisions

From Videogame Morgue File

mNo edit summary
mNo edit summary
Line 16: Line 16:


     for iKey,sValue in pairs(tArgs.args) do  
     for iKey,sValue in pairs(tArgs.args) do  
       sOutputText = sOutputText .. sValue  .. ""
       sOutputText = sOutputText .. '<dt class="col-sm-3">' .. iKey .. '</dt><dd class="col-sm-7">' .. sValue .. '</dd>'
     end
     end



Revision as of 11:52, 14 Mayıs 2021

Documentation for this module may be created at Module:Credits/doc

local p = {};

p.hello = function( frame )
    local str = "Hello World!"
    return str
end

function p.credits( frame )
    local tArgs = frame:getParent()

    if not( tArgs.args[1] ) then
       tArgs = frame
    end

    local sOutputText = '<div class="container-fluid"><dl class="row">'

    for iKey,sValue in pairs(tArgs.args) do 
       sOutputText = sOutputText .. '<dt class="col-sm-3">' .. iKey .. '</dt><dd class="col-sm-7">' .. sValue .. '</dd>'
    end

    sOutputText = sOutputText .. "</dl></div>"

    return sOutputText 
end

return p