Module:InfoboxSnippet

This infobox module is for internal use by Template:Snippet, which adds to a cargo template. Please use that instead.

Two options are provided, one with and without an image.

Usage

Module:InfoboxSnippet
200px
This image is a test image that is found on Wikimedia Commons.
Story YourStory
Language English
Source URL https://test.url
Provenance 2channel,4chan,8chan
Creation Date 2016-08-01
Discovery Date 2016-08-02
{{#invoke: InfoboxSnippet | default 
| image          = test.png
| description        = This '''image''' is a test image that is found on Wikimedia Commons. 
| story          = [[YourStory]]
| creation_date   = 2016-08-01
| discovery_date  = 2016-08-02
| language       = English
| source_url   = https://test.url
| provenance   = 2channel,4chan,8chan
}}

Usage (no image)

Module:InfoboxSnippet
Story YourStory
Language English
Source URL https://test.url
Provenance 2channel,4chan,8chan
Creation Date 2016-08-01
Discovery Date 2016-08-02
>type in a short description
{{#invoke: InfoboxSnippet | noimage
| description = >type in a short description
| story          = [[YourStory]]
| creation_date   = 2016-08-01
| discovery_date  = 2016-08-02
| language       = English
| source_url   = https://test.url
| provenance   = 2channel,4chan,8chan
}}

local p = {}
 
function p.default(frame)
	local capiunto = require 'capiunto'
	return capiunto.create( {
		top = tostring(mw.title.getCurrentTitle()),
		topStyle = 'background:#cfc;',
	} )
	:addImage(
		string.format('[[File:%s|200px]]', frame.args["image"]), -- featured image
		frame.args["description"] -- caption/description
	)
	:addRow('Story', frame.args["story"])
	:addRow('Language', frame.args["language"])
	:addRow('Source URL', frame.args["source_url"])
	:addRow('Provenance', frame.args["provenance"])
	:addRow('Creation Date', frame.args["creation_date"])
	:addRow('Discovery Date', frame.args["discovery_date"])
end

function p.noimage(frame)
	local capiunto = require 'capiunto'
	return capiunto.create( {
		top = tostring(mw.title.getCurrentTitle()),
		topStyle = 'background:#cfc;',
		bottom = frame.args["description"],
	} )
	:addRow('Story', frame.args["story"])
	:addRow('Language', frame.args["language"])
	:addRow('Source URL', frame.args["source_url"])
	:addRow('Provenance', frame.args["provenance"])
	:addRow('Creation Date', frame.args["creation_date"])
	:addRow('Discovery Date', frame.args["discovery_date"])
end

return p