Module:GR header

local getArgs = require('Module:Arguments').getArgs local p = {}

function p.main(frame) local args = getArgs(frame,{parentOnly = true}) local sign = '' local line = '' local mode = {,,0}

local name = { args.name_el or frame:expandTemplate{title='red',args={'Greek name missing!'}}, args.name or frame:expandTemplate{title='red',args={'English name missing!'}} }

--	Box style if args.mode == 'AA' then sign = '0057A3;color:#FFF;text-align:left' else sign = 'FFF' end

--	Line style if args.line ~= nil then line = 'border-top:'..p.line(args.line,args.name) end if args.line_2 ~= nil then line = line..';border-bottom:'..p.line(args.line_2,args.name) end

--	Mode style if args.mode == 'AA' then mode = {p.mode(args.mode),'','0 0 6'} elseif p.mode(args.mode) ~= '' then mode = {p.mode(args.mode),p.mode(args.mode_2,'r'),6} end

mw.log(p.mode(args.mode)) --	English name style if name[2] == 'KAT' then name[2] = '' elseif name[2] == 'Athens International Airport' then name[2] = ' '..name[2]..' ' else name[2] = ' '..name[2]..' ' end

return ' '..mode[1]..''..frame:expandTemplate{title='lang',args={'el',name[1]}}..name[2]..' '..mode[2]..'  ' end

function p.line(s,n) if s == 'AM1'    then c = '007A33' elseif s == 'AM2' then c = 'DA291C' elseif s == 'AM3' or s == 'TS' then c = '10069F' elseif s == 'AM4' then c = 'FFA300' elseif s == 'AS' then if n == 'Athina' then c = '00A3E0' else c = 'FFCD00' end elseif s == 'ASK' then c = '00A3E0' elseif s == 'AT' then c = '78BE20' else return 'none' end return '6px solid #'..c end

function p.mode(s,f) if s == nil and f == 'r' then return ' ' elseif s == 'S' then m = {'OSE-Logo.svg','Hellenic Train'} elseif s == 'SO' then m = {'OSE-Logo.svg','Diakopto–Kalavryta railway'} elseif s == 'AA' then m = {'Airplane silhouette white.svg','Athens International Airport'} elseif s == 'AM' then m = {'Logo of the Athens Metro Operating Company (AMEL).svg','Athens Metro'} elseif s == 'AS' then m = {'Proastiakos icon (no text).svg','Athens Suburban Railway'} elseif s == 'AT' then m = {'Logo of the Athens Tram (icon only).svg','Athens Tram'} elseif s == 'PS' then m = {'Proastiakos icon (no text).svg','Patras Suburban Railway'} elseif s == 'TS' then m = {'Proastiakos icon (no text).svg','Thessaloniki Suburban Railway'} else return '' end return ' ' end

return p