Module:Template test case and Module:Template test case/sandbox: Difference between pages
(Difference between pages)
imported>Jonesey95 fix text color in dark mode; this generally works but may cause problems, in which case revert or try specifying a color |
imported>Andrybak |
||
Line 117: | Line 117: | ||
return self.template | return self.template | ||
else | else | ||
return require('Module:Template invocation').name(self.title) | return require('Module:Template invocation/sandbox').name(self.title) | ||
end | end | ||
end | end | ||
Line 145: | Line 145: | ||
} | } | ||
if format == 'code' then | if format == 'code' then | ||
invocation = '< | invocation = '<syntaxhighlight lang="wikitext" inline>' .. invocation .. '</syntaxhighlight>' | ||
elseif format == 'kbd' then | elseif format == 'kbd' then | ||
invocation = '<kbd>' .. mw.text.nowiki(invocation) .. '</kbd>' | invocation = '<kbd>' .. mw.text.nowiki(invocation) .. '</kbd>' | ||
Line 358: | Line 358: | ||
:tag('div') | :tag('div') | ||
:css('background-color', isEqual and 'yellow' or '#90a8ee') | :css('background-color', isEqual and 'yellow' or '#90a8ee') | ||
:css('font-weight', 'bold') | :css('font-weight', 'bold') | ||
:css('padding', '0.2em') | :css('padding', '0.2em') | ||
Line 371: | Line 370: | ||
:tag('div') | :tag('div') | ||
:css('background-color', isEqual and 'lightgreen' or 'yellow') | :css('background-color', isEqual and 'lightgreen' or 'yellow') | ||
:css('font-weight', 'bold') | :css('font-weight', 'bold') | ||
:css('padding', '0.2em') | :css('padding', '0.2em') | ||
Line 749: | Line 747: | ||
return nowikiObj:getInvocation(options) | return nowikiObj:getInvocation(options) | ||
else | else | ||
return require('Module:Template invocation').invocation( | return require('Module:Template invocation/sandbox').invocation( | ||
options.template, | options.template, | ||
self.invokeArgs | self.invokeArgs |