다른 명령
문서를 비움 태그: 비우기 되돌려진 기여 |
편집 요약 없음 태그: 수동 되돌리기 |
||
1번째 줄: | 1번째 줄: | ||
local p = {} | |||
local infobox = require( 'Module:InfoboxNeue' ):new() | |||
function p.makeComponentsExample() | |||
local sectionTable = {} | |||
infobox:renderImage( 'Pico at New Babbage 1 1.jpg' ) | |||
infobox:renderIndicator( { | |||
data = 'Indicator', | |||
desc = 'Indicator message', | |||
} ) | |||
infobox:renderHeader( { | |||
title = 'Title', | |||
subtitle = 'Subtitle' | |||
} ) | |||
sectionTable = { | |||
infobox:renderItem( { | |||
label = 'Item label', | |||
data = 'Item data' | |||
} ), | |||
infobox:renderItem( { | |||
label = 'Item label', | |||
data = 'Item data' | |||
} ), | |||
infobox:renderItem( { | |||
label = 'Item label', | |||
data = 'Item data' | |||
} ) | |||
} | |||
infobox:renderSection( { | |||
content = table.concat( sectionTable ), | |||
col = 2 | |||
} ) | |||
infobox:renderSection( { | |||
title = 'Section title', | |||
content = table.concat( sectionTable ), | |||
col = 3 | |||
} ) | |||
return infobox:renderInfobox() | |||
end | |||
function p.makeRowSection() | |||
local sectionTable = {} | |||
sectionTable = { | |||
infobox:renderItem( { | |||
label = 'Bacon', | |||
data = 'Good', | |||
row = true, | |||
spacebetween = true | |||
} ), | |||
infobox:renderItem( { | |||
label = 'Pancetta', | |||
data = 'Great', | |||
row = true, | |||
spacebetween = true | |||
} ), | |||
infobox:renderItem( { | |||
label = 'Prosciutto', | |||
data = 'Wonderful', | |||
row = true, | |||
spacebetween = true | |||
} ) | |||
} | |||
infobox:renderSection( { | |||
title = 'Row layout', | |||
subtitle = 'This is an example of the row layout.', | |||
content = table.concat( sectionTable ) | |||
} ) | |||
return infobox:renderInfobox() | |||
end | |||
function p.makeListSection() | |||
local sectionTable = {} | |||
sectionTable = { | |||
infobox:renderItem( { | |||
data = 'Bacon is good', | |||
desc = 'Bacon ipsum dolor amet burgdoggen boudin spare ribs pork pork chop drumstick beef. Jowl turkey pork, kevin shankle shank shoulder. ', | |||
} ), | |||
infobox:renderItem( { | |||
data = 'Pancetta is great', | |||
desc = 'Kevin pig fatback, alcatra pancetta sirloin venison tri-tip shankle kielbasa meatloaf spare ribs beef. Corned beef salami kielbasa tenderloin swine spare ribs andouille.', | |||
} ), | |||
infobox:renderItem( { | |||
data = 'Prosciutto is wonderful', | |||
desc = 'Venison chicken meatloaf, ground round swine short ribs shankle short loin tenderloin jerky capicola. Prosciutto venison sirloin beef brisket pancetta.', | |||
} ) | |||
} | |||
infobox:renderSection( { | |||
title = 'List layout', | |||
subtitle = 'This is an example of the list layout.', | |||
content = table.concat( sectionTable ) | |||
} ) | |||
return infobox:renderInfobox() | |||
end | |||
function p.makeGridSection() | |||
local sectionTable = {} | |||
sectionTable = { | |||
infobox:renderItem( { | |||
label = 'Bacon', | |||
data = 'Good' | |||
} ), | |||
infobox:renderItem( { | |||
label = 'Pancetta', | |||
data = 'Great' | |||
} ), | |||
infobox:renderItem( { | |||
label = 'Prosciutto', | |||
data = 'Wonderful' | |||
} ), | |||
infobox:renderItem( { | |||
label = 'Capicola', | |||
data = 'Delightful' | |||
} ) | |||
} | |||
infobox:renderSection( { | |||
title = '2 col grid layout', | |||
subtitle = 'This is an example of the two column grid layout.', | |||
content = table.concat( sectionTable ), | |||
col = 2 | |||
} ) | |||
infobox:renderSection( { | |||
title = '3 col grid layout', | |||
subtitle = 'This is an example of the three column grid layout.', | |||
content = table.concat( sectionTable ), | |||
col = 3 | |||
} ) | |||
infobox:renderSection( { | |||
title = '4 col grid layout', | |||
subtitle = 'This is an example of the four column grid layout.', | |||
content = table.concat( sectionTable ), | |||
col = 4 | |||
} ) | |||
return infobox:renderInfobox() | |||
end | |||
return p |
2024년 12월 2일 (월) 21:46 기준 최신판
이 모듈에 대한 설명문서는 모듈:InfoboxNeue/example/설명문서에서 만들 수 있습니다
local p = {}
local infobox = require( 'Module:InfoboxNeue' ):new()
function p.makeComponentsExample()
local sectionTable = {}
infobox:renderImage( 'Pico at New Babbage 1 1.jpg' )
infobox:renderIndicator( {
data = 'Indicator',
desc = 'Indicator message',
} )
infobox:renderHeader( {
title = 'Title',
subtitle = 'Subtitle'
} )
sectionTable = {
infobox:renderItem( {
label = 'Item label',
data = 'Item data'
} ),
infobox:renderItem( {
label = 'Item label',
data = 'Item data'
} ),
infobox:renderItem( {
label = 'Item label',
data = 'Item data'
} )
}
infobox:renderSection( {
content = table.concat( sectionTable ),
col = 2
} )
infobox:renderSection( {
title = 'Section title',
content = table.concat( sectionTable ),
col = 3
} )
return infobox:renderInfobox()
end
function p.makeRowSection()
local sectionTable = {}
sectionTable = {
infobox:renderItem( {
label = 'Bacon',
data = 'Good',
row = true,
spacebetween = true
} ),
infobox:renderItem( {
label = 'Pancetta',
data = 'Great',
row = true,
spacebetween = true
} ),
infobox:renderItem( {
label = 'Prosciutto',
data = 'Wonderful',
row = true,
spacebetween = true
} )
}
infobox:renderSection( {
title = 'Row layout',
subtitle = 'This is an example of the row layout.',
content = table.concat( sectionTable )
} )
return infobox:renderInfobox()
end
function p.makeListSection()
local sectionTable = {}
sectionTable = {
infobox:renderItem( {
data = 'Bacon is good',
desc = 'Bacon ipsum dolor amet burgdoggen boudin spare ribs pork pork chop drumstick beef. Jowl turkey pork, kevin shankle shank shoulder. ',
} ),
infobox:renderItem( {
data = 'Pancetta is great',
desc = 'Kevin pig fatback, alcatra pancetta sirloin venison tri-tip shankle kielbasa meatloaf spare ribs beef. Corned beef salami kielbasa tenderloin swine spare ribs andouille.',
} ),
infobox:renderItem( {
data = 'Prosciutto is wonderful',
desc = 'Venison chicken meatloaf, ground round swine short ribs shankle short loin tenderloin jerky capicola. Prosciutto venison sirloin beef brisket pancetta.',
} )
}
infobox:renderSection( {
title = 'List layout',
subtitle = 'This is an example of the list layout.',
content = table.concat( sectionTable )
} )
return infobox:renderInfobox()
end
function p.makeGridSection()
local sectionTable = {}
sectionTable = {
infobox:renderItem( {
label = 'Bacon',
data = 'Good'
} ),
infobox:renderItem( {
label = 'Pancetta',
data = 'Great'
} ),
infobox:renderItem( {
label = 'Prosciutto',
data = 'Wonderful'
} ),
infobox:renderItem( {
label = 'Capicola',
data = 'Delightful'
} )
}
infobox:renderSection( {
title = '2 col grid layout',
subtitle = 'This is an example of the two column grid layout.',
content = table.concat( sectionTable ),
col = 2
} )
infobox:renderSection( {
title = '3 col grid layout',
subtitle = 'This is an example of the three column grid layout.',
content = table.concat( sectionTable ),
col = 3
} )
infobox:renderSection( {
title = '4 col grid layout',
subtitle = 'This is an example of the four column grid layout.',
content = table.concat( sectionTable ),
col = 4
} )
return infobox:renderInfobox()
end
return p