11.314
suntingan
(←Membuat halaman berisi '-- This module renders the calendar seen on Portal:Current events. --[[ Incoming expected variables: frame.args.year = Integer value for year frame.args.month = Integer value for month, 1 based. --]] local p = {} local function makeWikilink(link, display) if display then return string.format('%s', link, display) else return string.format('%s', link) end end local function getDateStuff(argsDate) --[[ Note: This function takes advant...') |
Tidak ada ringkasan suntingan |
||
| (2 revisi perantara oleh pengguna yang sama tidak ditampilkan) | |||
| Baris 1: | Baris 1: | ||
-- This module renders the calendar seen on [[Portal: | -- This module renders the calendar seen on [[Portal:Berita terkini]]. | ||
--[[ | --[[ | ||
| Baris 84: | Baris 84: | ||
:addClass('noprint') | :addClass('noprint') | ||
:wikitext(makeWikilink( | :wikitext(makeWikilink( | ||
'Portal: | 'Portal:Berita terkini/' .. dateStuff.previousMonthAndYear, | ||
'◀' | '◀' | ||
)) | )) | ||
| Baris 90: | Baris 90: | ||
:tag('span') | :tag('span') | ||
:wikitext(makeWikilink( | :wikitext(makeWikilink( | ||
'Portal: | 'Portal:Berita terkini/' .. monthAndYear, | ||
monthAndYear | monthAndYear | ||
)) | )) | ||
| Baris 97: | Baris 97: | ||
:addClass('noprint') | :addClass('noprint') | ||
:wikitext(makeWikilink( | :wikitext(makeWikilink( | ||
'Portal: | 'Portal:Berita terkini/' .. dateStuff.nextMonthAndYear, | ||
'▶' | '▶' | ||
)) | )) | ||
| Baris 103: | Baris 103: | ||
-- Day of week headings | -- Day of week headings | ||
local dayHeadingRow = root:tag('tr') | local dayHeadingRow = root:tag('tr') | ||
local weekdays = {' | local weekdays = {'M', 'S', 'S', 'R', 'K', 'J', 'S'} | ||
for _, weekday in ipairs(weekdays) do | for _, weekday in ipairs(weekdays) do | ||
dayHeadingRow:tag('th'):wikitext(weekday) | dayHeadingRow:tag('th'):wikitext(weekday) | ||
| Baris 129: | Baris 129: | ||
:attr('colspan', '7') | :attr('colspan', '7') | ||
:wikitext(makeWikilink( | :wikitext(makeWikilink( | ||
'Portal: | 'Portal:Berita terkini/' .. monthAndYear, | ||
'Berita ' .. monthAndYear .. ' selengkapnya... ' | 'Berita ' .. monthAndYear .. ' selengkapnya... ' | ||
)) | )) | ||