Content deleted Content added
change table styles per suggestion by User:RossO on my talk page |
Calendar Headers as TH cells, text content centered, footer text aligned right, day links given padding to increase target area. |
||
Line 81:
function p.makeDayLink(day, month, year)
return string.format("'''[[#%d %s %d| %d ]]'''", year, month, day, day)
end
Line 103:
:tag('tr')
:css('background-color', '#cedff2')
:tag('
:css{['text-align'] = 'center', ['padding-top'] = '1px', ['padding-bottom'] = '3px'}
:wikitext(makeWikilink('Portal:Current events/' .. dateStuff.previousMonthAndYear, '
:done()
:tag('
:attr('colspan', '5')
:css{['text-align'] = 'center', padding = '1px 4px', ['font-weight'] = 'bold'}
:wikitext(makeWikilink('Portal:Current events/' .. monthAndYear, monthAndYear))
:done()
:tag('
:css{['text-align'] = 'center', ['padding-top'] = '1px', ['padding-bottom'] = '3px'}
:wikitext(makeWikilink('Portal:Current events/' .. dateStuff.nextMonthAndYear, '
-- Day of week headings
Line 120:
local weekdays = {'S', 'M', 'T', 'W', 'T', 'F', 'S'}
for i, weekday in ipairs(weekdays) do
dayHeadingRow:tag('
:css{['text-align'] = 'center'}
:wikitext(weekday)
end
Line 137 ⟶ 138:
cellCount = cellCount + 1
firstDayRow:tag('td')
:css{['text-align'] = 'center'}
:wikitext(dayStrings[cellCount])
end
Line 148 ⟶ 150:
end
otherDayRow:tag('td')
:css{['text-align'] = 'center'}
:wikitext(dayString)
end
Line 156 ⟶ 159:
:tag('td')
:attr('colspan', '7')
:css{['padding-top'] = '3px', ['padding-bottom'] = '5px', ['font-size'] = '78%', ['text-align'] = '
:wikitext(' ' .. makeWikilink('Portal:Current events/' .. monthAndYear, 'More ' .. monthAndYear .. ' events... '))
return tostring(root)
|