Module:Weather box/sandbox: Difference between revisions

Content deleted Content added
revert. i tried
copy from Module:Weather box; will later provide alternative for: "require('Module:Weather box/row/sandbox').buildRow"
Line 55:
if source1 or source2 then
if source1 and source2 then
text = 'Source #1: ' .. source1 .. '\n' .. result .. 'Source #2: ' .. source2
else
text = 'Source: ' .. (source1 and source1 or source2)
Line 85:
_ifset('margin', 'auto') .. ';"' ..
_if('open',
-- Following intentionally shows "{{{___location}}}" if parameter is blank to alert editor.
'\n|+Climate data for ' .. _if('___location', args.___location, '{{{___location}}}'),
'\n|-' ..
'\n|-' ..
'\n!colspan="14" | ' ..
_if('name',
navbar({'Climate data for ' .. _if('___location', args.___location, '{{{___location}}}'), args.name, collapsible=1}),
'Climate data for ' .. _if('___location', args.___location, '{{{___location}}}')
)
) ..
[=[
Line 371 ⟶ 372:
scale_factor = '1',
label = 'Average [[relative humidity]] (%)' ..
_if('time day', ' <span style="font-size:90%;" class="nowrap">(at {{{' .. _ifset('time day}}}', '') .. ')</span>') ..
_if('daily', ' <span style="font-size:90%;" class="nowrap">(daily average)</span>'),
annual_mode = 'avg',
Line 382 ⟶ 383:
scale_factor = '1',
label = 'Average afternoon [[relative humidity]] (%)' ..
_if('time day', ' <span style="font-size:90%;" class="nowrap">(at {{{' .. _ifset('time day}}}', '') .. ')</span>') ..
_if('daily', ' <span style="font-size:90%;" class="nowrap">(daily average)</span>'),
annual_mode = 'avg',
Line 469 ⟶ 470:
 
local function main(frame)
local buildRow = require('Module:Weather box/row/sandbox').buildRow
local args = frame:getParent().args
local results = {}