Module:InfoboxFangame: Difference between revisions

From Bibliotheca Anonoma
(Created page with "local p = {} function p.default(frame) local capiunto = require 'capiunto' return capiunto.create( { top = tostring(mw.title.getCurrentTitle()), topStyle = 'background...")
 
No edit summary
 
(3 intermediate revisions by the same user not shown)
Line 15: Line 15:
:addRow('Release Date', frame.args["release_date"])
:addRow('Release Date', frame.args["release_date"])
:addRow('Takedown Date', frame.args["takedown_date"])
:addRow('Takedown Date', frame.args["takedown_date"])
:addRow('Mod', frame.args["mod"])
:addRow('Homepage', frame.args["homepage_url"])
:addRow('Homepage', frame.args["homepage_url"])
:addRow('Community', frame.args["community_url"])
:addRow('Community', frame.args["community_url"])

Latest revision as of 03:54, 15 January 2017

This page is a module. It contains no Bibliotheca Anonoma-related information, but should be used as part of other articles or templates. For more information, read wp:Help:Lua.

Please do not experiment with this module; you could ruin all pages using this module. If you want to edit this module, copy the text to Module:Sandbox, edit and test it there, and copy it back when it works.

Click here to edit the documentation page, and feel free to voice your opinion regarding this module.

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

Usage[edit]

Module:InfoboxFangame
File:Test.png
This image is a test image that is found on Wikimedia Commons.
Platform Windows, Mac, Linux
Franchise Super Mario Bros
Release Date 2016-08-01
Takedown Date 2016-08-02
Homepage https://test.url
Community https://reddit.com/r/community
Download https://archive.org/details/test
{{#invoke: InfoboxFangame | default 
| image          = test.png
| caption        = This '''image''' is a test image that is found on Wikimedia Commons. 
| platform       = Windows, Mac, Linux
| franchise      = Super Mario Bros
| release_date   = 2016-08-01
| takedown_date  = 2016-08-02
| homepage_url   = https://test.url
| community_url  = https://reddit.com/r/community
| download_url   = https://archive.org/details/test
}}

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["caption"] -- caption
	)
	:addRow('Platform', frame.args["platform"])
	:addRow('Franchise', frame.args["franchise"])
	:addRow('Release Date', frame.args["release_date"])
	:addRow('Takedown Date', frame.args["takedown_date"])
	:addRow('Homepage', frame.args["homepage_url"])
	:addRow('Community', frame.args["community_url"])
	:addRow('Download', frame.args["download_url"])
end

return p