Module:Version: Difference between revisions

From Vintage Story Wiki
m
no edit summary
mNo edit summary
mNo edit summary
Line 3: Line 3:
function p.prevNextLinks(f)
function p.prevNextLinks(f)
local args = require( 'Module:ProcessArgs' ).merge( true )
local args = require( 'Module:ProcessArgs' ).merge( true )
local leftArrows = '<span style="margin-right:-0.35em">◄</span>◄ '
local rightArrows = ' <span style="margin-right:-0.35em">►</span>►'
local prev = ''
local prev = ''
Line 8: Line 11:
if string.match(string.lower(args.prev), 'tbd') then
if string.match(string.lower(args.prev), 'tbd') then
prev = 'TBD'
prev = 'TBD'
else prev = args.prev end
else  
prev = '[[' .. prev .. '|<span style="margin-right:-0.35em">◄</span>◄ ' .. prev .. ']]'
    prev = '[[' .. prev .. '|' .. leftArrows .. prev .. ']]'
end
end
end
local next = ''
local next = ''
if args.next then  
if args.next then  
if string.match(string.lower(args.next), 'tbd') then
if string.match(string.lower(args.next), 'tbd') then
next = 'TBD'
next = 'TBD' .. rightArrows
else next = args.next end
else  
next = '[[' .. next .. '|' .. next .. ' <span style="margin-right:-0.35em">►</span>►]]'
    next = '[[' .. args.next .. '|' .. args.next .. rightArrows .. ']]'
end
end
end
local prevDev = ''
local prevDev = ''
if args.prevdev then  
if args.prevdev then  
if string.match(string.lower(args.prevdev), 'tbd') then
if string.match(string.lower(args.prevdev), 'tbd') then
prevDev = 'TBD'
prevDev = 'TBD'
else prevDev = args.prevdev end
else  
prevDev = '[[' .. prevDev .. '|◄ ' .. prevDev .. ']]'
    prevDev = '[[' .. args.prevdev .. '|◄ ' .. args.prevdev .. ']]'
end
end
end
local nextDev = ''
local nextDev = ''
if args.nextdev then  
if args.nextdev then  
if string.match(string.lower(args.nextdev), 'tbd') then
if string.match(string.lower(args.nextdev), 'tbd') then
nextDev = 'TBD'
nextDev = 'TBD '
else nextDev = args.nextdev end
else  
nextDev = '[[' .. nextDev .. '|' .. nextDev .. ' ►]]'
    nextDev = '[[' .. args.nextdev .. '|' .. args.nextdev .. ' ►]]'
end
end
end
Confirmedusers, Interface administrators
1,131

edits