diff --git a/components/match2/commons/match_group_display_helper.lua b/components/match2/commons/match_group_display_helper.lua index c82f4aaf903..062d2baeb90 100644 --- a/components/match2/commons/match_group_display_helper.lua +++ b/components/match2/commons/match_group_display_helper.lua @@ -190,7 +190,7 @@ function DisplayHelper.DefaultMatchSummaryContainer(props) end ---@param props table ----@return Html +---@return Widget function DisplayHelper.DefaultMatchPageContainer(props) local MatchPageModule = Lua.import('Module:MatchPage') diff --git a/components/match2/wikis/dota2/match_page.lua b/components/match2/wikis/dota2/match_page.lua index 6936ae4efdc..bc7eeae8971 100644 --- a/components/match2/wikis/dota2/match_page.lua +++ b/components/match2/wikis/dota2/match_page.lua @@ -22,6 +22,10 @@ local DisplayHelper = Lua.import('Module:MatchGroup/Display/Helper') local MatchGroupUtil = Lua.import('Module:MatchGroup/Util') local Display = Lua.import('Module:MatchPage/Template') +local HtmlWidgets = Lua.import('Module:Widget/Html/All') +local Div = HtmlWidgets.Div +local MatchPageWidgets = Lua.import('Module:Widget/Match/Page/All') + local MatchPage = {} local NO_CHARACTER = 'default' @@ -50,20 +54,13 @@ end ---@field seriesDots string[] ---@param props {match: MatchGroupUtilMatch} ----@return Html +---@return Widget function MatchPage.getByMatchId(props) ---@class Dota2MatchPageViewModel: MatchGroupUtilMatch ---@field games Dota2MatchPageViewModelGame[] ---@field opponents Dota2MatchPageViewModelOpponent[] local viewModel = props.match - viewModel.isBestOfOne = #viewModel.games == 1 - viewModel.dateCountdown = viewModel.timestamp ~= DateExt.defaultTimestamp and - DisplayHelper.MatchCountdownBlock(viewModel) or nil - - local phase = MatchGroupUtil.computeMatchPhase(props.match) - viewModel.statusText = phase == 'ongoing' and 'live' or phase - local function makeItemDisplay(item) if String.isEmpty(item.name) then return '[[File:EmptyIcon itemicon dota2 gameasset.png|64px|Empty|link=]]' @@ -121,45 +118,7 @@ function MatchPage.getByMatchId(props) end) -- Add more opponent data field - Array.forEach(viewModel.opponents, function(opponent, index) - opponent.opponentIndex = index - - local teamTemplate = opponent.template and mw.ext.TeamTemplate.raw(opponent.template) - if not teamTemplate then - return - end - - opponent.iconDisplay = mw.ext.TeamTemplate.teamicon(opponent.template) - opponent.shortname = teamTemplate.shortname - opponent.page = teamTemplate.page - opponent.name = teamTemplate.name - - opponent.seriesDots = Array.map(viewModel.games, function(game) - return game.teams[index].scoreDisplay - end) - end) - - viewModel.vods = Array.map(viewModel.games, function(game, gameIdx) - return game.vod and VodLink.display{ - gamenum = gameIdx, - vod = game.vod, - } or '' - end) - -- Create an object array for links - local function processLink(site, link) - return Table.mergeInto({link = link}, MatchLinks[site]) - end - - viewModel.links = Array.flatMap(Table.entries(viewModel.links), function(linkData) - local site, link = unpack(linkData) - if type(link) == 'table' then - return Array.map(link, function(sublink) - return processLink(site, sublink) - end) - end - return {processLink(site, link)} - end) viewModel.heroIcon = function(c) local character = c @@ -176,7 +135,13 @@ function MatchPage.getByMatchId(props) local displayTitle = MatchPage.makeDisplayTitle(viewModel) mw.getCurrentFrame():preprocess(table.concat{'{{DISPLAYTITLE:', displayTitle, '}}'}) - return MatchPage.render(viewModel) + return Div{ + children = { + MatchPage.header(viewModel), + MatchPage.games(viewModel), + MatchPage.footer(viewModel) + } + } end ---@param viewModel table @@ -214,18 +179,36 @@ function MatchPage._abbreviateNumber(number) end ---@param model table ----@return Html -function MatchPage.render(model) - return mw.html.create('div') - :wikitext(MatchPage.header(model)) - :node(MatchPage.games(model)) - :wikitext(MatchPage.footer(model)) -end - ----@param model table ----@return string +---@return Widget function MatchPage.header(model) - return TemplateEngine():render(Display.header, model) + local phase = MatchGroupUtil.computeMatchPhase(model) + local phaseDisplay = phase == 'ongoing' and 'live' or phase + + local opponents = Array.map(model.opponents, function(opponent, index) + local teamTemplate = opponent.template and mw.ext.TeamTemplate.raw(opponent.template) + if not teamTemplate then + return {} + end + + return { + icon = mw.ext.TeamTemplate.teamicon(opponent.template), + name = teamTemplate.name, + shortname = teamTemplate.shortname, + page = teamTemplate.page, + seriesDots = Array.map(model.games, function(game) + return game.teams[index].scoreDisplay + end), + } + end) + + return MatchPageWidgets.header{ + opponents = opponents, + matchPhase = phaseDisplay, + parent = model.parent, + tournament = model.tournament, + dateCountdown = model.timestamp ~= DateExt.defaultTimestamp and DisplayHelper.MatchCountdownBlock(model) or nil, + mvp = model.extradata.mvp, + } end ---@param model table @@ -234,7 +217,7 @@ function MatchPage.games(model) local games = Array.map(Array.filter(model.games, function(game) return game.resultType ~= NOT_PLAYED end), function(game) - return TemplateEngine():render(Display.game, Table.merge(model, game)) + return tostring(MatchPageWidgets.game(game)) .. TemplateEngine():render(Display.game, Table.merge(model, game)) end) if #games < 2 then @@ -256,9 +239,35 @@ function MatchPage.games(model) end ---@param model table ----@return string +---@return Widget function MatchPage.footer(model) - return TemplateEngine():render(Display.footer, model) + local vods = Array.map(model.games, function(game, gameIdx) + return game.vod and VodLink.display{ + gamenum = gameIdx, + vod = game.vod, + } or '' + end) + + -- Create an object array for links + local function processLink(site, link) + return Table.mergeInto({link = link}, MatchLinks[site]) + end + + local links = Array.flatMap(Table.entries(model.links), function(linkData) + local site, link = unpack(linkData) + if type(link) == 'table' then + return Array.map(link, function(sublink) + return processLink(site, sublink) + end) + end + return {processLink(site, link)} + end) + + return MatchPageWidgets.footer{ + vods = vods, + links = links, + patch = model.patch, + } end return MatchPage diff --git a/components/match2/wikis/dota2/match_page_template.lua b/components/match2/wikis/dota2/match_page_template.lua index c66146b9614..39fac83eda6 100644 --- a/components/match2/wikis/dota2/match_page_template.lua +++ b/components/match2/wikis/dota2/match_page_template.lua @@ -11,87 +11,8 @@ -- luacheck: ignore return { - header = - [=[ -
-
[[File:DataProvidedSAP.svg|link=]]
-
-
{{#opponents.1}}{{&iconDisplay}}
{{#page}}[[{{page}}|{{name}}]]{{/page}}
[[{{page}}|{{shortname}}]]
{{#seriesDots}}
{{/seriesDots}}
{{/opponents.1}}
-
{{#isBestOfOne}}{{#games.1.apiInfo}}{{team1.scoreDisplay}}–{{team2.scoreDisplay}}{{/games.1.apiInfo}}{{/isBestOfOne}}{{^isBestOfOne}}{{opponents.1.score}}–{{opponents.2.score}}{{/isBestOfOne}}
{{statusText}}
-
{{#opponents.2}}{{&iconDisplay}}
{{#page}}[[{{page}}|{{name}}]]{{/page}}
[[{{page}}|{{shortname}}]]
{{#seriesDots}}
{{/seriesDots}}
{{/opponents.2}}
-
-
[[{{parent}}|{{tournament}}]]
-
{{&dateCountdown}}
-
- {{#extradata.mvp}}
MVP{{#players}} [[{{name}}|{{displayname}}]]{{/players}}
{{/extradata.mvp}} - ]=], - footer = - [=[ -

Additional Information

-
- {{#vods.1}} -
-
VODs
-
{{#vods}}{{&.}}{{/vods}}
-
{{/vods.1}}{{#links.1}} -
-
Socials
-
{{#links}}[[{{icon}}|link={{link}}|15px|{{text}}]]{{/links}}
-
{{/links.1}}{{#patch}} -
-
Patch
-
[[Version {{patch}}]]
-
- {{/patch}} -
- ]=], game = [=[ -

Draft

-
-
-
{{&opponents.1.iconDisplay}}
-
-
- {{#teams.1.picks}} -
-
{{&heroIcon}}
-
#{{vetoNumber}}
-
- {{/teams.1.picks}} -
-
- {{#teams.1.bans}} -
-
{{&heroIcon}}
-
#{{vetoNumber}}
-
- {{/teams.1.bans}} -
-
-
-
-
{{&opponents.2.iconDisplay}}
-
-
- {{#teams.2.picks}} -
-
{{&heroIcon}}
-
#{{vetoNumber}}
-
- {{/teams.2.picks}} -
-
- {{#teams.2.bans}} -
-
{{&heroIcon}}
-
#{{vetoNumber}}
-
- {{/teams.2.bans}} -
-
-
-

Team Stats

diff --git a/components/widget/html/widget_html_all.lua b/components/widget/html/widget_html_all.lua index 32a076255fd..bfa286ef237 100644 --- a/components/widget/html/widget_html_all.lua +++ b/components/widget/html/widget_html_all.lua @@ -13,6 +13,7 @@ local Lua = require('Module:Lua') Widgets.Abbr = Lua.import('Module:Widget/Html/Abbr') Widgets.Div = Lua.import('Module:Widget/Html/Div') Widgets.Fragment = Lua.import('Module:Widget/Html/Fragment') +Widgets.Header = Lua.import('Module:Widget/Html/Header') Widgets.Li = Lua.import('Module:Widget/Html/Li') Widgets.Span = Lua.import('Module:Widget/Html/Span') Widgets.Table = Lua.import('Module:Widget/Html/Table') diff --git a/components/widget/html/widget_html_header.lua b/components/widget/html/widget_html_header.lua new file mode 100644 index 00000000000..44e4cf986ba --- /dev/null +++ b/components/widget/html/widget_html_header.lua @@ -0,0 +1,26 @@ +--- +-- @Liquipedia +-- wiki=commons +-- page=Module:Widget/Html/Header +-- +-- Please see https://github.com/Liquipedia/Lua-Modules to contribute +-- + +local Class = require('Module:Class') +local Lua = require('Module:Lua') + +local WidgetHtml = Lua.import('Module:Widget/Html/Base') + +---@class WidgetHeader: WidgetHtmlBase +---@operator call(table): WidgetHeader +local Header = Class.new(WidgetHtml) + +---@return Html +function Header:render() + if not self.props.level then + error('Header level not provided') + end + return self:renderAs('h' .. self.props.level) +end + +return Header diff --git a/components/widget/match/page/widget_match_page_footer.lua b/components/widget/match/page/widget_match_page_footer.lua new file mode 100644 index 00000000000..2f4a536fdb7 --- /dev/null +++ b/components/widget/match/page/widget_match_page_footer.lua @@ -0,0 +1,46 @@ +--- +-- @Liquipedia +-- wiki=commons +-- page=Module:Widget/Match/Page/Header +-- +-- Please see https://github.com/Liquipedia/Lua-Modules to contribute +-- + +local Array = require('Module:Array') +local Class = require('Module:Class') +local Lua = require('Module:Lua') + +local Widget = Lua.import('Module:Widget') +local WidgetUtil = Lua.import('Module:Widget/Util') +local HtmlWidgets = Lua.import('Module:Widget/Html/All') +local Div, Fragment, Header = HtmlWidgets.Div, HtmlWidgets.Fragment, HtmlWidgets.Header +local Link = Lua.import('Module:Widget/Basic/Link') +local MatchPageFooterSection = Lua.import('Module:Widget/Match/Page/Footer/Section') + +---@class MatchPageFooter: Widget +---@operator call(table): MatchPageFooter +local MatchPageFooter = Class.new(Widget) +MatchPageFooter.defaultProps = { + flipped = false, +} + +---@return Widget[]? +function MatchPageFooter:render() + return Fragment{children = { + Header{level = 3, children = 'Additional Information'}, + Div{ + classes = {'match-bm-match-additional'}, + children = WidgetUtil.collect( + self.props.vods and MatchPageFooterSection{header = 'VODs', children = self.props.vods} or nil, + self.props.links and MatchPageFooterSection{header = 'Socials', children = Array.map(self.props.links, function(link) + return '[['.. link.icon .. '|link='.. link.link .. '|15px|'.. link.text .. ']]' + end)} or nil, + self.props.patch and MatchPageFooterSection{header = 'Patch', children = + Link{link = 'Version ' .. self.props.patch, children = 'Version ' .. self.props.patch} + } or nil + ) + } + }} +end + +return MatchPageFooter diff --git a/components/widget/match/page/widget_match_page_footer_section.lua b/components/widget/match/page/widget_match_page_footer_section.lua new file mode 100644 index 00000000000..3bedb0066af --- /dev/null +++ b/components/widget/match/page/widget_match_page_footer_section.lua @@ -0,0 +1,33 @@ +--- +-- @Liquipedia +-- wiki=commons +-- page=Module:Widget/Match/Page/Footer/Section +-- +-- Please see https://github.com/Liquipedia/Lua-Modules to contribute +-- + +local Array = require('Module:Array') +local Class = require('Module:Class') +local Lua = require('Module:Lua') + +local Widget = Lua.import('Module:Widget') +local HtmlWidgets = Lua.import('Module:Widget/Html/All') +local Div = HtmlWidgets.Div +local Link = Lua.import('Module:Widget/Basic/Link') + +---@class MatchPageFooterSection: Widget +---@operator call(table): MatchPageFooterSection +local MatchPageFooterSection = Class.new(Widget) + +---@return Widget[]? +function MatchPageFooterSection:render() + return Div{ + classes = {'match-bm-match-additional-section'}, + children = { + Div{classes = {'match-bm-match-additional-section-header'}, children = self.props.header}, + Div{classes = {'match-bm-match-additional-section-body'}, children = self.props.children}, + } + } +end + +return MatchPageFooterSection diff --git a/components/widget/match/page/widget_match_page_game.lua b/components/widget/match/page/widget_match_page_game.lua new file mode 100644 index 00000000000..7e61baa097c --- /dev/null +++ b/components/widget/match/page/widget_match_page_game.lua @@ -0,0 +1,69 @@ +--- +-- @Liquipedia +-- wiki=commons +-- page=Module:Widget/Match/Page/Game +-- +-- Please see https://github.com/Liquipedia/Lua-Modules to contribute +-- + +local Array = require('Module:Array') +local Class = require('Module:Class') +local Lua = require('Module:Lua') + +local Widget = Lua.import('Module:Widget') +local HtmlWidgets = Lua.import('Module:Widget/Html/All') +local Div = HtmlWidgets.Div +local Link = Lua.import('Module:Widget/Basic/Link') +local HeaderOpponent = Lua.import('Module:Widget/Match/Page/Header/Opponent') + +---@class MatchPageGame: Widget +---@operator call(table): MatchPageGame +local MatchPageGame = Class.new(Widget) + +---@return Widget +function MatchPageGame:render() + return Div{ + classes = {'match-bm-lol-match-header'}, + children = { + Div{ + classes = {'match-bm-match-header-powered-by'}, + children = {'[[File:DataProvidedSAP.svg|link=]]'}, + }, + Div{ + classes = {'match-bm-lol-match-header-overview'}, + children = { + HeaderOpponent{self.props.opponents[1]}, + Div{ + classes = {'match-bm-match-header-result'}, + children = { + self.props.opponents[1].score, + '–', + self.props.opponents[2].score, + Div{ + classes = {'match-bm-match-header-result-text'}, + children = {self.props.matchPhase}, + }, + }, + }, + HeaderOpponent{self.props.opponents[2]}, + }, + }, + Div{ + classes = {'match-bm-lol-match-header-tournament'}, + children = {Link{link = self.props.parent, children = self.props.tournament}}, + }, + Div{ + classes = {'match-bm-lol-match-header-date'}, + children = {self.props.dateCountdown}, + }, + Div{ + classes = {'match-bm-lol-match-mvp'}, + children = {'MVP', Array.map(self.props.mvp.players, function(player) + return Link{link = player.name, children = player.displayname} + end)}, + }, + }, + } +end + +return MatchPageGame diff --git a/components/widget/match/page/widget_match_page_game_draft.lua b/components/widget/match/page/widget_match_page_game_draft.lua new file mode 100644 index 00000000000..be50c7605bf --- /dev/null +++ b/components/widget/match/page/widget_match_page_game_draft.lua @@ -0,0 +1,79 @@ +--- +-- @Liquipedia +-- wiki=commons +-- page=Module:Widget/Match/Page/Game/Draft +-- +-- Please see https://github.com/Liquipedia/Lua-Modules to contribute +-- + +local Class = require('Module:Class') +local Lua = require('Module:Lua') + +local Widget = Lua.import('Module:Widget') +local HtmlWidgets = Lua.import('Module:Widget/Html/All') +local Div, Fragment, Header = HtmlWidgets.Div, HtmlWidgets.Fragment, HtmlWidgets.Header +local MatchPageHeaderGameDraftCharacters = Lua.import('Module:Widget/Match/Page/Game/Draft/Characters') + +---@class MatchPageHeaderGameDraft: Widget +---@operator call(table): MatchPageHeaderGameDraft +local MatchPageHeaderGameDraft = Class.new(Widget) + +---@return Widget +function MatchPageHeaderGameDraft:render() + return Fragment{children = { + Header{level = 3, children = 'Draft'}, + Div{ + classes = {'match-bm-game-veto-wrapper'}, + children = { + Div{ + classes = {'match-bm-lol-game-veto-overview-team'}, + children = { + Div{ + classes = {'match-bm-game-veto-overview-team-header'}, + children = {self.props.opponents[1].icon}, + }, + Div{ + classes = {'match-bm-game-veto-overview-team-veto'}, + children = { + MatchPageHeaderGameDraftCharacters{ + characters = self.props.opponents[1].picks, + isBan = false, + side = self.props.opponents[1].side, + }, + MatchPageHeaderGameDraftCharacters{ + characters = self.props.opponents[1].bans, + isBan = true, + }, + }, + }, + }, + }, + Div{ + classes = {'match-bm-lol-game-veto-overview-team'}, + children = { + Div{ + classes = {'match-bm-game-veto-overview-team-header'}, + children = {self.props.opponents[2].icon}, + }, + Div{ + classes = {'match-bm-game-veto-overview-team-veto'}, + children = { + MatchPageHeaderGameDraftCharacters{ + characters = self.props.opponents[2].picks, + isBan = false, + side = self.props.opponents[2].side, + }, + MatchPageHeaderGameDraftCharacters{ + characters = self.props.opponents[2].bans, + isBan = true, + }, + }, + }, + }, + } + } + } + }} +end + +return MatchPageHeaderGameDraft diff --git a/components/widget/match/page/widget_match_page_game_draft_characters.lua b/components/widget/match/page/widget_match_page_game_draft_characters.lua new file mode 100644 index 00000000000..46dcc6bb5b4 --- /dev/null +++ b/components/widget/match/page/widget_match_page_game_draft_characters.lua @@ -0,0 +1,55 @@ +--- +-- @Liquipedia +-- wiki=commons +-- page=Module:Widget/Match/Page/Game/Draft +-- +-- Please see https://github.com/Liquipedia/Lua-Modules to contribute +-- + +local Array = require('Module:Array') +local Class = require('Module:Class') +local Lua = require('Module:Lua') + +local Widget = Lua.import('Module:Widget') +local HtmlWidgets = Lua.import('Module:Widget/Html/All') +local Div = HtmlWidgets.Div +local Link = Lua.import('Module:Widget/Basic/Link') + +---@class MatchPageHeaderGameDraftCharacters: Widget +---@operator call(table): MatchPageHeaderGameDraftCharacters +local MatchPageHeaderGameDraftCharacters = Class.new(Widget) +MatchPageHeaderGameDraftCharacters.defaultProps = { + isBan = false, + side = '', +} + +---@return Widget? +function MatchPageHeaderGameDraftCharacters:render() + if not self.props.characters then + return nil + end + local label = self.props.isBan and 'bans' or 'picks' + local side = self.props.isBan and 'ban' or self.props.side + + return Div{ + classes = {'match-bm-game-veto-overview-team-veto-row', 'match-bm-game-veto-overview-team-veto-row--' .. side}, + attributes = {['aria-labelledby'] = label}, + children = Array.map(self.props.characters, function(character) + return Div{ + classes = {'match-bm-game-veto-overview-team-veto-row-item'}, + children = { + Div{ + classes = {'match-bm-game-veto-overview-team-veto-row-item-icon'}, + children = {character.heroIcon}, + }, + Div{ + classes = {'match-bm-game-veto-overview-team-veto-row-item-text'}, + children = {'#' .. character.vetoNumber}, + }, + }, + } + end), + } +end + +return MatchPageHeaderGameDraftCharacters diff --git a/components/widget/match/page/widget_match_page_header.lua b/components/widget/match/page/widget_match_page_header.lua new file mode 100644 index 00000000000..6dff1e70401 --- /dev/null +++ b/components/widget/match/page/widget_match_page_header.lua @@ -0,0 +1,69 @@ +--- +-- @Liquipedia +-- wiki=commons +-- page=Module:Widget/Match/Page/Header +-- +-- Please see https://github.com/Liquipedia/Lua-Modules to contribute +-- + +local Array = require('Module:Array') +local Class = require('Module:Class') +local Lua = require('Module:Lua') + +local Widget = Lua.import('Module:Widget') +local HtmlWidgets = Lua.import('Module:Widget/Html/All') +local Div = HtmlWidgets.Div +local Link = Lua.import('Module:Widget/Basic/Link') +local HeaderOpponent = Lua.import('Module:Widget/Match/Page/Header/Opponent') + +---@class MatchPageHeader: Widget +---@operator call(table): MatchPageHeader +local MatchPageHeader = Class.new(Widget) + +---@return Widget[]? +function MatchPageHeader:render() + return Div{ + classes = {'match-bm-lol-match-header'}, + children = { + Div{ + classes = {'match-bm-match-header-powered-by'}, + children = {'[[File:DataProvidedSAP.svg|link=]]'}, + }, + Div{ + classes = {'match-bm-lol-match-header-overview'}, + children = { + HeaderOpponent{self.props.opponents[1]}, + Div{ + classes = {'match-bm-match-header-result'}, + children = { + self.props.opponents[1].score, + '–', + self.props.opponents[2].score, + Div{ + classes = {'match-bm-match-header-result-text'}, + children = {self.props.matchPhase}, + }, + }, + }, + HeaderOpponent{self.props.opponents[2]}, + }, + }, + Div{ + classes = {'match-bm-lol-match-header-tournament'}, + children = {Link{link = self.props.parent, children = self.props.tournament}}, + }, + Div{ + classes = {'match-bm-lol-match-header-date'}, + children = {self.props.dateCountdown}, + }, + Div{ + classes = {'match-bm-lol-match-mvp'}, + children = {'MVP', Array.map(self.props.mvp.players, function(player) + return Link{link = player.name, children = player.displayname} + end)}, + }, + }, + } +end + +return MatchPageHeader diff --git a/components/widget/match/page/widget_match_page_header_opponent.lua b/components/widget/match/page/widget_match_page_header_opponent.lua new file mode 100644 index 00000000000..f3950a281ea --- /dev/null +++ b/components/widget/match/page/widget_match_page_header_opponent.lua @@ -0,0 +1,56 @@ +--- +-- @Liquipedia +-- wiki=commons +-- page=Module:Widget/Match/Page/Header/Opponent +-- +-- Please see https://github.com/Liquipedia/Lua-Modules to contribute +-- + +local Array = require('Module:Array') +local Class = require('Module:Class') +local Lua = require('Module:Lua') + +local Widget = Lua.import('Module:Widget') +local HtmlWidgets = Lua.import('Module:Widget/Html/All') +local Div = HtmlWidgets.Div +local Link = Lua.import('Module:Widget/Basic/Link') + +---@class MatchPageHeaderOpponent: Widget +---@operator call(table): MatchPageHeaderOpponent +local MatchPageHeaderOpponent = Class.new(Widget) + +---@return Widget[]? +function MatchPageHeaderOpponent:render() + if not self.props.template or not self.props.page or not self.props.name or not self.props.shortname then + return nil + end + return Div{ + classes = {'match-bm-match-header-team'}, + children = { + self.props.icon or '', + Div{ + classes = {'match-bm-match-header-team-group'}, + children = { + Div{ + classes = {'match-bm-match-header-team-long'}, + children = {Link{link = self.props.page, children = self.props.name}}, + }, + Div{ + classes = {'match-bm-match-header-team-short'}, + children = {Link{link = self.props.page, children = self.props.shortname}}, + }, + Div{ + classes = {'match-bm-lol-match-header-round-results'}, + children = Array.map(self.props.seriesDots or {}, function(dot) + return Div{ + classes = {'match-bm-lol-match-header-round-result', 'result--' .. dot}, + } + end), + } + } + } + }, + } +end + +return MatchPageHeaderOpponent