Module:Mainpage/Progress: Difference between revisions
From Paracosm
More actions
mNo edit summary |
mNo edit summary |
||
| Line 20: | Line 20: | ||
pad:tag("div"):addClass("home-feat__title"):wikitext(cfg.section('progress').book) | pad:tag("div"):addClass("home-feat__title"):wikitext(cfg.section('progress').book) | ||
pad:tag("div"):addClass('home-patch__list'):wikitext(cfg.section('progress').chapter) | |||
pad:tag("div"):addClass('home-patch__list'):wikitext(cfg.section('progress').wordCount) | |||
return tostring(card) | return tostring(card) | ||
Revision as of 16:28, 11 November 2026
Documentation for this module may be created at Module:Mainpage/Progress/doc
require('strict')
local cfg = require('Module:Mainpage/Config')
local p = {}
function p.render()
local card = mw.html.create('div'):addClass('t-card'):addClass('home-card--aside')
-- The scroll fade's frame; the attribute names its scroller. See
-- Module:Mainpage/cards.css for why the two are different elements.
local pad = card:tag('div')
:addClass('home-pad')
:addClass('home-patch')
:addClass('home-scrollfade')
:attr('data-gadget-mainpage-scrollfade', '.home-patch__list')
pad:tag('div'):addClass('home-kicker'):wikitext("Book Progress")
pad:tag("div"):addClass("home-feat__title"):wikitext(cfg.section('progress').book)
pad:tag("div"):addClass('home-patch__list'):wikitext(cfg.section('progress').chapter)
pad:tag("div"):addClass('home-patch__list'):wikitext(cfg.section('progress').wordCount)
return tostring(card)
end
return p