跳转到内容
打开/关闭搜索
搜索
打开/关闭菜单
116
条目
154
文件
3
用户
730
编辑
Unimage Wiki
游戏内
武器
装备
剧情书
特殊道具
食物
特殊页面
实体
大型头目
强化头目
NPC
敌对生物
游戏流程
流程梗概
攻略
游戏难度
地区
进度
世界观
剧情资料
人物
大时间轴
创作历程
打开/关闭外观设置菜单
无法加载偏好设置。请检查您的网络连接并重试。
重试
打开/关闭个人菜单
未登录
未登录用户的IP地址会在进行任意编辑后公开展示。
user-interface-preferences
个人工具
讨论
贡献
创建账号
登录
编辑“︁
模块:Dev/Quote
”︁
来自Unimage Wiki
查看
阅读
编辑源代码
查看历史
associated-pages
模块
讨论
更多操作
更多
工具
链入页面
相关更改
页面信息
警告:
您没有登录。如果您进行任何编辑,您的IP地址会公开展示。如果您
登录
或
创建账号
,您的编辑会以您的用户名署名,此外还有其他益处。
反垃圾检查。
不要
加入这个!
-- 来源:https://dev.fandom.com/wiki/Module%3AQuote -- 许可:CC BY-SA,作者与修订记录见来源页面 -- <nowiki> local Quote = {} local getArgs = require('Module:Dev/Arguments').getArgs local i18n = require('Module:Dev/I18n').loadMessages('Quote') local function build(quote_contents, quote_source, options) local quote_container = mw.html.create('blockquote') :addClass('pull-quote') :addClass(options.align) :addClass(options.extraclasses) :css(options.styles) :cssText(options.extrastyles) :node(quote_contents) if quote_source then quote_container:tag('div') :addClass('pull-quote__source') :tag('cite') :wikitext(quote_source) :done() :done() end return quote_container end local function options(args) local options = {} options.styles = {} options.extraclasses = i18n:parameter('class', args) options.extrastyles = i18n:parameter('style', args) options.align = '' local align = i18n:parameter('align', args) if align then options.align = 'pull-quote--' .. align options.styles['width'] = i18n:parameter('width', args) or i18n:parameter('quotewidth', args) or '300px' end return options end -- let MediaWiki parser auto-generate <p> tags local function paragraph(quotetext) return '\n' .. quotetext .. '\n' end function Quote.quote(frame) local args = getArgs(frame) local options = options(args) local quotetext = args[1] or i18n:parameter('quotetext', args) or i18n:parameter('quote', args) or i18n:parameter('text', args) or '' local person = args[2] or i18n:parameter('person', args) or i18n:parameter('speaker', args) or i18n:parameter('personquoted', args) or nil local source = args[3] or i18n:parameter('source', args) or i18n:parameter('quote_source', args) or nil local quote_contents = mw.html.create('div') :addClass('pull-quote__text') :wikitext(paragraph(quotetext)) local quote_source = person if person and source then quote_source = person .. ', ' .. source elseif source then quote_source = source end return build(quote_contents, quote_source, options) end function Quote.dialogue(frame) local args = getArgs(frame) local options = options(args) local quote_contents = mw.html.create('div') :addClass('pull-quote__text') local quote_source for i, v in ipairs(args) do local next_param = i + 1 if i % 2 ~= 0 then quote_contents:tag('div') :addClass('pull-quote__line') :tag('strong') :addClass('pull-quote__speaker') :wikitext(v .. ':') :done() :wikitext(' ' .. paragraph(args[next_param])) :done() end end local context = i18n:parameter('context', args) local source = i18n:parameter('source', args) if context and source then quote_source = context .. ', ' .. source elseif context and not source then quote_source = context elseif source and not context then quote_source = source end return build(quote_contents, quote_source, options) end return Quote -- </nowiki>
摘要:
请注意,所有对Unimage Wiki的贡献均可能会被其他贡献者编辑、修改或删除。如果您不希望您的文字作品被随意编辑,请不要在此提交。
您同时也向我们承诺,您提交的内容为您自己所创作,或是复制自公共领域或类似自由来源(详情请见
Unimage Wiki:著作权
)。
未经许可,请勿提交受著作权保护的作品!
取消
编辑帮助
(在新窗口中打开)
该页面使用的模板:
模块:Dev/Quote/doc
(
编辑
)
编辑“︁
模块:Dev/Quote
”︁
来自Unimage Wiki