Module:Solar eclipse/sandbox: Difference between revisions

Content deleted Content added
preference for date over full link
Added nature subheader (standardizing with the lunar eclipse infobox)
Line 179:
belowstr = string.format('<div style="width:100%%"><div class="noprint" style="text-align:right">%s →</div></div>', nextLink)
end
local nature = args['nature'] and args['nature']:lower() or ''
local color_code = '#727272'
local eclipse_type = 'Eclipse'
if nature == 'total' then
color_code = '#690005'
eclipse_type = 'Total eclipse'
elseif nature == 'partial' then
color_code = '#c56b55'
eclipse_type = 'Partial eclipse'
elseif nature == 'annular' then
color_code = '#5555c5'
eclipse_type = 'Annular eclipse'
elseif nature == 'hybrid' then
color_code = '#55c555'
eclipse_type = 'Hybrid eclipse'
end
 
local type_header = string.format(
'<span style="background-color: %s; color: white; display: block;">%s</span>',
color_code,
eclipse_type
)
 
 
Line 194 ⟶ 217:
["data1"] = mapstr,
------------- Type of eclipse and saros -------------
["header2"] = "Type of eclipse" .. (args['type_ref'] or '')type_header,
["label3"] = "Nature",
["data3"] = args['nature'] or '',
["label4"] = "[[Gamma (eclipse)|Gamma]]",
["data4"] = args['gamma'] or '',