今天是2025年12月17日 第51周 星期三
代人,时大变了。
我们生活在大地上,但我们的梦想超越天空。
模块:NoteTA
wiki:zh>Liangent2013年4月26日 (五) 21:43的版本 (←建立内容为“local z local HtmlBuilder = require( 'Module:HTMLBuilder' ) local WikitextLC = require( 'Module:WikitextLC' ) function Tcode( args ) if args.T ...”的新頁面)
| 本页面原先来自中文维基百科的模块:NoteTA,依照 CC BY-SA 3.0 授权被引入;原始贡献者的名字可以在这里看到。 经过双方编辑者的修改,本页面可能已与它的来源大不相同。 |
本模块用于执行{{NoteTA}}模板,请到模板页阅读具体用法。
| 上述文档嵌入自模块:NoteTA/doc。 (编辑 | 历史) 编者可以在本模块的沙盒 (创建 | 镜像)和测试样例 (创建)页面进行实验。 本模块的子页面。 |
local z
local HtmlBuilder = require( 'Module:HTMLBuilder' )
local WikitextLC = require( 'Module:WikitextLC' )
function Tcode( args )
if args.T ~= nil and args.T ~= '' then
local builder = HtmlBuilder.create()
local div = builder.tag( 'div' )
.attr( 'id', 'noteTA-title' )
.attr( 'data-noteta-code', mw.uri.encode( args.T ) )
.wikitext( WikitextLC.title( args.T ) )
if args.dt ~= nil and args.dt ~= '' then
div.attr( 'data-noteta-desc', mw.uri.encode( args.T ) )
end
return tostring( builder )
else
return ''
end
end
function z.main( frame )
local args = frame:getParent().args
end
return z