Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Documentation for this module may be created at Module:SkillPage/doc

local p = {}

function p.render(frame)
    local args = frame:getParent().args
    local title = args.title or mw.title.getCurrentTitle().text
    local capability = args.capability or ''

    local html = mw.html.create('div')
        :addClass('skill-infobox')
        :css('border', '1px solid #bbdefb')
        :css('border-radius', '8px')
        :css('padding', '16px')
        :css('margin-bottom', '16px')
        :css('background', '#e3f2fd')

    html:tag('div')
        :css('display', 'flex')
        :css('justify-content', 'space-between')
        :css('align-items', 'center')
        :css('margin-bottom', '12px')
        :tag('h2'):css('margin', '0'):wikitext(title):done()
        :tag('span')
            :css('background', '#2196f3')
            :css('color', 'white')
            :css('padding', '2px 8px')
            :css('border-radius', '4px')
            :css('font-size', '0.85em')
            :wikitext('SKILL')

    if capability ~= '' then
        html:tag('div')
            :css('font-style', 'italic')
            :css('margin-bottom', '8px')
            :wikitext(capability)
    end

    local categoryText = '[[Category:Skills]]'
    return tostring(html) .. categoryText
end

return p