Modul:Routemap: Perbedaan antara revisi
Konten dihapus Konten ditambahkan
RaFaDa20631 (bicara | kontrib) Update modul |
RaFaDa20631 (bicara | kontrib) Membalikkan revisi 15458088 oleh Alqhaderi Aliffianiko (bicara) Tag: Pembatalan |
||
Baris 35:
},
html = {
["cell-icon-fmt"] = '
|style="padding:0%s" ["cell-overlapicon-fmt"] = '<div
["cell-icon-fmt-with-overlap"] = '
|style="padding:0%s" ["cell-text-fmt"] = '
["cell-
["cell-
["cell-empty-fmt"] = '\n|style="padding:0;width:%s;min-width:%s;height:20px;min-height:20px%s"|%s',
["cell-empty-fmt-with-overlap"] = '\n|style="padding:0%s"|<div style="position:relative">%s</div><div style="width:%s;min-width:%s;height:20px;min-height:20px%s">%s</div>',
["cell-filler-fmt"] = '
["cell-filler-empty-fmt"] = '
["row-linfo4-fmt"] = '\
|
["row-linfo3-fmt"] = '<div
["row-rinfo3-fmt"] = ' <div
["row-rinfo4-fmt"] = '\
|
["row-general-fmt"] = '\
|- style="line-height:1" %s\
|
|
|
{|cellspacing="0" cellpadding="0" style="display: table; width: unset; line-height: 0; padding:0 !important; margin: 0 auto !important"\
|- style="display:inline-table;%s"%s\
|class="RMr" colspan="%s" style="%s"|%s%s',-- parameters: linfo4-fmt, colspan-left, linfo3+2-width, linfo3+2, linfo1-pad, linfo1-width, linfo1, bg, cells, rinfo1-pad, rinfo1-width, rinfo1, colspan-right, rinfo2+3-width, rinfo2+3, rinfo4-fmt▼
|}\
|style="width:auto;vertical-align:middle;text-align:right;padding:0 %s;%s"|<div style="display:inline;font-size:90%%;">%s</div>\
▲|
["row-collapsible-begin-fmt"] = '\
|- style="line-height:1"\
|colspan="7" style="padding:0 !important;background-color:%s"|\
{|class="
["row-collapsible-end-fmt"] = '\n|}',
Baris 73 ⟶ 80:
["row-collapsible-left-linfo4+3+2-fmt"] = '\
{|cellspacing="0" cellpadding="0" style="line-height:1;width:100%%;padding:0 !important;margin:0 !important"\
|style="width:auto;vertical-align:middle;padding:0 3px 0 1px;text-align:left"| <div
|style="width:auto;vertical-align:middle;text-align:right"| %s\
|}',-- parameters: linfo4, linfo3+2
["row-collapsible-right-button-width"] = '45px',-- 72px is the minimal width for [развернуть] / [свернуть] button at 90%. Use 58px for [expand] / [collapse]
["row-collapsible-right-rinfo2+3+4-fmt"] = '\
{|cellspacing="0" cellpadding="0" style="line-height:1;width:100%%;padding:0 !important;margin:0 !important"\
|style="width:auto;vertical-align:middle;text-align:left"| %s\
|style="width:auto;vertical-align:middle;padding:0 1px 0 3px;text-align:right"| <div
|}',-- parameters: rinfo2+3, linfo4
["row-collapsible-right-button-fmt"] = '\n| style="width:auto;vertical-align:middle;padding-left:3px;font-size:90%%;min-width:%s;%s" |',--parameters: right-button-width, rinfo4-width
["row-collapsible-replace-begin-fmt"] = '\
|- style="line-height:1"\
|colspan="7" style="padding:0 %s"|<div style="position:relative">\
{|
["row-collapsible-replace-end-fmt"] = '\n|}</div>',
["colspan-fmt"] = '%s\n|-\n| colspan="7" style="background-color:%s;text-align:%s;%s"|\n%s',
["empty-row-fmt"] = '\n|-\n| style="width:auto;padding:0 3px 0 0;%s" |\n| style="width:auto;padding: 0;%s" |\n|
}
}
Baris 124 ⟶ 131:
blue = '0078BE', ex_blue = '64ACD6',
brown = '8D5B2D', ex_brown = 'B89A7F',
cerulean = '1A8BB9', ex_cerulean = '73B7D3',
cyan = '40E0D0', ex_cyan = '8AEAE1',
denim = '00619F', ex_denim = '649EC3',
fuchsia = 'B5198D', ex_fuchsia = 'D173B8',
Baris 143 ⟶ 148:
purple = '8171AC', ex_purple = 'B1A8CB',
red = 'EF161E', ex_red = 'F37176',
ruby = 'CC0066', ex_ruby = 'DE64A1
saffron = 'FFAB2E', ex_saffron = 'FFC969',
sky = '069DD3', ex_sky = '67C2E3',
steel = 'A1B3D4', ex_steel = 'C4CFE3',
teal = '339999', ex_teal = '82C0C0
violet = '800080', ex_violet = 'B164B1',
yellow = 'FFD702', ex_yellow = 'FFEB81',
Baris 224 ⟶ 229:
end
return {y, z}
local function widths(p)
['w'] = 160, ['+bs'] = 140, ['bs'] = 120, ['+s'] = 100,
['s'] = 80, ['+db'] = 70, ['+b'] = 60, ['db'] = 50,
['b'] = 40, ['+cd'] = 35, ['+d'] = 30, ['+c'] = 25,
[''] = 20, ['ocd'] = 17.5, ['cd'] = 15, ['od'] = 12.5,
['d'] = 10, ['oc'] = 7.5, ['c'] = 5, ['o'] = 2.5
} -- in px
return values[p]
end
Baris 237 ⟶ 253:
]]
local tmp, tmp2, cellProps, iconProps, overlapProps, tmp_sep, link, tracking, icontext, iconpre, width = {}, {}, {}, {}, {}, '', '', ''
if #overlapIcons > 0 then
tmp = mw.text.split(overlapIcons[#overlapIcons], '!_')
Baris 243 ⟶ 259:
tmp = mw.text.split(overlapIcons[#overlapIcons], '!@')
overlapIcons[#overlapIcons] = tmp[1]
if #tmp > 1 then link = tmp[2] end
tmp = mw.text.split(icon, '__')
icon = tmp[1]
Baris 253 ⟶ 269:
end
else
tmp = mw.text.split(icon, '
if #tmp > 1 then icon, cellProps = tmp[1], properties(tmp[2]) end
tmp = mw.text.split(icon, '!@')
Baris 266 ⟶ 282:
if textspl ~= 1 then iconpre = mw.text.trim(mw.ustring.sub(icon, 1, textspl - 1)) end
end
if cellProps.style then cellProps.style = ';'..cellProps.style else cellProps.style = '' end
cellProps.bg = cellProps.bg or cellProps.background or cellProps.bgcolor
Baris 278 ⟶ 293:
if not cellProps.fontsize or rowProps.fontsize or cellProps.fontsize == 'info' then
elseif cellProps.fontsize == 'cmt' or cellProps.fontsize == 'comment' then
cellProps._before, cellProps._after = '<div
else
cellProps.style = cellProps.style..';font-size:'..cellProps.fontsize
Baris 285 ⟶ 300:
rowProps.align = rowProps.align or {'middle', 'center'}
cellProps.align = alignment(cellProps.align, rowProps.align[1], rowProps.align[2]) or rowProps.align
cellProps.style, cellProps.textfmt = cellProps.style..';vertical-align:'..cellProps.align[1]..';text-align:'..cellProps.align[2], ';vertical-align:'..cellProps.align[1]
else
cellProps.style, cellProps.textfmt = cellProps.style..';vertical-align:middle;text-align:center', ';vertical-align:middle;text-align:center'
end
end
Baris 293 ⟶ 308:
tmp = {}
for i, v in ipairs(overlapIcons) do
if
if overlapProps[i].style then overlapProps.style = ';'..overlapProps[i].style else overlapProps.style = '' end
overlapProps[i].bg = overlapProps[i].bg or overlapProps[i].background or overlapProps[i].bgcolor
Baris 301 ⟶ 315:
local tmp_textspl = string.find(v, '%*')
if tmp_textspl then
local tmp_icontext, tmp_iconpre = mw.text.trim(mw.ustring.sub(v, tmp_textspl + 1)), ''
if tmp_textspl ~= 1 then tmp_iconpre = mw.text.trim(mw.ustring.sub(v, 1, tmp_textspl - 1)) end
Baris 311 ⟶ 324:
if rowProps.fontsize or cellProps.fontsize or overlapProps[i].fontsize == 'info' then
elseif not overlapProps[i].fontsize then
overlapProps.
elseif overlapProps[i].fontsize == 'cmt' or overlapProps[i].fontsize == 'comment' then
overlapProps._before, overlapProps._after = '<div
else
overlapProps.style = overlapProps.style..';font-size:'..overlapProps[i].fontsize
Baris 320 ⟶ 333:
cellProps.align = cellProps.align or {'middle', 'center'}
overlapProps.align = alignment(overlapProps[i].align, cellProps.align[1], cellProps.align[2]) or cellProps.align
overlapProps.style, overlapProps.textfmt = overlapProps.style..';vertical-align:'..overlapProps.align[1]..';text-align:'..overlapProps.align[2], ';vertical-align:'..overlapProps.align[1]
else
overlapProps.style, overlapProps.textfmt = overlapProps.style..';vertical-align:middle;text-align:center', ';vertical-align:middle;text-align:center'
end
if overlapProps[i].abbr then
overlapProps.tag = {'
else
overlapProps.tag = {'div', 'div'}
end
width = (widths(tmp_iconpre) or 20)..'px'
table.insert(tmp, string.format(i18n.html['cell-overlaptext-fmt'],
else
v = mw.text.trim(v)
Baris 335 ⟶ 349:
if not string.find(v, 'numN%d+') then tracking = tracking..(i18n['error-categories']['text-images'] or i18n['error-categories'].default) end
end
table.insert(tmp, string.format(i18n.html['cell-overlapicon-fmt'], overlapProps.style, v,
end
end
Baris 341 ⟶ 355:
iconProps.bg = iconProps.bg or iconProps.background or iconProps.bgcolor
if iconProps.bg then iconProps.style = iconProps.style..';background:'..iconProps.bg end
width = widths(icon)
if width then
if tmp2[1] then iconProps.style = ';'..iconProps.style end
return string.format(i18n.html['cell-empty-fmt-with-overlap'], cellProps.style, mw.text.trim(table.concat(tmp)),
elseif icontext then
iconProps._before, iconProps._after = cellProps._before, cellProps._after
iconProps.color = iconProps.color or iconProps.colour ; iconProps.bold = iconProps.bold or iconProps.b ; iconProps.italic = iconProps.italic or iconProps.i or iconProps.it
Baris 353 ⟶ 367:
if rowProps.fontsize or cellProps.fontsize or iconProps.fontsize == 'info' then
elseif not iconProps.fontsize then
iconProps.
elseif iconProps.fontsize == 'cmt' or iconProps.fontsize == 'comment' then
iconProps._before, iconProps._after = '<div
else
iconProps.style = iconProps.style..';font-size:'..iconProps.fontsize
Baris 362 ⟶ 376:
cellProps.align = cellProps.align or {'middle', 'center'}
iconProps.align = alignment(iconProps.align, cellProps.align[1], cellProps.align[2]) or cellProps.align
iconProps.style, iconProps.textfmt = iconProps.style..';vertical-align:'..iconProps.align[1]..';text-align:'..iconProps.align[2], ';vertical-align:'..iconProps.align[1]
else
iconProps.style, iconProps.textfmt = iconProps.style..';vertical-align:middle;text-align:center', ';vertical-align:middle;text-align:center'
end
if iconProps.abbr then
iconProps.tag = {'
else
iconProps.tag = {'div', 'div'}
end
if tmp2[1] then iconProps.style = ';'..iconProps.style end
width = (widths(iconpre) or 20)..'px'
return string.format(i18n.html['cell-text-fmt-with-overlap']
else
if iconProps.style ~= '' then iconProps.style = string.gsub(' style="'..iconProps.style..'"', '";', '"', 1) end
Baris 381 ⟶ 396:
end
end
width = widths(icon)
return string.format(i18n.html['cell-empty-fmt'],
else
if link and link ~= '' then icontip = link end
if icontext then
if not cellProps.fontsize and not rowProps.fontsize then cellProps.
if cellProps.abbr then
cellProps.tag = {'
else
cellProps.tag = {'div', 'div'}
end
width = (widths(iconpre) or 20)..'px'
return string.format(i18n.html['cell-text-fmt'],
else
if string.find(icon, 'num') then
Baris 402 ⟶ 419:
end
local function fillercell(code
--Creates a 5px-high row.
--Values in icon pattern can only be [blank], d, [BSicon color] or #[hex triplet].
if code == '' then
return string.format(i18n.html['cell-filler-empty-fmt']
▲ if height ~= '' then
elseif code == 'd' then
return string.format(i18n.html['cell-filler-empty-fmt'], '10px', '10px')
▲ end
▲ return string.format(i18n.html['cell-filler-empty-fmt'], (string.match(code, '^.+$') or '_'), height)
elseif mw.ustring.sub(code,1,1) == '#' then
return string.format(i18n.html['cell-filler-fmt']
else
return string.format(i18n.html['cell-filler-fmt']
end
end
Baris 480 ⟶ 494:
-- The below parameter functions are passed through to the cells.
if result.rowProp.fontsize == 'cmt' or result.rowProp.fontsize == 'comment' then
result.rowProp._before, result.rowProp._after = '<
end
if result.rowProp.align then
Baris 489 ⟶ 503:
if type(filler) == 'string' then
result.style = ';font-size:0px'
result.rowstyle = 'height:' .. filler .. ';min-height:' .. filler --row parameter before any cells
for i, v in ipairs(icons) do table.insert(result['cells'], fillercell(v
else
result.style = ''
Baris 507 ⟶ 522:
if positive(result.rowProp.italic) then result.style = result.style..';font-style:italic' end
if positive(result.rowProp.bold) then result.style = result.style..';font-weight:bold' end
if result.rowProp.align then
result.style = result.style..';vertical-align:'..result.rowProp.align[1]..';text-align:'..result.rowProp.align[2]
else
result.style = result.style..';vertical-align:middle;text-align:center'
end
if result.rowProp.fontsize and result.rowProp._after == '' and result.rowProp.fontsize ~= 'info' then
result.style = result.style..';font-size:'..result.rowProp.fontsize
Baris 513 ⟶ 533:
return result
else
return string.format(i18n.html['row-general-fmt'], linfo4_fmt, lcolspan, '', result['linfo3+2'], q.linfo1_pad, '', result['linfo1'], result.style, result.rowstyle,
result['cells'], q.rinfo1_pad, '', result['rinfo1'], rcolspan, '', result['rinfo2+3'], rinfo4_fmt)
end
Baris 519 ⟶ 539:
--↓ This table handles diagram rows beginning with a hyphen ("-").
q = {collapsibles = -1, text_width = {'', '', '', '', '', ''}, linfo1_pad = '
q.isKeyword = function(pattern, i, rows, justTest)
if mw.ustring.sub(pattern, 1, 1) ~= '-' then if justTest then return false else return nil end end--not a valid keyword
Baris 534 ⟶ 554:
if tmp then
if tmp == 'endCollapsible' then return formaterror('collapsible-block-empty')
else return formaterror('collapsible-block-no-first-row') .. q.isKeyword(rows[i], i, rows) --no valid keywords that can follow "startCollapsible"
end
end
Baris 551 ⟶ 571:
if tmp['linfo4'] ~= '' or tmp['linfo3+2'] ~= '' then linfo4_3_2_fmt = string.format(i18n.html['row-collapsible-left-linfo4+3+2-fmt'], tmp['linfo4'], tmp['linfo3+2']) end
result = result .. string.format(i18n.html['row-general-fmt'], string.format(i18n.html['row-collapsible-left-button-fmt'], i18n.html['row-collapsible-left-button-width'], q.text_width[1]),
'1', q.text_width[2], linfo4_3_2_fmt, q.linfo1_pad, q.text_width[3], tmp['linfo1'], tmp.style, '', tmp['cells'], '', '', '', '1', '', '', string.format(i18n.html['row-rinfo4-fmt'], '', ''))
else
if tmp['rinfo4'] ~= '' or tmp['rinfo2+3'] ~= '' then rinfo2_3_4_fmt = string.format(i18n.html['row-collapsible-right-rinfo2+3+4-fmt'], tmp['rinfo2+3'], tmp['rinfo4']) end
result = result .. string.format(i18n.html['row-general-fmt'], string.format(i18n.html['row-linfo4-fmt'], q.text_width[1], tmp['linfo4']),
'1', q.text_width[2], tmp['linfo3+2'], q.linfo1_pad, q.text_width[3], tmp['linfo1'], tmp.style, '', tmp['cells'], q.rinfo1_pad, q.text_width[4], tmp['rinfo1'],
'1', q.text_width[5], rinfo2_3_4_fmt, string.format(i18n.html['row-collapsible-right-button-fmt'], i18n.html['row-collapsible-right-button-width'], q.text_width[6]))
end
Baris 569 ⟶ 589:
if tmp['linfo4'] ~= '' or tmp['linfo3+2'] ~= '' then linfo4_3_2_fmt = string.format(i18n.html['row-collapsible-left-linfo4+3+2-fmt'], tmp['linfo4'], tmp['linfo3+2']) end
result = result .. string.format(i18n.html['row-general-fmt'], string.format(i18n.html['row-linfo4-fmt'], '', ''), '1', q.text_width[2], linfo4_3_2_fmt,
q.linfo1_pad, q.text_width[3], tmp['linfo1'], tmp.style, '', tmp['cells'], '', '', '', '1', '', '', string.format(i18n.html['row-rinfo4-fmt'], '', ''))
else
if tmp['rinfo4'] ~= '' or tmp['rinfo2+3'] ~= '' then rinfo2_3_4_fmt = string.format(i18n.html['row-collapsible-right-rinfo2+3+4-fmt'], tmp['rinfo2+3'], tmp['rinfo4']) end
result = result .. string.format(i18n.html['row-general-fmt'], string.format(i18n.html['row-linfo4-fmt'], q.text_width[1], tmp['linfo4']), '1', q.text_width[2],
tmp['linfo3+2'], q.linfo1_pad, q.text_width[3], tmp['linfo1'], tmp.style, '', tmp['cells'], q.rinfo1_pad, q.text_width[4], tmp['rinfo1'], '1', q.text_width[5],
rinfo2_3_4_fmt, string.format(i18n.html['row-rinfo4-fmt'], '', ''))
end
Baris 606 ⟶ 626:
end
q['filler'] = function(params, i, rows)
local tmp, height = table.concat(params, '-', 3),
if #params < 3 or tmp == '' then return formaterror('parameter-missing') end--TODO: specify the name of the parameter
if params[2] ~= '' then height = params[2] end
Baris 662 ⟶ 682:
end
tmp = {}
local index = 0
local rows = {}
Baris 690 ⟶ 710:
q.text_width[1] = q.text_width[1] .. 'min-width:' .. i18n.html['row-collapsible-left-button-width'] .. ';'
else
q.text_width[6] = q.text_width[6] .. 'min-width:' .. i18n.html['row-collapsible-right-button-width'] .. ';'
end
end
-- ↓ empty row to set column widths; ↑ if q.collapsibles ≠ -1 and there are collapsible sections, leftmost or rightmost column should be wide enough to accomodate the button
table.insert(tmp, string.format(i18n.html['empty-row-fmt'], q.text_width[1], q.text_width[2], q.linfo1_pad, q.text_width[3], q.rinfo1_pad, q.text_width[4], q.text_width[5], q.text_width[6]))
return table.concat(tmp)
end
local function getArgNums(prefix, args)
end
Baris 731 ⟶ 751:
table.sort(mapnums)
end
args['title bg color'] = args['title bg color
▲ local classes = {}
▲ args['title bg color'] = args['title bg color'] or args['title bg'] or args['title-bg'] or '#27404E'
args['title color'] = args['title color'] or args['title-color'] or greatercontrast{args['title bg color'], '#FFF', rgb_black}
args.legend = args.legend or ''
Baris 751 ⟶ 770:
args.collapsible = '0'
else
if args.collapse then
result = result .. '" '
end
args.float = args.float or 'right'
Baris 764 ⟶ 784:
args.fontsize2 = 10000/88
if args.inline then
args.inline2 = 'float:none;width:100%;margin:0;border:none;'
args.fontsize = 100
else
args.inline2 = 'box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12), 0 3px 1px -2px rgba(0, 0, 0, 0.2); -moz-box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12), 0 3px 1px -2px rgba(0, 0, 0, 0.2); -webkit-box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12), 0 3px 1px -2px rgba(0, 0, 0, 0.2);'
args.fontsize = 88 -- as above: CSS rule for .infobox in %
end
args.bg = args.bg or '#F9F9F9'
args.style = args.style or ''
result = result .. '
args.title = args.title or ''
if args.inline or args.title == 'no' or args.title == '0' then
Baris 799 ⟶ 819:
end
end
result = result .. 'font-size:'..args.fontsize2..'%;">' .. args.title .. '</div></div>'
end
args.top = args.top or args['on top']
Baris 814 ⟶ 834:
args.legend = i18n.text.legend[args.legend2] or ((args.legend2 ~= '') and ('[['..args.legend) or i18n.text.legend.default)
args.legend = args.legend .. '|' .. (args['legend alt'] or i18n.text.legend_text) .. ']]'
result = result .. '<div class="selfreference noprint" style="text-align:right;font-size:
end
if args.inline then args.padding2 = '0px' else args.padding2 = '0px 6px' end
Baris 824 ⟶ 844:
if args['map'..v..'-title'] then
args.header_margin = '0'
if k == 1 then args.border_header = 'border-bottom: 5px solid '..args.bg..';' else args.border_header = 'border-top: 5px solid '..args.bg..'; border-bottom: 5px solid '..args.bg..';' end
if positive(args['map'..v..'-collapsible']) then
args.header_margin = '0 55px'
args.ending = '\n|}'
if positive(args['map'..v..'-collapse']) or positive(args['map'..v..'-collapsed']) then args.map_collapsed = ' mw-collapsed autocollapse' else args.map_collapsed = '' end
result = result..'\n|-\n|\n{|class="mw-collapsible'..args.map_collapsed..'" cellpadding="0" cellspacing="0" style="display: table; min-width:100%; margin:0 auto;"'
end
if args.inline then args.header_style2 = ' style="line-height:normal;"' else args.header_style2 = '' end
result = result..'\n|-'..args.header_style2..'\n!style="'..args.border_header..'padding:3px 5px; text-align:center; vertical-align:middle; color:'..rgb_black..'; background-color: #EEEEEE" | <div style="margin:'..args.header_margin..';font-size:'..10000/args.fontsize..'%;">'..args['map'..v..'-title']..'</div>'
args.border_top = ''
else
if k == 1 then args.border_top = '' else args.border_top = 'border-top: 5px solid '..args.bg..';' end
end
result = result .. '\n|-\n|style="'..args.border_top..'padding:' .. args.padding2 .. '"|\n{|cellpadding="0" cellspacing="0" class="nogrid
end
args.bottom = args.bottom or args.footnote
Baris 864 ⟶ 884:
end
style = style or ''
local result = ' <table cellspacing="0" cellpadding="0" style="font-size:
if italic or it == 'all' then result = result..';font-style:italic' end
if bold then result = result..';font-weight:bold' end
Baris 870 ⟶ 890:
result = result..';'..style..'">'..rowstart..lh
if line then result = result..';border-bottom:1px solid gray' end
local bgpad = ';padding-left:0.5em;padding-right:0.5em'
local function bgtext(v)
return ';color:'..greatercontrast{v, '#FFF', rgb_black}
end
if bg1 then
result = result..bgpad..bgtext(bg1)..';background-color:'..bg1
elseif bg2 then
result = result..bgpad
Baris 904 ⟶ 924:
['ch'] = 20.1168,
['mi;ch'] = 80,
['m'] = 1 / 0.9144,
['yd'] = 0.9144,
['ft'] = 0.3048,
}
local sf = { -- 10 ^ floor(log10(cvt[inp]) + 0.5); or 10 ^ floor(log10(cvt[inps[1]] * cvt[inp]) + 0.5) for dual-unit inputs. this corrects the accuracy of result so that it usually has same significant figures
['mi'] = 1,
['ch'] = 10,
['mi;ch'] =
['m'] = 1,
['yd'] = 1,
['ft'] =
}
if not inp then inp = 'mi' end
Baris 938 ⟶ 958:
t1 = v1..' '..outp
v1 = tonumber(v1)
t2 = floor(v1 / cvt[inps[1]])..' '..inps[1]..' '..floor(v1 % cvt[inps[1]] / cvt[inps[1]] * cvt[inp] * mult * sf[inp] + 0.5) / mult / sf[inp]..' '..inps[2]
else
v1 = split(trim(v1), ';')
t1 = v1[1]..' '..inps[1]..' '..v1[2]..' '..inps[2]
t2 = floor((tonumber(v1[1]) * cvt[inps[1]] + tonumber(v1[2]) * cvt[inps[1]] / cvt[inp]) * mult / sf[inp] + 0.5) / mult * sf[inp]..' '..outp
end
else
if swap then
v2 = floor(tonumber(v1) / cvt[inp] * mult * sf[inp] + 0.5) / mult / sf[inp]
inp, outp = outp, inp
else
v2 = floor(tonumber(v1) * cvt[inp] * mult / sf[inp] + 0.5) / mult * sf[inp]
end
t1 = v1..' '..inp
Baris 965 ⟶ 985:
result = result..rowend..rowstart..lh
if bg2 then
result = result..bgpad..bgtext(bg2)..';background-color:'..bg2
elseif bg1 then
result = result..bgpad
Baris 1.002 ⟶ 1.022:
args[4] = args[4] or args.it or args.i
args[5] = args[5] or args.b
return base(args[1],args[2],args[3],nil,nil,args[4],nil,args[5],args.align,args.style,args.bg1,args.bg2,args.line,'105%','92%','0.9',nil,nil,nil,'to')
end
Baris 1.011 ⟶ 1.031:
args[4] = args[4] or args.it or args.i
args[5] = args[5] or args.b
return base(args[1],args[2],args[3],nil,args[4],nil,nil,args[5],args.align,args.style,args.bg1,args.bg2,args.line,'inherit','inherit','0.9',nil,nil,nil,'split')
end
Baris 1.020 ⟶ 1.040:
args[4] = args[4] or args.it or args.i
args[5] = args[5] or args.b
return base(args[1],args[2],nil,args[3],args[4],nil,nil,args[5],args.align,args.style,args.bg1,args.bg2,args.line,'inherit','inherit','0.9',nil,nil,nil,'srws')
end
Baris 1.026 ⟶ 1.046:
function p._BScvt(args)
return base(nil,nil,nil,nil,nil,nil,args.alt,nil,args.align,args.style,args.bg1,args.bg2,args.line,'inherit','inherit','0.9',args[1],args[2],args['in'],'cvt')
end
Baris 1.202 ⟶ 1.222:
Creates Routemap syntax for a diagram row based on parameters.
Simplified version; an in-app upgrade to the full version costs US$0.99.
Intended to be used to substitute legacy templates.
Note that for compatibility the link and sidebar parameter names are different.
Baris 1.300 ⟶ 1.321:
res = string.gsub(res, '{{!}}}', '-endCollapsible-')
res = string.gsub(res, '{{[Ee]nd}}', '-endCollapsible-')
res = string.gsub(res, '|}\n
res = string.gsub(res, '{{[Bb][Ss]%-colspan}}\n{{safesubst', '{{safesubst') -- BS-colspan is unnecessary and would cause error in Routemap.
res = string.gsub(res, '{{[Bb][Ss]%-colspan}}\n%-%-%-%-', '-colspan-2\n----')
|