Module:QuestDetails: Difference between revisions

From Brighter Shores Wiki
Jump to navigation Jump to search
Content added Content deleted
No edit summary
No edit summary
Line 1: Line 1:
local p = {}
local p = {}


local infobox = require('Module:Infobox')
local Infobox = require('Module:Infobox')
local parse = require('Module:Param Parse')
local parse = require('Module:Param Parse')


Line 9: Line 9:
local config = {
local config = {
infobox_name = 'QuestDetails',
infobox_name = 'QuestDetails',
class = 'questdetails'
class = 'questdetails',
}
}
local params = {
local params = {
{ name = 'start_point' },
{name = 'start_point'},
{ name = 'requirements' }
{name = 'requirements'}
}
}

local ret = infobox.new(config, params, args)
local infobox = Infobox.new(config, params, args)
local auto_width = { ["max-width"] = "85%", ["width"] = "auto" }
local auto_width = { ["max-width"] = "85%", ["width"] = "auto" }
infobox
ret:addRow {
:add_row{
{ tag = 'th', class = "questdetails-header", content = 'Start Point' },
{ tag = 'argd', class = "questdetails-info", content=infobox.param('start_point'), css = auto_width }
{ tag = 'th', class = "questdetails-header", content = 'Start Point' },
{ tag = 'td', class = "questdetails-info", content=Infobox.param('start_point'), css = auto_width }
}
}

:add_row{
ret:addRow {
{ tag = 'th', class = "questdetails-header", content = 'Requirements' },
{ tag = 'th', class = "questdetails-header", content = 'Requirements' },
{ tag = 'td', class = "questdetails-info", content=infobox.param('requirements'), colspan = 2 }
{tag = 'td', class = "questdetails-info", content=Infobox.param('requirements'), colspan='2' },
}
}

return ret
return infobox
end
end



Revision as of 02:41, 13 November 2024

Module documentation
This documentation is transcluded from Module:QuestDetails/doc. [edit] [history] [purge]
This module does not have any documentation. Please consider adding documentation at Module:QuestDetails/doc. [edit]
Module:QuestDetails's function details is invoked by Template:QuestDetails.
Module:QuestDetails requires Module:Infobox.
Module:QuestDetails requires Module:Param Parse.

local p = {}

local Infobox = require('Module:Infobox')
local parse = require('Module:Param Parse')

function p.details(frame)
	local args = frame:getParent().args
	
	local config = {
		infobox_name = 'QuestDetails',
		class = 'questdetails',
	}
	
	local params = {
		{name = 'start_point'},
		{name = 'requirements'}
	}
	
	local infobox = Infobox.new(config, params, args)
	local auto_width = { ["max-width"] = "85%", ["width"] = "auto" }
	infobox
		:add_row{
			{ tag = 'th', class = "questdetails-header", content = 'Start Point' },
			{ tag = 'td', class = "questdetails-info", content=Infobox.param('start_point'), css = auto_width }
		}
		:add_row{
			{ tag = 'th', class = "questdetails-header", content = 'Requirements' },
			{tag = 'td', class = "questdetails-info", content=Infobox.param('requirements'), colspan='2' },
		}
	
	return infobox
end

return p