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 =
for _, v in ipairs({'link', 'ldot', 'lsquare', 'route', 'croute', 'xroute'}) do
style == 'link' or
if style == 'ldot'v then linkedBox = true break orend
end
style == 'lsquare' or
style and string.match(style, 'route')
if linkedBox then
root:wikitext(string.match(lineTitle, '%[%[.+|'))
Line 210 ⟶ 209:
:css('margin', '1px')
end
for _, v in ipairs({'dot', 'ldot', 'square', 'lsquare'}) do
if
if style == v then box:css('dotline-height', 'initial') break orend
style == 'ldot' or
style == 'square' or
style == 'lsquare' then
box:css('line-height', 'initial')
end
for i, v in ipairs({'dot', 'ldot', 'square', 'lsquare', 'xroute'}) do
if
if style == v then box:css('dotcolor', colour) break orend
if i == 5 then box:css('background-color', colour) end
style == 'ldot' or
style == 'square' or
style == 'lsquare' or
style == 'xroute' then
box:css('color', colour)
else
box:css('background-color', colour)
end
for _, v in ipairs({nil, 'link', 'inline', 'yes', 'box'}) do
if
if style == v then box:css('border', '1px solid black') break end
style == nil or
styleif =i >= 'link'5 orthen
box
style == 'inline' or style == 'yes' or
:css('border', '.075em solid ' .. (
style == 'box' then
typeData and typeData['border color'] or
box:css('border', '1px solid black')
lineData and lineData['border color'] or
elseif style and string.match(style, 'route') then
colour
box
)
: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 == 'routexroute' then
box:css('border-radius', '.5em')
end
end
end
Line 270 ⟶ 256:
end
if linkedBox then root:wikitext(']]') end
for _, v in ipairs({nil, 'inline', 'yes', 'small', 'dot', 'square'}) do
if
if style == v then div:wikitext(' ', lineTitle) break end
style == nil or
style == 'inline' or style == 'yes' or
style == 'small' or
style == 'dot' or
style == 'square' then
div:wikitext(' ', lineTitle)
end
return root