Module:Location map: Difference between revisions
Richardpruen (talk | contribs) m 1 revision imported |
imported>Legoktm Replace Module:No globals with require( "strict" ) |
||
Line 1: | Line 1: | ||
require(' | require('strict') | ||
local p = {} | local p = {} | ||
Line 207: | Line 207: | ||
local currentTitle = mw.title.getCurrentTitle() | local currentTitle = mw.title.getCurrentTitle() | ||
retval = string.format( | retval = string.format( | ||
'%s[[File:%s|%spx|%s%s]]', | '%s[[File:%s|%spx|%s%s|class=notpageimage]]', | ||
retval, | retval, | ||
image, | image, | ||
Line 220: | Line 220: | ||
end | end | ||
if args.overlay_image then | if args.overlay_image then | ||
return retval .. '<div style="position:absolute;top:0;left:0">[[File:' .. args.overlay_image .. '|' .. width .. 'px]]</div>' | return retval .. '<div style="position:absolute;top:0;left:0">[[File:' .. args.overlay_image .. '|' .. width .. 'px|class=notpageimage]]</div>' | ||
else | else | ||
return retval | return retval | ||
Line 246: | Line 246: | ||
elseif args.caption ~= '' then | elseif args.caption ~= '' then | ||
-- This is not the pipe trick. We're creating a link with no text on purpose, so that CSS can give us a nice image | -- This is not the pipe trick. We're creating a link with no text on purpose, so that CSS can give us a nice image | ||
retval = retval .. '<div class="thumbcaption"><div class="magnify">[[:File:' .. getContainerImage(args, map) .. '| ]]</div>' .. args.caption .. '</div>' | retval = retval .. '<div class="thumbcaption"><div class="magnify">[[:File:' .. getContainerImage(args, map) .. '|class=notpageimage| ]]</div>' .. args.caption .. '</div>' | ||
end | end | ||
Line 304: | Line 304: | ||
if marksize ~= 0 then | if marksize ~= 0 then | ||
builder:wikitext(string.format( | builder:wikitext(string.format( | ||
'[[File:%s|%dx%dpx|%s|link=%s%s]]', | '[[File:%s|%dx%dpx|%s|link=%s%s|class=notpageimage]]', | ||
mark, | mark, | ||
marksize, | marksize, |