-
Notifications
You must be signed in to change notification settings - Fork 72
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: new mainpage for deadlock (#5219)
* Set up mainpage data layout Deadlock * Update main_page_layout_data.lua * Add Deadlock banner * Update stylesheets/commons/Banner.less Co-authored-by: hjpalpha <[email protected]> * Updating deadlock mainmage module. Navigation cards (#5284) * Updating deadlock mainmage module. Navigation cards * Update components/main_page/wikis/deadlock/main_page_layout_data.lua * Update components/main_page/wikis/deadlock/main_page_layout_data.lua * Update components/main_page/wikis/deadlock/main_page_layout_data.lua * Update components/main_page/wikis/deadlock/main_page_layout_data.lua Agree. This change was made because of the active copy paste maniac Co-authored-by: Rikard Blixt <[email protected]> * Update components/main_page/wikis/deadlock/main_page_layout_data.lua --------- Co-authored-by: Rikard Blixt <[email protected]> * Update components/main_page/wikis/deadlock/main_page_layout_data.lua Co-authored-by: SlothyMan <[email protected]> * Update components/main_page/wikis/deadlock/main_page_layout_data.lua Co-authored-by: SlothyMan <[email protected]> * Update components/main_page/wikis/deadlock/main_page_layout_data.lua Co-authored-by: SlothyMan <[email protected]> * Update components/main_page/wikis/deadlock/main_page_layout_data.lua Co-authored-by: SlothyMan <[email protected]> * Update components/main_page/wikis/deadlock/main_page_layout_data.lua Co-authored-by: SlothyMan <[email protected]> * Update components/main_page/wikis/deadlock/main_page_layout_data.lua Co-authored-by: SlothyMan <[email protected]> * Update components/main_page/wikis/deadlock/main_page_layout_data.lua Co-authored-by: SlothyMan <[email protected]> * Update components/main_page/wikis/deadlock/main_page_layout_data.lua Co-authored-by: SlothyMan <[email protected]> * Update components/main_page/wikis/deadlock/main_page_layout_data.lua Co-authored-by: SlothyMan <[email protected]> * Update components/main_page/wikis/deadlock/main_page_layout_data.lua Co-authored-by: Rikard Blixt <[email protected]> * Update components/main_page/wikis/deadlock/main_page_layout_data.lua Co-authored-by: Rikard Blixt <[email protected]> * Create filter_buttons_config.lua * Update components/main_page/wikis/deadlock/main_page_layout_data.lua Co-authored-by: SlothyMan <[email protected]> * Update components/components/filter_buttons/wikis/deadlock/filter_buttons_config.lua Co-authored-by: SlothyMan <[email protected]> --------- Co-authored-by: hjpalpha <[email protected]> Co-authored-by: SlothyMan <[email protected]> Co-authored-by: Rikard Blixt <[email protected]>
- Loading branch information
1 parent
cf035a8
commit 11f30df
Showing
3 changed files
with
288 additions
and
0 deletions.
There are no files selected for viewing
44 changes: 44 additions & 0 deletions
44
components/components/filter_buttons/wikis/deadlock/filter_buttons_config.lua
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
--- | ||
-- @Liquipedia | ||
-- wiki=deadlock | ||
-- page=Module:FilterButtons/Config | ||
-- | ||
-- Please see https://github.com/Liquipedia/Lua-Modules to contribute | ||
-- | ||
|
||
local Tier = require('Module:Tier/Utils') | ||
local Config = {} | ||
|
||
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 = "liquipediatiertype", | ||
}, | ||
{ | ||
name = 'liquipediatiertype', | ||
property = 'liquipediaTierType', | ||
expandable = true, | ||
load = function(category) | ||
category.items = {} | ||
for _, tiertype in Tier.iterate('tierTypes') do | ||
table.insert(category.items, Tier.toIdentifier(tiertype.value)) | ||
end | ||
end, | ||
transform = function(tiertype) | ||
return select(2, Tier.toName(1, tiertype)) | ||
end, | ||
}, | ||
} | ||
|
||
return Config |
238 changes: 238 additions & 0 deletions
238
components/main_page/wikis/deadlock/main_page_layout_data.lua
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,238 @@ | ||
--- | ||
-- @Liquipedia | ||
-- wiki=deadlock | ||
-- page=Module:MainPageLayout/data | ||
-- | ||
-- Please see https://github.com/Liquipedia/Lua-Modules to contribute | ||
-- | ||
|
||
local CONTENT = { | ||
updates = { | ||
heading = 'Updates', | ||
body = '<nowiki>\n</nowiki>{{Main Page Updates}}', | ||
padding = true, | ||
boxid = 1502, | ||
}, | ||
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' .. | ||
'<div style{{=}}"display:block; text-align:center; padding:0.5em;">\n' .. | ||
'<div style{{=}}"display:inline; float:left; font-style:italic;">\'\'[[#Top|Back to top]]\'\'</div>\n' .. | ||
'<div style{{=}}"display:inline; float:right;" class="plainlinks smalledit">' .. | ||
'[[{{FULLURL:Player Transfers/{{CURRENTYEAR}}/{{CURRENTMONTHNAME}}|action=edit}} edit]]</div>\n' .. | ||
'<div style{{=}}"white-space:nowrap; display:inline; margin:0 10px font-size:15px; font-style:italic;">' .. | ||
'[[Portal:Transfers|See more transfers]]<span style="font-style:normal; padding:0 5px;">•</span>' .. | ||
'[[Transfer query]]<span style{{=}}"font-style:normal; padding:0 5px;">•</span>' .. | ||
'[[lpcommons:Special:RunQuery/Transfer|Input Form]]' .. | ||
'<span style="font-style:normal; padding:0 5px;">•</span>' .. | ||
'[[Portal:Rumours|Rumours]]</center></div>\n</div>', | ||
boxid = 1509, | ||
}, | ||
thisDay = { | ||
heading = 'This day in Deadlock <small id="this-day-date" style = "margin-left: 5px">' .. | ||
'({{#time:F}} {{Ordinal|{{#time:j}}}})</small>', | ||
body = '{{Liquipedia:This day}}', | ||
padding = true, | ||
boxid = 1510, | ||
}, | ||
heroes = { | ||
heading = 'Heroes', | ||
body = '{{Liquipedia:HeroTable}}', | ||
padding = true, | ||
boxid = 1501, | ||
|
||
}, | ||
filterButtons = { | ||
noPanel = true, | ||
body = '<div style{{=}}"width:100%;margin-bottom:8px;">' .. | ||
'{{#invoke:Lua|invoke|module=FilterButtons|fn=getFromConfig}}</div>', | ||
}, | ||
matches = { | ||
heading = 'Matches', | ||
body = '{{#invoke:Lua|invoke|module=Widget/Factory|fn=fromTemplate|widget=Match/Ticker/Container}}' .. | ||
'<div style{{=}}"white-space:nowrap; display: block; margin:0 10px; ' .. | ||
'font-size:15px; font-style:italic; text-align:center;">[[Liquipedia:Matches|See more matches]]</div>', | ||
padding = true, | ||
boxid = 1507, | ||
}, | ||
tournaments = { | ||
heading = 'Tournaments', | ||
body = '{{#invoke:Lua|invoke|module=Widget/Factory|fn=fromTemplate|widget=Tournaments/Ticker' .. | ||
'|upcomingDays=60|completedDays=20}}', | ||
padding = true, | ||
boxid = 1508, | ||
}, | ||
} | ||
|
||
return { | ||
banner = { | ||
lightmode = 'Deadlock full logo lightmode.svg', | ||
darkmode = 'Deadlock full logo darkmode.svg', | ||
}, | ||
metadesc = 'Comprehensive Deadlock wiki with articles covering everything from heroes and items, to strategies, ' .. | ||
'to tournaments, to competitive players, and teams.', | ||
title = 'The Deadlock Wiki', | ||
navigation = { | ||
{ | ||
file = 'Deadlock gameasset Patches allmode.png', | ||
title = 'Patches', | ||
link = 'Portal:Patches', | ||
count = { | ||
method = 'LPDB', | ||
table = 'datapoint', | ||
conditions = '[[type::patch]]', | ||
}, | ||
}, | ||
{ | ||
file = 'Deadlock gameasset Art Hero Seven allmode.png', | ||
title = 'Heroes', | ||
link = 'Portal:Heroes', | ||
count = { | ||
method = 'LPDB', | ||
table = 'datapoint', | ||
conditions = '[[type::character]]', | ||
}, | ||
}, | ||
{ | ||
file = 'Deadlock gameasset The Curiosity Shop allmode.png', | ||
title = 'Items', | ||
link = 'Portal:Items', | ||
count = { | ||
method = 'LPDB', | ||
table = 'datapoint', | ||
conditions = '[[type::item]]', | ||
}, | ||
}, | ||
{ | ||
file = 'Deadlock gameasset Mechanics allmode.png', | ||
title = 'Mechanics', | ||
link = 'Mechanics', | ||
count = { | ||
method = 'CATEGORY', | ||
category = 'Mechanics', | ||
}, | ||
}, | ||
{ | ||
file = 'Hammer Trophy of the Six Invitational 2020.jpg', | ||
title = 'Tournaments', | ||
link = 'Portal:Tournaments', | ||
count = { | ||
method = 'LPDB', | ||
table = 'tournament', | ||
}, | ||
}, | ||
{ | ||
file = 'Team_Spirit_win_The_International_2023.jpg', | ||
title = 'Teams', | ||
link = 'Portal:Teams', | ||
count = { | ||
method = 'LPDB', | ||
table = 'team', | ||
}, | ||
}, | ||
{ | ||
file = 'Aurora Sunset at the ALGS London Split 2 Playoffs 2023.jpg', | ||
title = 'Players', | ||
link = 'Portal:Players', | ||
count = { | ||
method = 'LPDB', | ||
table = 'player', | ||
}, | ||
}, | ||
{ | ||
file = 'Hardecki at the ALGS Stockholm Playoffs.jpg', | ||
title = 'Transfers', | ||
link = 'Portal:Transfers', | ||
count = { | ||
method = 'LPDB', | ||
table = 'transfer', | ||
}, | ||
}, | ||
{ | ||
file = 'NRG hodsic at the ALGS Mannheim Split 2 Playoffs.jpg', | ||
title = 'Statistics', | ||
link = 'Portal:Statistics', | ||
}, | ||
}, | ||
layouts = { | ||
main = { | ||
{ -- Left | ||
size = 6, | ||
children = { | ||
{ | ||
mobileOrder = 1, | ||
content = CONTENT.heroes, | ||
}, | ||
{ | ||
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, | ||
}, | ||
{ | ||
mobileOrder = 5, | ||
content = CONTENT.updates, | ||
}, | ||
{ | ||
mobileOrder = 7, | ||
content = CONTENT.usefulArticles, | ||
}, | ||
}, | ||
}, | ||
}, | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters