欢迎来到奇葩栖息地!欢迎加入Discord服务器:XfrfHCzfbW。请先至特殊:参数设置验证邮箱后再进行编辑。在特殊:参数设置挑选自己想要使用的小工具!不会编辑?请至这里学习Wikitext语法。
模块:Documentation:修订间差异
来自奇葩栖息地
//Edit via InPageEdit
SkyEye FAST(讨论 | 贡献) 小 (// Edit via InPageEdit) |
SkyEye FAST(讨论 | 贡献) (//Edit via InPageEdit) |
||
第44行:
local out
if not args.content and tostring( page ) == docPage then
local pageType = mw.ustring.lower( args.type or getType( page.nsText, page ) )
local pageTypeDisplay = getTypeDisplay( pageType )
out = f:preprocess( '{{subst:模板:Documentation/preload}}' )
out = out:gsub( '$1' , pageTypeDisplay )
else
local templateArgs = {}
第78行 ⟶ 第81行:
local args = require( 'Module:ProcessArgs' ).merge( true )
local badDoc = args.baddoc
local page = mw.title.getCurrentTitle()
第92行 ⟶ 第89行:
local body = mw.html.create( 'div' )
body
:attr( 'class', 'documentation-header documentation-docpage' .. ( badDoc and ' documentation-baddoc' or '' ) )
:tag( 'div' )
:
:wikitext( '[[', page:fullUrl( 'action=purge' ), ' 清除缓存]]' )
:done()
第105行 ⟶ 第98行:
pageType == 'module' and '将' or '应该',
'被放置到[[', namespace, ':',page.baseText,
']]
)
if badDoc then
第142行 ⟶ 第135行:
if not docText and not noDoc then
▲ docText = trim( f:expandTemplate{ title = ':' .. docPage.fullText } )
docText = string.gsub( docText, '<div class="documentation%-header.-</div>\n' , '' )
if docText == '' then
第164行 ⟶ 第155行:
if noDoc then
action = '创建'
preload = '&preload=模板:Documentation/preload&preloadparams%5b%5d=' .. pageTypeDisplay
classes = ' documentation-nodoc'
message = "'''此" .. pageTypeDisplay .. "没有文档页面。" ..
"如果你知道
if not ( args.nocat or namespace == 'User' ) then
category = '没有文档的' .. pageTypeDisplay
第194行 ⟶ 第185行:
end
links = mw.html.create( 'span' )
:
:wikitext( mw.text.nowiki( '[' ), table.concat( links, ' | ' ), mw.text.nowiki( ']' ) )
local body = mw.html.create( 'div' )
body:attr( 'class', 'documentation' .. classes )▼
▲ :attr( 'class', 'documentation' .. classes )
local header = mw.html.create( 'div' ):addClass( 'documentation-header' )
header
:node( links )
:tag( 'span' )
:addClass( 'title' )
:wikitext( '文档页面' )
第238行 ⟶ 第215行:
:tag( 'div' )
:addClass( 'documentation-footer' )
:node( links )
:wikitext( '上述文档
end
|