diff --git a/components/filter_buttons/wikis/valorant/filter_buttons_config.lua b/components/filter_buttons/wikis/valorant/filter_buttons_config.lua new file mode 100644 index 00000000000..83114171107 --- /dev/null +++ b/components/filter_buttons/wikis/valorant/filter_buttons_config.lua @@ -0,0 +1,57 @@ +--- +-- @Liquipedia +-- wiki=valorant +-- 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, + expandKey = 'region', + }, + { + name = 'region', + property = 'region', + expandable = true, + items = { + 'Europe', 'North America', 'Korea', 'China', 'Japan', 'Latin America North', + 'Latin America South', 'Taiwan', 'Oceania', 'Brazil', 'Other', + }, + defaultItems = { 'Europe', 'North America', 'Korea', 'China', 'Brazil', 'Other' }, + transform = function(region) + local regionToShortName = { + ['Europe'] = 'eu', + ['North America'] = 'na', + ['Korea'] = 'kr', + ['China'] = 'ch', + ['Japan'] = 'jp', + ['Latin America North'] = 'latam n', + ['Latin America South'] = 'latam s', + ['Taiwan'] = 'tw', + ['Oceania'] = 'oce', + ['Brazil'] = 'br', + ['Other'] = 'other', + } + return regionToShortName[region] + end, + }, +} + +return Config diff --git a/components/main_page/wikis/valorant/main_page_layout_data.lua b/components/main_page/wikis/valorant/main_page_layout_data.lua new file mode 100644 index 00000000000..b2b8aab20b0 --- /dev/null +++ b/components/main_page/wikis/valorant/main_page_layout_data.lua @@ -0,0 +1,191 @@ +--- +-- @Liquipedia +-- wiki=valorant +-- page=Module:MainPageLayout/data +-- +-- Please see https://github.com/Liquipedia/Lua-Modules to contribute +-- + +local CONTENT = { + theGame = { + heading = 'The Game', + body = '{{Liquipedia:The Game}}', + padding = true, + boxid = 1503, + }, + transfers = { + heading = 'Transfers', + body = '{{Transfer List|limit=15}}
' .. + '
[[#Top|Back to top]]
' .. + '' .. + '
' .. + '[[Portal:Transfers|See more transfers]]' .. + '[[Transfer query]]
[[Special:RunQuery/Transfer|Input Form]][[Portal:Rumours|Rumours]]
', + boxid = 1509, + }, + specialEvents = { + noPanel = true, + body = '{{Liquipedia:Special Event}}', + }, + 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=21|completedDays=14}}', + padding = true, + boxid = 1508, + }, +} + +return { + banner = { + lightmode = 'VALORANT.svg', + darkmode = 'VALORANT-darkmode.svg', + }, + metadesc = 'The VALORANT esports wiki covering everything from players, teams and transfers, ' .. + 'to tournaments and results, to maps, weapons, and agents.', + title = 'VALORANT', + navigation = { + { + file = 'ShopifyRebellion VCT Game Changers Championship 2024.jpg', + title = 'Teams', + link = 'Portal:Teams', + count = { + method = 'LPDB', + table = 'team', + }, + }, + { + file = 'NTMR Infekted at OWCS 2024 Finals.jpg', + title = 'Transfers', + link = 'Portal:Transfers', + count = { + method = 'LPDB', + table = 'transfer', + }, + }, + { + file = 'Valorant-champions-trophy-2024-2.jpeg', + title = 'Tournaments', + link = 'Portal:Tournaments', + count = { + method = 'LPDB', + table = 'tournament', + }, + }, + { + file = 'Raze-lockin-2023.jpeg', + title = 'Agents', + link = 'Portal:Agents', + count = { + method = 'LPDB', + table = 'datapoint', + conditions = '[[type::hero]]', + }, + }, + { + file = 'Stalk3r OWCS Finals 2024.jpeg', + title = 'Players', + link = 'Portal:Players', + count = { + method = 'LPDB', + table = 'player', + }, + }, + { + file = 'Valorant-champions-seoul-2024.jpg', + title = 'Statistics', + link = 'Portal:Statistics', + }, + { + file = 'Sunset Map.png', + title = 'Maps', + link = 'Portal:Maps', + count = { + method = 'LPDB', + table = 'datapoint', + conditions = '[[type::map]]', + }, + }, + }, + layouts = { + main = { + { -- Left + size = 6, + children = { + { + mobileOrder = 2, + content = CONTENT.specialEvents, + }, + { + mobileOrder = 4, + content = CONTENT.transfers, + }, + { + mobileOrder = 7, + content = CONTENT.wantToHelp, + }, + } + }, + { -- Right + size = 6, + children = { + { + mobileOrder = 3, + children = { + { + children = { + { + noPanel = true, + content = CONTENT.filterButtons, + }, + }, + }, + { + size = 6, + children = { + { + noPanel = true, + content = CONTENT.matches, + }, + }, + }, + { + size = 6, + children = { + { + noPanel = true, + content = CONTENT.tournaments, + }, + }, + }, + }, + }, + }, + }, + { + children = { + { + mobileOrder = 8, + content = CONTENT.theGame, + }, + }, + }, + }, + }, +} diff --git a/stylesheets/commons/Banner.less b/stylesheets/commons/Banner.less index d2ff4e506fe..d79251f83f9 100644 --- a/stylesheets/commons/Banner.less +++ b/stylesheets/commons/Banner.less @@ -60,6 +60,12 @@ } } + .wiki-valorant & { + @media ( min-width: 768px ) { + background: url( https://liquipedia.net/commons/images/a/a6/Valorant-bg-2.png ) no-repeat center / cover; + } + } + @media ( min-width: 768px ) { box-shadow: 0 0.0625rem 0.25rem 0 rgba( 0, 0, 0, 0.12 ); height: 8.875rem;