Module:Infobox/example
More actions
This documentation is transcluded from Module:Infobox/example/doc. Changes can be proposed in the talk page.
This module is unused.
This module is neither invoked by a template nor required/loaded by another module. If this is in error, make sure to add
{{Documentation}}
/{{No documentation}}
to the calling template's or parent's module documentation.Function list |
---|
L 6 — p.makeComponentsExample L 48 — p.makeRowSection L 81 — p.makeListSection L 108 — p.makeGridSection |
-- imported from https://starcitizen.tools/Module:InfoboxNeue/example
local p = {}
local infobox = require( 'Module:Infobox' ):new()
function p.makeComponentsExample()
local sectionTable = {}
infobox:renderImage( 'Red Force (Ferrari Land) 2018 01.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