Module:Message box: Difference between revisions

Jump to navigation Jump to search
(Created page with "-- This is a meta-module for producing message box templates, including -- {{mbox}}, {{ambox}}, {{imbox}}, {{tmbox}}, {{ombox}}, {{cmbox}} and {{fmbox}}. -- Load necessary modules. require('strict') local getArgs local yesno = require('Module:Yesno') -- Get a language object for formatDate and ucfirst. local lang = mw.language.getContentLanguage() -- Define constants local CONFIG_MODULE = 'Module:Message box/configuration' local DEMOSPACES = {talk = 'tmbox', image = '...")
 
(Hide left/right images on mobile.)
Tag: Reverted
Line 537: Line 537:
imageLeftCell = imageLeftCell:tag('div'):css('width', '52px')
imageLeftCell = imageLeftCell:tag('div'):css('width', '52px')
end
end
-- Hide image on mobile as screen may be too narrow.
imageLeftCell:addClass('nomobile')
imageLeftCell:wikitext(self.imageLeft or nil)
imageLeftCell:wikitext(self.imageLeft or nil)
elseif self.imageEmptyCell then
elseif self.imageEmptyCell then
Line 592: Line 594:
imageRightCell = imageRightCell:tag('div'):css('width', '52px')
imageRightCell = imageRightCell:tag('div'):css('width', '52px')
end
end
-- Hide image on mobile as screen may be too narrow.
imageRightCell:addClass('nomobile')
imageRightCell
imageRightCell
:wikitext(self.imageRight or nil)
:wikitext(self.imageRight or nil)