Documentation for this module may be created at Module:NewsItem/doc
local getArgs = require('Module:Arguments').getArgs
local Flags = require('Module:Flags')
local NewsItem = {}
function NewsItem.main(frame)
local args = getArgs(frame)
mw.log('ARTICLEEE')
mw.logObject(args)
local container = mw.html.create('span'):addClass('newsItem')
-- local date, title, url, source, author, lang, translated, event, note
if args.date then
local date = mw.html.create('span'):addClass('news-date'):wikitext(args.date)
container:node(date)
end
if args.lang then
container:node(Flags.icon(args.lang))
else
container:node(Flags.icon('usuk'))
end
return container
end
return NewsItem