diff --git a/components/filter_buttons/wikis/overwatch/filter_buttons_config.lua b/components/filter_buttons/wikis/overwatch/filter_buttons_config.lua new file mode 100644 index 0000000000..ddbd4b6f6e --- /dev/null +++ b/components/filter_buttons/wikis/overwatch/filter_buttons_config.lua @@ -0,0 +1,30 @@ +--- +-- @Liquipedia +-- wiki=overwatch +-- page=Module:FilterButtons/Config +-- +-- Please see https://github.com/Liquipedia/Lua-Modules to contribute +-- + +local Tier = require('Module:Tier/Utils') +local Config = {} + +---@type FilterButtonCategory[] +Config.categories = { + { + name = 'liquipediatier', + property = 'liquipediaTier', + load = function(category) + category.items = {} + for _, tier in Tier.iterate('tiers') do + table.insert(category.items, tier.value) + end + end, + defaultItems = {'1', '2', '3'}, + transform = function(tier) + return Tier.toName(tier) + end, + }, +} + +return Config diff --git a/components/main_page/wikis/overwatch/main_page_layout_data.lua b/components/main_page/wikis/overwatch/main_page_layout_data.lua new file mode 100644 index 0000000000..b7efc5a0e9 --- /dev/null +++ b/components/main_page/wikis/overwatch/main_page_layout_data.lua @@ -0,0 +1,204 @@ +--- +-- @Liquipedia +-- wiki=overwatch +-- page=Module:MainPageLayout/data +-- +-- Please see https://github.com/Liquipedia/Lua-Modules to contribute +-- + +local CONTENT = { + usefulArticles = { + heading = 'Useful Articles', + body = '{{Liquipedia:Useful Articles}}', + padding = true, + boxid = 1503, + }, + wantToHelp = { + heading = 'Want To Help?', + body = '{{Liquipedia:Want_to_help}}', + padding = true, + boxid = 1504, + }, + transfers = { + heading = 'Transfers', + body = '{{Transfer List|limit=15}}\n
' .. + '
[[#Top|Back to top]]
' .. + '' .. + '
' .. + '[[Portal:Transfers|See all Transfers]][[Transfer query]]
' .. + '•[[Special:RunQuery/Transfer|Transfer Generator]]' .. + '•[[Portal:Rumours|Rumours]]
', + boxid = 1509, + }, + thisDay = { + heading = 'This day in Overwatch ' .. + '({{#time:F}} {{Ordinal|{{#time:j}}}})', + body = '{{Liquipedia:This day}}', + padding = true, + boxid = 1510, + }, + specialEvents = { + noPanel = true, + body = '{{Liquipedia:Special Event}}', + boxid = 1511, + }, + filterButtons = { + noPanel = true, + body = '
' .. + '{{#invoke:Lua|invoke|module=FilterButtons|fn=getFromConfig}}
', + }, + matches = { + heading = 'Matches', + body = '{{#invoke:Lua|invoke|module=Widget/Factory|fn=fromTemplate|widget=Match/Ticker/Container}}' .. + '
' .. + '[[Liquipedia:Matches|See more matches]]
', + padding = true, + boxid = 1507, + }, + tournaments = { + heading = 'Tournaments', + body = '{{#invoke:Lua|invoke|module=Widget/Factory|fn=fromTemplate|widget=Tournaments/Ticker' .. + '|upcomingDays=120|completedDays=30}}', + boxid = 1508, + }, +} + +return { + banner = { + lightmode = 'Overwatch-logo-lightmode.svg', + darkmode = 'Overwatch-logo-darkmode.svg', + }, + metadesc = 'Comprehensive Overwatch wiki with articles covering everything from heroes, to tournaments, ' .. + 'to competitive players and teams.', + title = 'Overwatch', + navigation = { + { + file = 'Stalk3r OWCS Finals 2024.jpeg', + title = 'Players', + link = 'Portal:Players', + count = { + method = 'LPDB', + table = 'player', + }, + }, + { + file = 'Crazy Raccoon 2024 Esports World Cup Champions.jpg', + title = 'Teams', + link = 'Portal:Teams', + count = { + method = 'LPDB', + table = 'team', + }, + }, + { + file = 'Proper OWCS Finals.jpeg', + title = 'Transfers', + link = 'Portal:Transfers', + count = { + method = 'LPDB', + table = 'transfer', + }, + }, + { + file = 'OWCS Stockholm 2024 Trophy.jpg', + title = 'Tournaments', + link = 'Portal:Tournaments', + count = { + method = 'LPDB', + table = 'tournament', + }, + }, + { + file = 'Overwatch Heroes NavCard image.jpg', + title = 'Heroes', + link = 'Portal:Heroes', + count = { + method = 'LPDB', + table = 'datapoint', + conditions = '[[type::character]]', + }, + }, + { + file = 'Kings row map.jpg', + title = 'Maps', + link = 'Portal:Maps', + count = { + method = 'LPDB', + table = 'datapoint', + conditions = '[[type::map]]', + }, + }, + }, + layouts = { + main = { + { -- Left + size = 6, + children = { + { + mobileOrder = 1, + content = CONTENT.specialEvents, + }, + { + mobileOrder = 4, + content = CONTENT.transfers, + }, + { + mobileOrder = 8, + content = CONTENT.wantToHelp, + }, + } + }, + { -- Right + size = 6, + children = { + { + mobileOrder = 2, + children = { + { + children = { + { + noPanel = true, + content = CONTENT.filterButtons, + }, + }, + }, + { + size = 6, + children = { + { + noPanel = true, + content = CONTENT.matches, + }, + }, + }, + { + size = 6, + children = { + { + noPanel = true, + content = CONTENT.tournaments, + }, + }, + }, + }, + }, + { + mobileOrder = 6, + content = CONTENT.thisDay, + }, + }, + }, + { + children = { + { + mobileOrder = 7, + content = CONTENT.usefulArticles, + }, + }, + }, + }, + }, +} diff --git a/stylesheets/commons/Banner.less b/stylesheets/commons/Banner.less index 8b71d98aac..5803fb10ce 100644 --- a/stylesheets/commons/Banner.less +++ b/stylesheets/commons/Banner.less @@ -30,6 +30,12 @@ } } + .wiki-overwatch & { + @media ( min-width: 768px ) { + background: url( https://liquipedia.net/commons/images/0/0a/Overwatch-bg.png ) no-repeat center / cover; + } + } + .wiki-pubg & { @media ( min-width: 768px ) { background: url( https://liquipedia.net/commons/images/2/2d/PUBG_Banner_bg.jpg ) no-repeat center / cover;