Module:Infobox military conflict: Difference between revisions

no edit summary
m (1 revision imported)
en>Frietjes
No edit summary
Line 2:
 
local infoboxStyle = mw.loadData('Module:WPMILHIST Infobox style')
local templatestyles = 'Module:Infobox military conflict/styles.css'
 
local IMC = {}
Line 94 ⟶ 95:
:done()
:tag('td')
:tag('spandiv')
:addClass('location')
:wikitext(self.args.place or '{{{place}}}') -- hack so that people who don't know Lua know that this parameter is required
Line 142 ⟶ 143:
-- this should be the same as using {{stack|clear=right|...}}
builder = builder:tag('div')
:addClass('mw-stack mobiledesktop-float-resetright')
:css('box-sizing', 'border-box')
:css('float', 'right')
:css('clear', 'right')
:tag('div')
:css('overflow', 'hidden')
Line 152 ⟶ 150:
builder = builder:tag('table')
:addClass('infobox vevent')
:cssText(infoboxStyle.main_box_raw_auto_widthmain_box_raw)
:css('width', self.args.width or '315px'nil)
 
builder:tag('tr')
Line 213 ⟶ 211:
:attr('colspan', self.combatants)
:css('border-top', infoboxStyle.internal_border)
:node(require('Module:Location map').main(self.frame, {
:tag('center')
self.args.map_type,
:node(require('Module:Location map').main(self.frame, {
relief = self.args.map_typemap_relief,
reliefcoordinates = self.args.map_reliefcoordinates,
coordinateswidth = self.args.coordinatesmap_size or 220,
widthfloat = self.args.map_size or 220'center',
floatborder = 'centernone',
bordermark = 'none'self.args.map_mark,
markmarksize = self.args.map_markmap_marksize or 8,
marksizelabel = self.args.map_marksize or 8map_label,
labelalt = self.args.map_labelmap_alt,
altcaption = self.args.map_alt,map_caption or ('Location within '
.. (require('Module:Location map').data(self.frame, {self.args.map_type, 'name'})))
caption = self.args.map_caption or ('Location within '
}))
.. (require('Module:Location map').data(self.frame, {self.args.map_type, 'name'})))
}))
end
builder = builder:done()
Line 268 ⟶ 265:
 
function p.main(frame)
return frame:extensionTag{ name = 'templatestyles', args = { src = templatestyles} } .. tostring(IMC.new(frame):render())
end
 
Anonymous user