Module:InfoboxNeue/example

local p = {} local infobox = require( 'Module:InfoboxNeue' )

function p.makeComponentsExample local infoboxTable = {} local sectionTable = {}

infoboxTable = { 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'		} ) }	table.insert(		infoboxTable,		infobox.renderMessage( { title = 'Message title', desc = 'Message description' } )	)	table.insert(		infoboxTable,		infobox.renderSection( { title = 'Section title', content = table.concat( sectionTable ), col = 3 } )	)

html = infobox.renderInfobox( table.concat( infoboxTable ), 'Components example' ) return html end

function p.makeRowSection local infoboxTable = {} 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		} ) }	table.insert(		infoboxTable,		infobox.renderSection( { title = 'Row layout', subtitle = 'This is an example of the row layout.', content = table.concat( sectionTable ) } )	)

html = infobox.renderInfobox( table.concat( infoboxTable ), 'Row layout example' ) return html end

function p.makeListSection local infoboxTable = {} 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.',		} ) }	table.insert(		infoboxTable,		infobox.renderSection( { title = 'List layout', subtitle = 'This is an example of the list layout.', content = table.concat( sectionTable ) } )	)

html = infobox.renderInfobox( table.concat( infoboxTable ), 'List layout example' ) return html end

function p.makeGridSection local infoboxTable = {} 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'		} ) }	table.insert(		infoboxTable,		infobox.renderSection( { title = '2 col grid layout', subtitle = 'This is an example of the two column grid layout.', content = table.concat( sectionTable ), col = 2 } )	)	table.insert(		infoboxTable,		infobox.renderSection( { title = '3 col grid layout', subtitle = 'This is an example of the three column grid layout.', content = table.concat( sectionTable ), col = 3 } )	)	table.insert(		infoboxTable,		infobox.renderSection( { title = '4 col grid layout', subtitle = 'This is an example of the four column grid layout.', content = table.concat( sectionTable ), col = 4 } )	)

html = infobox.renderInfobox( table.concat( infoboxTable ), 'Row layout example' ) return html end

function p.doStuff local infoboxTable = {} local sectionTable = {}

infoboxTable = { infobox.renderImage( 'Fury Landed in Port Tressler - Blurred BG.jpg' ), infobox.renderIndicator( {			data = 'Flight ready',			desc = 'Since Alpha 3.19.0',			class = 'infobox-indicator--success'		} ), infobox.renderHeader( {			title = 'Fury',			subtitle = 'Mirai (MRAI)'		} ) }	sectionTable = { infobox.renderItem( {			label = 'Role',			data = 'Snub fighter'		} ), infobox.renderItem( {			label = 'Hangar size',			data = 'Tiny (S1/XXS)'		} ), infobox.renderItem( {			label = 'Series',			data = 'Fury'		} ) }	table.insert(		infoboxTable,		infobox.renderSection( { content = table.concat( sectionTable ), col = 2 } )	)	sectionTable = { infobox.renderItem( {			label = 'Crew',			data = '1'		} ), infobox.renderItem( {			label = 'Cargo',			data = '0 SCU'		} ), infobox.renderItem( {			label = 'Stowage',			data = '60K μSCU'		} ) }	table.insert(		infoboxTable,		infobox.renderSection( { title = 'Capacity', content = table.concat( sectionTable ), col = 3 } )	)

html = infobox.renderInfobox( table.concat( infoboxTable ), 'Fury' ) return html end return p