diff --git a/components/match2/wikis/clashroyale/match_summary.lua b/components/match2/wikis/clashroyale/match_summary.lua index 451c38d8475..b5fa380e3af 100644 --- a/components/match2/wikis/clashroyale/match_summary.lua +++ b/components/match2/wikis/clashroyale/match_summary.lua @@ -387,17 +387,21 @@ function CustomMatchSummary._opponentCardsDisplay(args) local date = args.date local color = flip and CARD_COLOR_2 or CARD_COLOR_1 - local wrapper = mw.html.create('div') - :css('flex-basis', '1px') - :css('display', 'inline-flex') - :css('flex-direction', (flip and 'row' or 'row-reverse')) - :css('align-items', 'center') - local wrapperCards = mw.html.create('div') + local sideWrapper = mw.html.create('div') :css('display', 'flex') :css('flex-direction', 'column') for _, cardData in ipairs(cardDataSets) do + local wrapper = mw.html.create('div') + :css('flex-basis', '1px') + :css('display', 'inline-flex') + :css('flex-direction', (flip and 'row' or 'row-reverse')) + :css('align-items', 'center') + local wrapperCards = mw.html.create('div') + :css('display', 'flex') + :css('flex-direction', 'column') + local cardDisplays = {} for _, card in ipairs(cardData) do table.insert(cardDisplays, mw.html.create('div') @@ -437,9 +441,11 @@ function CustomMatchSummary._opponentCardsDisplay(args) }) wrapper:node(towerCardDisplay) end + + sideWrapper:node(wrapper) end - return wrapper + return sideWrapper end return CustomMatchSummary