-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Set up mainpage data layout Deadlock #5219
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,146 @@ | ||
--- | ||
-- @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, | ||
}, | ||
specialEvents = { | ||
noPanel = true, | ||
body = '{{Liquipedia:Special Event}}', | ||
}, | ||
filterButtons = { | ||
noPanel = true, | ||
body = '<div style{{=}}"width:100%;margin-bottom:8px;">' .. | ||
'{{#invoke:Lua|invoke|module=FilterButtons|fn=getFromConfig}}</div>', | ||
}, | ||
matches = { | ||
heading = 'Matches', | ||
body = '{{MainPageMatches}}<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=TournamentsList|fn=run|upcomingDays=120|' .. | ||
'completedDays=30|filterByTierTypes=true|useExternalFilters=true}}', | ||
padding = true, | ||
boxid = 1508, | ||
}, | ||
} | ||
|
||
return { | ||
main = { | ||
{ -- Left | ||
size = 6, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @mbergen Which panel specifically did you mean to have removed padding? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 5 doesn't work I think, has to be a number dividable by 12 (1, 2, 3, 4, 6, 12) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. you mean 12 dividable by it ;) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
The tournaments list panel, the padding looks weird anyways since the header bars for upcoming/ongoing/concluded don't extend to the edge There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Sure it does, you can choose any number between 1 and 12. You just have to see that the total of all columns you want in the row is less or equal to 12, as otherwise they are wrapped to another row. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
children = { | ||
{ | ||
mobileOrder = 1, | ||
content = CONTENT.aboutEsport, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This content doesn't seem to exist |
||
}, | ||
{ | ||
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, | ||
}, | ||
}, | ||
}, | ||
}, | ||
}, | ||
{ | ||
mobileOrder = 4, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There's two things with mobile order 4 |
||
content = CONTENT.thisDay, | ||
}, | ||
{ | ||
mobileOrder = 5, | ||
content = CONTENT.updates, | ||
}, | ||
{ | ||
mobileOrder = 6, | ||
content = CONTENT.usefulArticles, | ||
}, | ||
}, | ||
}, | ||
}, | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why no boxid on special events? Makes it non collaps-able
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Testing this live here; https://liquipedia.net/deadlock/Module:MainPageLayout/data Added a boxid but it doesn't seem to add a collapse to the special event box. (In this case special event is just the heroes)