Module:Featured: Difference between revisions
From PC Gaming Shelter
No edit summary |
No edit summary |
||
| Line 3: | Line 3: | ||
function p.video(frame) | function p.video(frame) | ||
local args = frame:getParent().args or {} | local args = frame:getParent().args or {} | ||
local header = args[ | local header = args[2] or args['header'] or 'Navigate' | ||
local title = args[ | local title = args[3] or args['title'] or 'Title' | ||
local tagline = args[ | local tagline = args[4] or args['tagline'] or 'Tagline' | ||
local url = args[ | local url = args[5] or args['url'] or '' | ||
local video = '' | local video = '' | ||
Revision as of 22:19, 15 March 2026
Documentation for this module may be created at Module:Featured/doc
local p = {}
function p.video(frame)
local args = frame:getParent().args or {}
local header = args[2] or args['header'] or 'Navigate'
local title = args[3] or args['title'] or 'Title'
local tagline = args[4] or args['tagline'] or 'Tagline'
local url = args[5] or args['url'] or ''
local video = ''
local html = mw.html.create()
html:tag('div'):addClass('card bg-dark thumbwall mb-3')
:tag('div'):addClass('card-header'):wikitext(header):done()
:tag('div'):addClass('card-img'):wikitext(video):done()
:tag('div'):addClass('card-body flex-column')
:tag('div'):addClass('card-title mb-0'):wikitext(title):done()
:tag('div'):addClass('card-tagline lead'):wikitext(tagline):done()
:done()
:done()
return html
end
return p
