Skip to content
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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
146 changes: 146 additions & 0 deletions components/main_page/wikis/deadlock/main_page_layout_data.lua
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">' ..
'&#91;[{{FULLURL:Player Transfers/{{CURRENTYEAR}}/{{CURRENTMONTHNAME}}|action=edit}} edit]&#93;</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;">&#8226;</span>' ..
'[[Transfer query]]<span style{{=}}"font-style:normal; padding:0 5px;">&#8226;</span>' ..
'[[lpcommons:Special:RunQuery/Transfer|Input Form]]' ..
'<span style="font-style:normal; padding:0 5px;">&#8226;</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 = {
Copy link
Collaborator

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

Copy link
Collaborator Author

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)

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,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider to assign more space to the right side and reduce this to e.g. 5, as otherwise (depending on the display resolution) there isn't really enough space for the tournaments list:
image
That one could also benefit of removed padding on it's panel.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mbergen Which panel specifically did you mean to have removed padding?

Copy link
Collaborator

Choose a reason for hiding this comment

The 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)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you mean 12 dividable by it ;)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Which panel specifically did you mean to have removed padding?

The tournaments list panel, the padding looks weird anyways since the header bars for upcoming/ongoing/concluded don't extend to the edge

Copy link
Collaborator

Choose a reason for hiding this comment

The 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)

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.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So I did look at it with removing the padding, however to me it then seems pretty off / fall out of the design. (Moreso noticeable on darkmode
image

children = {
{
mobileOrder = 1,
content = CONTENT.aboutEsport,
Copy link
Collaborator

Choose a reason for hiding this comment

The 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,
Copy link
Collaborator

Choose a reason for hiding this comment

The 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,
},
},
},
},
}
6 changes: 6 additions & 0 deletions stylesheets/commons/Banner.less
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@
position: relative;
border-radius: 0.5rem;

.wiki-deadlock & {
@media ( min-width: 768px ) {
background: url( https://liquipedia.net/images/8/8f/Deadlock_mainpage_banner.png ) no-repeat center / cover;
}
}

.wiki-dota2 & {
@media ( min-width: 768px ) {
background: url( https://liquipedia.net/commons/images/1/19/Bgdota2.jpg ) no-repeat center / cover;
Expand Down
Loading