Module:Main page: Difference between revisions

From MB Wiki
Jump to navigation Jump to search
No edit summary
Tag: Reverted
No edit summary
Tag: Reverted
Line 10: Line 10:
         :css{
         :css{
             ['text-align'] = 'center',
             ['text-align'] = 'center',
             ['background'] = 'linear-gradient(135deg, #2a2a2a, #1e1e1e)',
             ['background'] = 'linear-gradient(135deg, #452f1d, #cf6304)',
             ['padding'] = '25px',
             ['padding'] = '15px',
             ['color'] = 'white',
             ['color'] = 'brown',
             ['border-radius'] = '10px',
             ['border-radius'] = '10px',
             ['margin-bottom'] = '20px'
             ['margin-bottom'] = '20px'
Line 46: Line 46:
             :addClass('mainpage-link')
             :addClass('mainpage-link')
             :css{
             :css{
                 ['background'] = '#f3f3f3',
                 ['background'] = '#c48151',
                 ['border'] = '1px solid #ccc',
                 ['border'] = '1px solid #ccc',
                 ['border-radius'] = '8px',
                 ['border-radius'] = '8px',

Revision as of 04:08, 13 November 2025

Welcome to the Mana Break Wiki!
A community-maintained database for everything related to Mana Break, including heroes, items, PvP guides, and more.

Latest News

  • [November 2025] Mana Break global launch event is live!
  • New heroes available in the banner: Aldra and Rhea.
  • Join the PvP Tournament to earn exclusive skins!

local p = {}

-- Fungsi utama yang dipanggil dari {{#invoke:Main_page|show}}
function p.show(frame)
    local html = mw.html.create()

    -- === Hero banner / header ===
    html:tag('div')
        :addClass('mainpage-header')
        :css{
            ['text-align'] = 'center',
            ['background'] = 'linear-gradient(135deg, #452f1d, #cf6304)',
            ['padding'] = '15px',
            ['color'] = 'brown',
            ['border-radius'] = '10px',
            ['margin-bottom'] = '20px'
        }
        :wikitext("'''" .. "Welcome to the '''''Mana Break Wiki!'''''")
        :tag('div')
            :css('font-size', '90%')
            :wikitext("A community-maintained database for everything related to '''Mana Break''', including heroes, items, PvP guides, and more.")
            :done()
        :done()

    -- === Quick navigation section ===
    local nav = html:tag('div')
        :addClass('mainpage-nav')
        :css{
            ['display'] = 'flex',
            ['justify-content'] = 'space-around',
            ['flex-wrap'] = 'wrap',
            ['gap'] = '10px',
            ['margin'] = '10px 0'
        }

    local links = {
        {text = "Heroes", url = "https://mbwiki.stairwaygames.work/wiki/Heroes"},
        {text = "Items", url = "https://mbwiki.stairwaygames.work/wiki/Items"},
        {text = "Game Modes", url = "https://mbwiki.stairwaygames.work/wiki/Game_Modes"},
        {text = "PvP Guide", url = "https://mbwiki.stairwaygames.work/wiki/PvP_Guide"},
        {text = "Latest Updates", url = "https://mbwiki.stairwaygames.work/wiki/Updates"}
    }

    for _, link in ipairs(links) do
        nav:tag('div')
            :addClass('mainpage-link')
            :css{
                ['background'] = '#c48151',
                ['border'] = '1px solid #ccc',
                ['border-radius'] = '8px',
                ['padding'] = '10px 15px',
                ['min-width'] = '120px',
                ['text-align'] = 'center',
                ['font-weight'] = 'bold'
            }
            :tag('a')
                :attr('href', link.url)
                :css('color', '#2a2a2a')
                :wikitext(link.text)
                :done()
            :done()
    end

    -- === News section ===
    html:tag('div')
        :addClass('mainpage-news')
        :css{
            ['margin-top'] = '25px',
            ['background'] = '#f9f9f9',
            ['border'] = '1px solid #ccc',
            ['border-radius'] = '8px',
            ['padding'] = '10px'
        }
        :tag('h2'):wikitext("Latest News"):done()
        :tag('ul')
            :tag('li'):wikitext("'''[November 2025]''' Mana Break global launch event is live!"):done()
            :tag('li'):wikitext("New heroes available in the banner: ''Aldra'' and ''Rhea''."):done()
            :tag('li'):wikitext("Join the PvP Tournament to earn exclusive skins!"):done()
            :done()
        :done()

    -- === Footer ===
    html:tag('div')
        :addClass('mainpage-footer')
        :css{
            ['text-align'] = 'center',
            ['font-size'] = '90%',
            ['color'] = '#666',
            ['margin-top'] = '20px'
        }
        :wikitext("Mana Break Wiki is a community project — contributions are welcome!")

    return tostring(html)
end

return p