Bật tắt bảng chọn
Bật tắt bảng chọn cá nhân
Chưa đăng nhập
Địa chỉ IP của bạn sẽ được hiển thị công khai nếu bạn thực hiện bất kỳ sửa đổi nào.

Khác biệt giữa bản sửa đổi của “Mô đun:Characters”

Một thế giới nơi chỉ có đam mê, niềm vui và sắc màu...
Nội dung được thêm vào Nội dung được xóa
Không có tóm lược sửa đổi
Không có tóm lược sửa đổi
Dòng 3:
--- @param frame table
--- @return string
local p = {}
function p.main()
local instance = require( 'Module:InfoboxNeue' )
local argslibraryUtil = require( 'Module:ArgumentslibraryUtil' )
local instanceinfobox = require( 'Module:InfoboxNeue' )
local args = require( 'Module:Arguments' ).getArgs( frame )
 
local sections = {
Hàng 16 ⟶ 18:
 
if args[ 'image' ] then
instanceinfobox:renderImage( args[ 'image' ] )
end
 
if args[ 'indicator' ] then
instanceinfobox:renderIndicator( {
data = args[ 'indicator' ],
desc = args[ 'indicatorDesc' ],
Hàng 28 ⟶ 30:
 
if args[ 'title' ] then
instanceinfobox:renderHeader( {
title = args[ 'title' ],
subtitle = args[ 'subtitle' ],
Hàng 49 ⟶ 51:
 
if args[ 'label' .. i ] and args[ 'content' .. i ] then
table.insert( sections[ sectionMap[ ( currentSection or 'default' ) ] ].content, instanceinfobox:renderItem( args[ 'label' .. i ], args[ 'content' .. i ] ) )
end
end
 
for _, section in ipairs( sections ) do
instanceinfobox:renderSection( {
title = section.title,
subtitle = section.subtitle,
Hàng 62 ⟶ 64:
end
 
return instanceinfobox:renderInfobox( nil, args[ 'snippet' ] )
end
 
 
return p

Phiên bản lúc 01:07, ngày 4 tháng 6 năm 2024

Lỗi Lua trong package.lua tại dòng 80: module 'Module:Module toc' not found.

Sự thật thú vị:
Characters
Characters
1234567890
Thành viên của
1st section's subtitle
1st item's label
item's content
2nd section
2nd section's subtitle
1st item's label
1st item's content
2nd item's label
2nd item's content

--- Mô đun cho hộp thông tin Nhân vật
---
--- @param frame table
--- @return string
local p = {}
function p.main()
	local libraryUtil = require( 'libraryUtil' )
	local infobox = require( 'Module:InfoboxNeue' )
	local args = require( 'Module:Arguments' ).getArgs( frame )

	local sections = {
		{ content = {}, col = args[ 'col' ] or 2 }
	}

	local sectionMap = { default = 1 }

	local currentSection

	if args[ 'image' ] then
		infobox:renderImage( args[ 'image' ] )
	end

	if args[ 'indicator' ] then
		infobox:renderIndicator( {
			data = args[ 'indicator' ],
			desc = args[ 'indicatorDesc' ],
			class = args[ 'indicatorClass' ]
		} )
	end

	if args[ 'title' ] then
		infobox:renderHeader( {
			title = args[ 'title' ],
			subtitle = args[ 'subtitle' ],
		} )
	end

	for i = 1, 50, 1 do
		if args[ 'section' .. i ] then
			currentSection = args[ 'section' .. i ]

			table.insert( sections, {
				title = currentSection,
				subtitle = args[ 'section-subtitle' .. i ],
				col = args[ 'section-col' .. i ] or args[ 'col' ] or 2,
				content = {}
			} )

			sectionMap[ currentSection ] = #sections
		end

		if args[ 'label' .. i ] and args[ 'content' .. i ] then
			table.insert( sections[ sectionMap[ ( currentSection or 'default' ) ] ].content, infobox:renderItem( args[ 'label' .. i ], args[ 'content' .. i ] ) )
		end
	end

	for _, section in ipairs( sections ) do
		infobox:renderSection( {
			title = section.title,
			subtitle = section.subtitle,
			col = section.col,
			content = section.content,
		} )
	end

	return infobox:renderInfobox( nil, args[ 'snippet' ] )
end

return p
Cookies help us deliver our services. By using our services, you agree to our use of cookies.