今天是2025年5月14日 第20周 星期三
代人,时大变了。
我们生活在大地上,但我们的梦想超越天空。
更改
跳到导航
跳到搜索
无编辑摘要
第17行:
第17行:
return ''
return ''
end
end
+end
+
+function group( name )
+ if name == nil or name == '' then
+ return ''
+ end
+ local title = mw.title.makeTitle( 'Template', 'CGroup/' .. name )
+ if title.exists then
+ return frame:expandTemplate( title )
+ else
+ return tostring( HtmlBuilder.create()
+ .tag( 'div' )
+ .attr( 'id', 'noteTA-group-' .. mw.uri.anchorEncode( name ) )
+ .attr( 'class', 'noteTA-missing' )
+ .attr( 'data-noteta-group', name )
+ .allDone() )
+ end
+end
+
+function Gcode( args )
+ local code = {}
+ for i = 1, 30 do
+ code:insert( group( args['G' .. i] ) )
+ end
+ code = code:concat()
+ if code ~= '' then
+ code = tostring( HtmlBuilder.create()
+ .tag( 'div' )
+ .attr( 'id', 'noteTA-group' )
+ .wikitext( code )
+ .allDone() )
+ end
+ return code
end
end