Module:Rail/sandbox: Difference between revisions

Content deleted Content added
No edit summary
No edit summary
Line 186:
colour = string.match(colour, '#') and colour or '#' .. colour
end
local linkedBox =
style == 'link' or
for _, v in ipairs({'link', 'ldot', 'lsquare', 'route', 'croute', 'xroute'}) do
if style == v then linkedBox = true break'ldot' endor
style == 'lsquare' or
end
style and string.match(style, 'route')
if linkedBox then
root:wikitext(string.match(lineTitle, '%[%[.+|'))
Line 209 ⟶ 210:
:css('margin', '1px')
end
if
for _, v in ipairs({'dot', 'ldot', 'square', 'lsquare'}) do
if style == v then box:css('line-heightdot', 'initial') break endor
style == 'ldot' or
style == 'square' or
style == 'lsquare' then
box:css('line-height', 'initial')
end
if
for i, v in ipairs({'dot', 'ldot', 'square', 'lsquare', 'xroute'}) do
if style == v then box:css('colordot', colour) break endor
style == 'ldot' or
if i == 5 then box:css('background-color', colour) end
style == 'square' or
style == 'lsquare' or
style == 'xroute' then
box:css('color', colour)
else
if i == 5 then box:css('background-color', colour) end
end
if
for i, v in ipairs({nil, 'link', 'inline', 'yes', 'box'}) do
style == nil or
if style == v then box:css('border', '1px solid black') break end
ifstyle i >== 5'link' thenor
style == 'inline' or style == 'yes' or
box
style == 'box' then
:css('border', '.075em solid ' .. (
if style == v then box:css('border', '1px solid black') break end
typeData and typeData['border color'] or
elseif style and string.match(style, 'route') then
lineData and lineData['border color'] or
box
colour
:css('border', '.075em solid ' .. (
)
typeData and typeData['border color'] or
lineData and lineData['border color'] or
colour
)
)
:css('padding', '0 .3em')
if style == 'croute' or style =~= 'xrouteroute' then
box:css('border-radius', '.5em')
end
end
end
Line 256 ⟶ 270:
end
if linkedBox then root:wikitext(']]') end
if
for _, v in ipairs({nil, 'inline', 'yes', 'small', 'dot', 'square'}) do
style == nil or
if style == v then div:wikitext(' ', lineTitle) break end
style == 'inline' or style == 'yes' or
style == 'small' or
style == 'dot' or
style == 'square' then
if style == v then div:wikitext(' ', lineTitle) break end
end
return root