打开/关闭搜索
搜索
打开/关闭菜单
1.3K
18.1K
83
76.2K
导航
首页
最近更改
特殊页面
上传文件
随机页面
随机页面
随机歌曲
随机P主
编辑相关
帮助
讨论版
公共沙盒
待修改页面
批量上传文件
友情链接
VCPedia
打开/关闭外观设置菜单
通知
打开/关闭个人菜单
未登录
未登录用户的IP地址会在进行任意编辑后公开展示。
user-interface-preferences
个人工具
创建账号
登录
创建条目推荐使用
幻梦术力口wiki工具
!
编辑P主歌曲列表前往
Vocawiki数据库打标网站
!
查看“︁Module:交叉颜色”︁的源代码
来自Vocawiki
查看
阅读
查看源代码
查看历史
associated-pages
模块
讨论
更多操作
←
Module:交叉颜色
因为以下原因,您没有权限编辑该页面:
您请求的操作仅限属于该用户组的用户执行:
用户
您可以查看和复制此页面的源代码。
--协力:User:サンムル local p = {} function p._main(args,toggle) local texts = {} local colors = {} for k, v in pairs(args) do if type(k) == 'string' then --如果是字符串则匹配c开头 local index = k:match "^c(%d+)$" if index then colors[tonumber(index)] = v end else --是数字 texts[k] = v end end colors[0] = colors[#colors] -- 余数等于0时输出除数域 --渲染部分 local root = mw.html.create 'span' for i, v in ipairs(texts) do root:tag 'span' :wikitext(v) :css {color = colors[i%#colors], ["data-color"] = toggle and color} :addClass(toggle and 'colorToggleBlock') end return root end function p.main ( frame ) local wrappers = { ['Template:交叉颜色'] = true, ['Template:交叉颜色护眼版'] = true } local toggle = frame.args["toggle"] local parent = frame:getParent() if parent and wrappers[parent:getTitle()] then frame = parent end local args = frame.args return p._main(args,toggle) end return p
该页面使用的模板:
Template:Documentation
(
查看源代码
)
Template:Tl
(
查看源代码
)
Module:交叉颜色/doc
(
查看源代码
)
返回
Module:交叉颜色
。
查看“︁Module:交叉颜色”︁的源代码
来自Vocawiki