ಮಾಡ್ಯೂಲ್:Location map/sandbox: ಪರಿಷ್ಕರಣೆಗಳ ನಡುವಿನ ವ್ಯತ್ಯಾಸ

Content deleted Content added
redo experimental size reductions
Fixing content model
೧೫೮ ನೇ ಸಾಲು:
end
local retval = args.float == 'center' and '<div class="center">' or ''
if args.caption and args.caption ~= '' and args.border ~= 'infobox' then
retval = retval .. '<div class="noviewer thumb '
if args.float == '"left"' or args.float == 'left' then
೨೧೨ ನೇ ಸಾಲು:
local retval = '</div>'
if not args.caption or args.border == 'infobox' then
retval = retval .. '<div style="font-size:90%;padding-top:3px">'
if args.border then
.. (args.caption or (args.label or mw.title.getCurrentTitle().text) .. ' (' .. map('name') .. ')')
retval = retval .. '<div>'
else
retval = retval .. '<div style="font-size:90%;padding-top:3px">'
end
retval = retval
.. (args.caption or (args.label or mw.title.getCurrentTitle().text) .. ' (' .. map('name') .. ')')
.. '</div>'
elseif args.caption ~== '' then
retval = retval .. '<div style="font-size:90%;padding-top:3px"></div>'
else
-- 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>'
Line ೨೫೦ ⟶ ೨೪೭:
local function markOuterDiv(x, y, imageDiv, labelDiv)
return mw.html.create('div')
:cssText('position:absolute;top:' .. round(y, 3) .. '%;left:' .. round(x, 3) .. '%;height:0;width:0;margin:0;padding:0')
:node(imageDiv)
:node(labelDiv)
Line ೨೫೭ ⟶ ೨೫೪:
local function markImageDiv(mark, marksize, label, link, alt, title)
local builder = mw.html.create('div')
:cssText('position:absolute;text-align:center;left:-' .. round(marksize / 2) .. 'px;top:-' .. round(marksize / 2) .. 'px;width:' .. marksize .. 'px;font-size:' .. marksize .. 'px;line-height:0')
:attr('title', title)
if marksize ~= 0 then
Line ೨೭೪ ⟶ ೨೭೧:
 
local function markLabelDiv(label, label_size, label_width, position, background, x, marksize)
if tonumber(label_size) == 0 then
return mw.html.create('div'):cssText('font-size:0%;position:absolute'):wikitext(label)
end
local builder = mw.html.create('div')
:cssText('font-size:' .. label_size .. '%;line-height:110%;position:absolute;width:' .. label_width .. 'em')
Line ೩೩೨ ⟶ ೩೨೬:
-- If they didn't provide either coordinate, try Wikidata. If they provided one but not the other, don't.
local entity = mw.wikibase.getEntity()
if entity and entity.claims and entity.claims.P625p625 and entity.claims.P625p625[10].mainsnak.snaktype == 'value' then
local value = entity.claims.P625p625[10].mainsnak.datavalue.value
longitude, latitude = value.longitude, value.latitude
end
"https://kn.wikipedia.org/wiki/ಮಾಡ್ಯೂಲ್:Location_map/sandbox" ಇಂದ ಪಡೆಯಲ್ಪಟ್ಟಿದೆ